makefile.tmplt 1.89 KB
Newer Older
1
2
3
4
5
@@-- The following tags are available in this template:
@@--
@@-- @_Function_Names_@      : Combined table: list of fuction names...
@@-- @_Language_@            : ... and corresponding implementation language
@@-- @_Unique_Languages_@    : List of all languages used in the system
6
7
8
@@-- @_ASN1_Files_@          : List of all ASN.1 files
@@-- @_ASN1_Modules_@        : List of all ASN.1 modules
dataviews:
Maxime Perrotin's avatar
Maxime Perrotin committed
9
10
11
12
13
14
15
16
17
18
	mkdir -p dataview
	@@-- Create dataview-uniq.asn
	@@INLINE(	)( )(\n)@@
        cat
        @@TABLE@@
           @_ASN1_Files_@ 
        @@END_TABLE@@
        > dataview/dataview-uniq.asn
	@@END_INLINE@@
	@@-- Then generate Dataviews once per target language
19
	@@TABLE@@
Maxime Perrotin's avatar
Maxime Perrotin committed
20
        @@IF@@ @_Unique_Languages_@ /= "GUI"
21
	@@IF@@ @_Unique_Languages_@ = "Ada" or @_Unique_Languages_@ = "SDL"
Maxime Perrotin's avatar
Maxime Perrotin committed
22
	mkdir dataview/Ada && asn1.exe -Ada -typePrefix asn1Scc -o dataview/Ada dataview/dataview-uniq.asn || :
23
	cd dataview/Ada && rm -f gnat.cfg GPS_project.gpr IgnoredExaminerWarnings.wrn runSpark.sh
Maxime Perrotin's avatar
Maxime Perrotin committed
24
	@@ELSIF@@ @_Unique_Languages_@ = "C" or @_Unique_Languages_@ = "CPP"
Maxime Perrotin's avatar
Maxime Perrotin committed
25
	mkdir dataview/C && asn1.exe -c -typePrefix asn1Scc -o dataview/@_Unique_Languages_@ dataview/dataview-uniq.asn || :
Maxime Perrotin's avatar
Maxime Perrotin committed
26
	@@ELSE@@
27
	mkdir -p dataview/@_Unique_Languages_@
Maxime Perrotin's avatar
Maxime Perrotin committed
28
	asn2dataModel -o dataview/@_Unique_Languages_@ -to@_Unique_Languages_@ dataview/dataview-uniq.asn
29
30
31
32
33
	@@END_IF@@
	@@END_IF@@
        @@END_TABLE@@
	@@-- Then symlink the files for each function
	@@TABLE@@
Maxime Perrotin's avatar
Maxime Perrotin committed
34
35
36
37
	@@IF@@ @_Language_@ = "Ada"
	ln -fs ${PWD}/dataview/Ada/*.ads @_LOWER:Function_Names_@/Ada/src
	@@ELSIF@@ @_Language_@ = "C" or @_Language_@ = "CPP"
	ln -fs ${PWD}/dataview/@_Language_@/*.h @_LOWER:Function_Names_@/@_Language_@/src
Maxime Perrotin's avatar
Maxime Perrotin committed
38
39
	@@ELSIF@@ @_Language_@ = "SDL"
	ln -fs ${PWD}/dataview/dataview-uniq.asn @_LOWER:Function_Names_@/@_Language_@/src
Maxime Perrotin's avatar
Maxime Perrotin committed
40
	@@ELSIF@@ @_Language_@ /= "GUI"
41
42
	ln -fs ${PWD}/dataview/@_Language_@/* @_LOWER:Function_Names_@/@_Language_@/src
	@@END_IF@@
43
	@@END_TABLE@@
44
45

all: dataviews