From 15907cdba340585af282cfb35d182980a10ec937 Mon Sep 17 00:00:00 2001 From: Maxime Perrotin Date: Tue, 27 Aug 2019 18:15:55 +0200 Subject: [PATCH] Fix for test21 cant use cat directly to concatenate multiple asn1 files, because if there is no newline at the end of the file, the last END keyword is joined to the next word, provoking a parsing error from the ASN1 compiler --- templates/skeletons/makefile.tmplt | 7 +++---- test/test21/Makefile | 17 ++++++----------- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/templates/skeletons/makefile.tmplt b/templates/skeletons/makefile.tmplt index 538f50e..887feaa 100644 --- a/templates/skeletons/makefile.tmplt +++ b/templates/skeletons/makefile.tmplt @@ -62,10 +62,9 @@ build/deploymentview_final/Makefile: build/main.aadl @@END_TABLE@@ @@END_INLINE@@ mkdir -p ${PROJECT_CACHE} && mkdir -p ${DATAVIEW_PATH} - @@-- Create dataview-uniq.asn - @@INLINE( )( )(\n)@@ - cat $^ > $@ - @@END_INLINE@@ + @@-- Create dataview-uniq.asn by concatenating all asn1 input files + @@-- Don't use cat, because files need newlines in between + sed -e '$$s/$$/\n/' -s $^ > $@ build/system_config.h: $(wildcard */*/wrappers/*_system_config.h) cat $^ > $@ diff --git a/test/test21/Makefile b/test/test21/Makefile index 3ed66de..fbdfc6a 100644 --- a/test/test21/Makefile +++ b/test/test21/Makefile @@ -3,22 +3,17 @@ KAZOO=../../kazoo all: test-parse test-parse: clean - $(KAZOO) --gw \ - -o output \ - --glue \ - --debug && time $(MAKE) -C output dataview + $(KAZOO) --gw -p -o output.pohic --glue --debug + time $(MAKE) -C output.pohic dataview gdb: clean gdb --args $(KAZOO) --gw \ - -o output \ + -o output.pohic \ + -p \ --glue \ - --debug \ - -i InterfaceView.aadl \ - -c DeploymentView.aadl \ - -d DataView.aadl \ - ../common/ocarina_components.aadl && $(MAKE) -C output dataview + --debug clean: - rm -rf output + rm -rf output.pohic .PHONY: clean test-parse gdb -- GitLab