Commit 37d09379 authored by Maxime Perrotin's avatar Maxime Perrotin

Give list of ACN files to template

parent 19971e5e
......@@ -51,6 +51,16 @@ package body TASTE.Backend.Code_Generators is
return Result;
end Get_ASN1_File_List;
-- Return a Tag list of ACN Files
function Get_ACN_File_List return Tag is
Result : Tag;
begin
for Each of Model.Data_View.ACN_Files loop
Result := Result & Each;
end loop;
return Result;
end Get_ACN_File_List;
-- Generate a global Makefile (processing all functions)
procedure Generate_Global_Makefile is
package Languages_Set is new Ordered_Sets (Unbounded_String);
......@@ -83,6 +93,7 @@ package body TASTE.Backend.Code_Generators is
& Assoc ("CP_Files", All_CP_Files)
& Assoc ("Unique_Languages", Unique_Languages)
& Assoc ("ASN1_Files", Get_ASN1_File_List)
& Assoc ("ACN_Files", Get_ACN_File_List)
& Assoc ("ASN1_Modules", Get_Module_List);
Put_Debug ("Generating global Makefile");
Create (File => Output_File,
......
......@@ -6,12 +6,16 @@
@@-- @_CP_Files_@ : List of all context parameters ASN.1 files
@@-- @_Unique_Languages_@ : List of all languages used in the system
@@-- @_ASN1_Files_@ : List of all ASN.1 files
@@-- @_ACN_Files_@ : List of all ACN files
@@-- @_ASN1_Modules_@ : List of all ASN.1 modules
# MAKEFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
MAKEFILE_PATH := $(lastword $(MAKEFILE_LIST))
OUTDIR := $(dir $(MAKEFILE_PATH))
DATAVIEW_PATH := ${OUTDIR}/dataview
DATAVIEW_UNIQ := ${DATAVIEW_PATH}/dataview-uniq.asn
@@IF@@ @_ACN_Files'Length_@ > 0
DATAVIEW_ACN := ${DATAVIEW_PATH}/dataview-uniq.acn
@@END_IF@@
DATAVIEW_AADLV1 := ${DATAVIEW_PATH}/dataview_aadlv1.aadl
# Project cache folder is used to speed up all ASN.1-related processing
......@@ -43,6 +47,7 @@ dataview: ${DATAVIEW_PATH}/built
@@END_INLINE@@
touch $@
# Build based on the deployment view
build-default: aadl2glueC build/system_config.h ${DATAVIEW_PATH}/built build/deploymentview_final/Makefile
$(MAKE) -j -C build -f Makefile.taste
......@@ -56,13 +61,9 @@ air: aadl2glueC build/system_config.h ${DATAVIEW_PATH}/built build/deploymentvie
build/deploymentview_final/Makefile: build/main.aadl
cd build && ocarina -x main.aadl
@@INLINE(${DATAVIEW_UNIQ}: )( )()@@
@@TABLE@@
@_ASN1_Files_@
@@END_TABLE@@
@@END_INLINE@@
# Create dataview-uniq.asn by concatenating all asn1 input files
${DATAVIEW_UNIQ}: @_REPLACE_ALL(,/):ASN1_Files_@
mkdir -p ${PROJECT_CACHE} && mkdir -p ${DATAVIEW_PATH}
@@-- 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 $^ > $@
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment