Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
Ocarina
Commits
4ca968f4
Commit
4ca968f4
authored
Jan 05, 2016
by
yoogx
Browse files
* Add --list-backends option
For issue #33
parent
f0cdf131
Changes
3
Show whitespace changes
Inline
Side-by-side
src/core/mgmt/ocarina-options.ads
View file @
4ca968f4
...
...
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-201
5
ESA & ISAE. --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-201
6
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- --
...
...
@@ -54,6 +54,7 @@ package Ocarina.Options is
Show_Usage
,
Parse_Scenario_Files_First
,
Shell
,
List_Backends
,
Python_Shell
);
After_Scenario_Action
:
Action_Kind
:=
Generate_Code
;
...
...
src/main/ocarina-cmd_line.adb
View file @
4ca968f4
...
...
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--
Copyright (C) 2015 ESA & ISAE.
--
-- Copyright (C) 2015
-2016
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- --
...
...
@@ -105,6 +105,9 @@ package body Ocarina.Cmd_Line is
Add_Library_Path
(
Parameter
);
end
if
;
elsif
Switch
=
"--list-backends"
then
Set_Current_Action
(
List_Backends
);
elsif
Switch
=
"-o"
then
Output_Filename
:=
Get_String_Name
(
Parameter
);
Generated_Sources_Directory
:=
Output_Filename
;
...
...
@@ -273,6 +276,10 @@ package body Ocarina.Cmd_Line is
Define_Switch
(
Ocarina_Options
,
"-g:"
,
Help
=>
"Generate code using Ocarina backend 'ARG'"
);
-- --list-backends flag
Define_Switch
(
Ocarina_Options
,
Long_Switch
=>
"--list-backends"
,
Help
=>
"List available backends"
);
-- -b flag
Define_Switch
(
Ocarina_Options
,
Backends
.
Compile_Generated_Sources
'
Access
,
"-b"
,
...
...
src/main/ocarina_cmd.adb
View file @
4ca968f4
...
...
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2004-2009 Telecom ParisTech, 2010-201
5
ESA & ISAE. --
-- Copyright (C) 2004-2009 Telecom ParisTech, 2010-201
6
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- --
...
...
@@ -559,8 +559,10 @@ begin
if
Verbose
then
Set_Standard_Error
;
if
not
Display_Version
then
Version
;
end
if
;
end
if
;
if
Display_Version
then
Version
;
...
...
@@ -570,6 +572,10 @@ begin
Write_Line
(
Get_Name_String
(
Default_Library_Path
));
OS_Exit
(
0
);
elsif
Get_Current_Action
=
List_Backends
then
Write_Backends
(
1
);
OS_Exit
(
0
);
elsif
Get_Current_Action
=
Shell
then
Ocarina_Shell
;
OS_Exit
(
0
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment