Commit c77bf46d authored by yoogx's avatar yoogx

* Create directory used for "-o" command line flag, for issue #34

        * Suppress the invokation of "cheddarlite" when -b is set,
          this is no longer supported
parent 22e0fbf6
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2010-2014 ESA & ISAE. --
-- Copyright (C) 2010-2015 ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify --
-- it under terms of the GNU General Public License as published by the --
......@@ -41,7 +41,6 @@ with Ocarina.Backends.XML_Tree.Nutils;
with Ocarina.Backends.XML_Tree.Generator;
with GNAT.Command_Line; use GNAT.Command_Line;
with GNAT.OS_Lib; use GNAT.OS_Lib;
with Ocarina.Namet; use Ocarina.Namet;
......@@ -56,8 +55,6 @@ package body Ocarina.Backends.Cheddar is
package XTU renames Ocarina.Backends.XML_Tree.Nutils;
Generated_Sources_Directory : Name_Id := No_Name;
Invoke_Cheddar : Boolean := False;
Cheddarlite_Path : String_Access;
procedure Visit_Architecture_Instance (E : Node_Id);
-- Most top level visitor routine. E is the root of the AADL
......@@ -90,33 +87,14 @@ package body Ocarina.Backends.Cheddar is
Display_Error ("XML generation failed", Fatal => True);
end if;
Create_Directory (Generated_Sources_Directory);
Enter_Directory (Generated_Sources_Directory);
-- Create the XML file
XML_Tree.Generator.Generate (XML_Root);
if Invoke_Cheddar then
if Cheddarlite_Path = null then
Cheddarlite_Path := Locate_Exec_On_Path ("cheddarlite");
end if;
declare
Args : GNAT.OS_Lib.Argument_List (1 .. 4);
Success : Boolean;
begin
Args (1) := new String'("-file");
Args (2) := new String'("rma_impl_cheddar.xml");
Args (3) := new String'("-request");
Args (4) := new String'("all");
Spawn (Cheddarlite_Path.all, Args, Success);
if not Success then
raise Program_Error;
end if;
end;
end if;
Leave_Directory;
end Generate;
......@@ -133,9 +111,6 @@ package body Ocarina.Backends.Cheddar is
when ASCII.NUL =>
exit;
when 'b' =>
Invoke_Cheddar := True;
when 'o' =>
declare
D : constant String := Parameter;
......
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