Commit 24790482 authored by yoogx's avatar yoogx
Browse files

* Pass command line parameters after processing the scenario

          file

          For openaadl/ocarina#254
parent fb0939f3
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 2004-2009 Telecom ParisTech, 2010-2018 ESA & ISAE. -- -- Copyright (C) 2004-2009 Telecom ParisTech, 2010-2020 ESA & ISAE. --
-- -- -- --
-- Ocarina is free software; you can redistribute it and/or modify under -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -290,10 +290,8 @@ procedure Ocarina_Cmd is ...@@ -290,10 +290,8 @@ procedure Ocarina_Cmd is
File_Name : constant String := File_Name : constant String :=
Image (Value (N), Quoted => False); Image (Value (N), Quoted => False);
begin begin
Get_Name_String (Current_Scenario_Dirname);
Add_Str_To_Name_Buffer (File_Name);
Ocarina.Files.Add_File_To_Parse_List Ocarina.Files.Add_File_To_Parse_List
(Name_Find, Add_Suffix => True); (Get_String_Name (File_Name), Add_Suffix => True);
N := Next_Node (N); N := Next_Node (N);
end; end;
end loop; end loop;
...@@ -314,7 +312,6 @@ procedure Ocarina_Cmd is ...@@ -314,7 +312,6 @@ procedure Ocarina_Cmd is
end if; end if;
F := Sources.First; F := Sources.First;
loop loop
Dirname := Dirname :=
Get_String_Name Get_String_Name
...@@ -559,9 +556,10 @@ procedure Ocarina_Cmd is ...@@ -559,9 +556,10 @@ procedure Ocarina_Cmd is
Ocarina.Configuration.Reset_Modules; Ocarina.Configuration.Reset_Modules;
Ocarina.Reset; Ocarina.Reset;
-- Ocarina.Files.Sources.Init;
Ocarina.Initialize; Ocarina.Initialize;
Reset_Current_Action;
Ocarina.Cmd_Line.Process;
Language := Get_String_Name ("aadl"); Language := Get_String_Name ("aadl");
Ocarina.AADL_Version := Temp_AADL_Version; Ocarina.AADL_Version := Temp_AADL_Version;
Set_Current_Backend_Name (The_Backend_Name); Set_Current_Backend_Name (The_Backend_Name);
...@@ -585,6 +583,10 @@ procedure Ocarina_Cmd is ...@@ -585,6 +583,10 @@ procedure Ocarina_Cmd is
(Name_Find, Add_Suffix => True); (Name_Find, Add_Suffix => True);
end loop; end loop;
-- Add scenario directory to the list of search path
Add_Library_Path (Scenario_Dir.all);
-- Avoid memory leaks -- Avoid memory leaks
Free (Result); Free (Result);
......
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