Commit 5b2578c5 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Start the top Makefile template

parent 832ce96b
......@@ -41,6 +41,28 @@ package body TASTE.Backend.Skeletons is
Exists (Path & "body-filename.tmplt") and then
Exists (Path & "header-filename.tmplt"));
-- Return a Tag list of ASN.1 Modules for the skeleton headers
function Get_Module_List return Tag is
Result : Tag;
begin
for Each of Model.Data_View.ASN1_Files loop
for Module of Each.Modules loop
Result := Result & Module.Name;
end loop;
end loop;
return Result;
end Get_Module_List;
-- Return a Tag list of ASN.1 Files
function Get_ASN1_File_List return Tag is
Result : Tag;
begin
for Each of Model.Data_View.ASN1_Files loop
Result := Result & Each.Path;
end loop;
return Result;
end Get_ASN1_File_List;
-- Generate the content of the Makefile per function
function Function_Makefile (Path : String;
Content : Translate_Set) return String is
......@@ -75,7 +97,9 @@ package body TASTE.Backend.Skeletons is
end loop;
Content_Set := +Assoc ("Function_Names", Functions_Tag)
& Assoc ("Language", Language_Tag)
& Assoc ("Unique_Languages", Unique_Languages);
& Assoc ("Unique_Languages", Unique_Languages)
& Assoc ("ASN1_Files", Get_ASN1_File_List)
& Assoc ("ASN1_Modules", Get_Module_List);
return Parse (Tmplt, Content_Set);
end Global_Makefile;
......@@ -93,29 +117,6 @@ package body TASTE.Backend.Skeletons is
end loop;
return Result;
end Process_Interfaces;
-- Return a Tag list of ASN.1 Modules for the skeleton headers
function Get_Module_List return Tag is
Result : Tag;
begin
for Each of Model.Data_View.ASN1_Files loop
for Module of Each.Modules loop
Result := Result & Module.Name;
end loop;
end loop;
return Result;
end Get_Module_List;
-- Return a Tag list of ASN.1 Files for the skeleton headers
function Get_ASN1_File_List return Tag is
Result : Tag;
begin
for Each of Model.Data_View.ASN1_Files loop
Result := Result & Each.Path;
end loop;
return Result;
end Get_ASN1_File_List;
begin
Put_Info ("=== Generate skeletons ===");
for Each of Model.Interface_View.Flat_Functions loop
......
package TASTE.Parser_Version is
Parser_Release : constant String :=
"c8dc31e ; Commit Date: Wed Mar 14 17:18:22 2018 ";
"832ce96 ; Commit Date: Wed Mar 14 21:10:56 2018 ";
Ocarina_Version : constant String :=
"Ocarina 2017.x (Working Copy from r2a52334)";
end TASTE.Parser_Version;
\ No newline at end of file
......@@ -3,7 +3,39 @@
@@-- @_Function_Names_@ : Combined table: list of fuction names...
@@-- @_Language_@ : ... and corresponding implementation language
@@-- @_Unique_Languages_@ : List of all languages used in the system
all: @_Unique_Languages_@
@@-- @_ASN1_Files_@ : List of all ASN.1 files
@@-- @_ASN1_Modules_@ : List of all ASN.1 modules
dataviews:
@@-- First generate Dataviews once per target language
@@TABLE@@
@_Function_Names_@ in @_Language_@
@@IF@@ @_Unique_Languages_@ /= "GUI"
mkdir -p dataview/@_Unique_Languages_@
@@IF@@ @_Unique_Languages_@ = "SDL"
@@INLINE( )( )(\n)@@
cat
@@TABLE@@
@_ASN1_Files_@
@@END_TABLE@@
> dataview/@_Unique_Languages_@/dataview-uniq.asn
@@END_INLINE@@
@@ELSE@@
@@INLINE( )( )(\n)@@
asn2dataModel -o dataview/@_Unique_Languages_@ -to@_Unique_Languages_@
@@TABLE@@
@_ASN1_Files_@
@@END_TABLE@@
@@END_INLINE@@
@@END_IF@@
@@IF@@ @_Unique_Languages_@ = "Ada"
cd dataview/Ada && rm -f gnat.cfg GPS_project.gpr IgnoredExaminerWarnings.wrn runSpark.sh
@@END_IF@@
@@END_IF@@
@@END_TABLE@@
@@-- Then symlink the files for each function
@@TABLE@@
@@IF@@ @_Language_@ /= "GUI"
ln -fs ${PWD}/dataview/@_Language_@/* @_LOWER:Function_Names_@/@_Language_@/src
@@END_IF@@
@@END_TABLE@@
all: dataviews
Supports Markdown
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