Commit ad99c632 authored by Jerome Hugues's avatar Jerome Hugues

* Add info on Ocarina git hash in generated files

    For openaadl/ocarina#74
parent 653e750a
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2006-2009 Telecom ParisTech, 2010-2019 ESA & ISAE. --
-- Copyright (C) 2006-2009 Telecom ParisTech, 2010-2020 ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -2433,6 +2433,11 @@ package body Ocarina.Backends.Ada_Tree.Nutils is
N := Make_Ada_Comment (Name_Find);
Append_Node_To_List (N, Package_Header);
Set_Str_To_Name_Buffer
(SCM_Version.all);
N := Make_Ada_Comment (Name_Find);
Append_Node_To_List (N, Package_Header);
Set_Str_To_Name_Buffer
("Do NOT hand-modify this file, as your --");
N := Make_Ada_Comment (Name_Find);
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2019 ESA & ISAE. --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2020 ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -921,6 +921,11 @@ package body Ocarina.Backends.C_Tree.Nutils is
N := Make_C_Comment (Name_Find);
Append_Node_To_List (N, Header);
Set_Str_To_Name_Buffer
(SCM_Version.all);
N := Make_C_Comment (Name_Find);
Append_Node_To_List (N, Header);
Set_Str_To_Name_Buffer
("Do NOT hand-modify this file, as your ");
N := Make_C_Comment (Name_Find);
......
......@@ -1482,7 +1482,8 @@ package body Ocarina.Backends.Build_Utils is
Write_Line
("# This Makefile has been generated automatically #");
Write_Line
("# by the Ocarina AADL toolsuite. #");
("# by the Ocarina AADL toolsuite #");
Write_Line ("# " & SCM_Version.all & ". #");
Write_Line
("# Do not edit this file, all your changes will #");
Write_Line
......@@ -1584,7 +1585,8 @@ package body Ocarina.Backends.Build_Utils is
Write_Line ("###################################################");
Write_Line ("# This Makefile has been generated automatically #");
Write_Line ("# by the Ocarina AADL toolsuite. #");
Write_Line ("# by the Ocarina AADL toolsuite #");
Write_Line ("# " & SCM_Version.all & ". #");
Write_Line ("# Do not edit this file, all your changes will #");
Write_Line ("# be overridden at the next code generation. #");
Write_Line ("###################################################");
......@@ -1761,7 +1763,8 @@ package body Ocarina.Backends.Build_Utils is
Write_Line ("###################################################");
Write_Line ("# This Makefile has been generated automatically #");
Write_Line ("# by the Ocarina AADL toolsuite. #");
Write_Line ("# by the Ocarina AADL toolsuite #");
Write_Line ("# " & SCM_Version.all & ". #");
Write_Line ("# Do not edit this file, all your changes will #");
Write_Line ("# be overridden at the next code generation. #");
Write_Line ("###################################################");
......@@ -2946,7 +2949,8 @@ package body Ocarina.Backends.Build_Utils is
Write_Line
("-- This project file has been generated automatically --");
Write_Line
("-- by the Ocarina AADL toolsuite. --");
("-- by the Ocarina AADL toolsuite --");
Write_Line ("-- " & SCM_Version.all & " --");
Write_Line
("-- Do not edit this file since all your changes will --");
Write_Line
......
......@@ -115,6 +115,8 @@ package Ocarina.Backends is
Scenario_Dir : String_Ptr;
-- Path to scenario directory, required to get source path to user code
SCM_Version : String_Ptr;
Compile_Generated_Sources : aliased Boolean := False;
Remove_Generated_Sources : aliased Boolean := False;
Do_Coverage_Test : aliased Boolean := False;
......
......@@ -601,7 +601,7 @@ begin
Language := Get_String_Name ("aadl");
Default_AADL_Version := Get_Default_AADL_Version;
AADL_Version := Default_AADL_Version;
SCM_Version := new String'(Ocarina_Revision);
-- Process the command line
Ocarina.Cmd_Line.Process;
......
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