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
3b908f5d
Commit
3b908f5d
authored
Mar 03, 2014
by
yoogx
Browse files
* Reorganize Python subpart
parent
ec7ce83b
Changes
16
Hide whitespace changes
Inline
Side-by-side
configure.ac
View file @
3b908f5d
...
@@ -410,11 +410,13 @@ AC_OUTPUT([
...
@@ -410,11 +410,13 @@ AC_OUTPUT([
resources/runtime/aadl_xml/Makefile
resources/runtime/aadl_xml/Makefile
projects/ocarina.gpr
projects/ocarina.gpr
src/main/Makefile
src/main/Makefile
src/
main
/ocarina-configuration.adb
src/
config
/ocarina-configuration.adb
src/frontends/Makefile
src/frontends/Makefile
src/config/Makefile
src/core/Makefile
src/core/Makefile
src/transfo/Makefile
src/transfo/Makefile
src/backends/Makefile
src/backends/Makefile
src/python/Makefile
src/Makefile
src/Makefile
support/Makefile
support/Makefile
support/strip_wrapper.sh
support/strip_wrapper.sh
...
...
projects/Makefile.am
View file @
3b908f5d
...
@@ -36,6 +36,7 @@ OBJECT_DIRS = $(top_builddir)/src/core/objects \
...
@@ -36,6 +36,7 @@ OBJECT_DIRS = $(top_builddir)/src/core/objects \
$(top_builddir)
/src/backends/objects
\
$(top_builddir)
/src/backends/objects
\
$(top_builddir)
/src/transfo/objects
\
$(top_builddir)
/src/transfo/objects
\
$(top_builddir)
/src/main/objects
\
$(top_builddir)
/src/main/objects
\
$(top_builddir)
/src/python/objects
\
$(top_builddir)
/src/config/objects
$(top_builddir)
/src/config/objects
# Library directories (*.ali, *.a)
# Library directories (*.ali, *.a)
...
@@ -45,6 +46,7 @@ LIB_DIRS = $(top_builddir)/src/core/libs \
...
@@ -45,6 +46,7 @@ LIB_DIRS = $(top_builddir)/src/core/libs \
$(top_builddir)
/src/backends/libs
\
$(top_builddir)
/src/backends/libs
\
$(top_builddir)
/src/transfo/libs
\
$(top_builddir)
/src/transfo/libs
\
$(top_builddir)
/src/config/libs
\
$(top_builddir)
/src/config/libs
\
$(top_builddir)
/src/python/libs
\
$(top_builddir)
/src/main/libs
$(top_builddir)
/src/main/libs
# All directories used for the build process. If the configure is
# All directories used for the build process. If the configure is
...
...
projects/ocarina-config.gpr
View file @
3b908f5d
...
@@ -38,13 +38,12 @@ with "ocarina-backends";
...
@@ -38,13 +38,12 @@ with "ocarina-backends";
with
"ocarina-transfo"
;
with
"ocarina-transfo"
;
project
Ocarina
.
Config
is
project
Ocarina
.
Config
is
Src_Dir
:=
Ocarina
.
Top_Src_Dir
&
"/main"
;
Src_Dir
:=
Ocarina
.
Top_Src_Dir
&
"/config"
;
Src_Dir_2
:=
Ocarina
.
Top_Build_Dir
&
"/main"
;
Build_Dir
:=
Ocarina
.
Top_Build_Dir
&
"/config"
;
Build_Dir
:=
Ocarina
.
Top_Build_Dir
&
"/config"
;
for
Source_Dirs
use
(
Src_Dir
,
Src_Dir_2
,
Build_Dir
);
for
Source_Dirs
use
(
Src_Dir
,
Build_Dir
);
for
Source_Files
use
(
"ocarina-configuration.adb"
,
"ocarina-configuration.ads"
);
for
Object_Dir
use
Build_Dir
&
"/objects"
;
for
Object_Dir
use
Build_Dir
&
"/objects"
;
for
Library_Dir
use
Build_Dir
&
"/libs"
;
for
Library_Dir
use
Build_Dir
&
"/libs"
;
for
Library_Name
use
"ocarina-config"
;
for
Library_Name
use
"ocarina-config"
;
for
Library_Kind
use
Ocarina
.
Lib_Type
;
for
Library_Kind
use
Ocarina
.
Lib_Type
;
...
...
projects/ocarina-main.gpr
View file @
3b908f5d
...
@@ -33,16 +33,17 @@
...
@@ -33,16 +33,17 @@
with
"ocarina"
;
with
"ocarina"
;
with
"ocarina-core"
;
with
"ocarina-core"
;
with
"ocarina-config"
;
with
"ocarina-frontends"
;
with
"ocarina-frontends"
;
with
"ocarina-backends"
;
with
"ocarina-backends"
;
with
"ocarina-transfo"
;
with
"ocarina-transfo"
;
with
"gnatcoll_python"
;
project
Ocarina
.
Main
is
project
Ocarina
.
Main
is
Src_Dir
:=
Ocarina
.
Top_Src_Dir
&
"/main"
;
Src_Dir
:=
Ocarina
.
Top_Src_Dir
&
"/main"
;
Src_Dir_2
:=
Ocarina
.
Top_Src_Dir
&
"/python"
;
Build_Dir
:=
Ocarina
.
Top_Build_Dir
&
"/main"
;
Build_Dir
:=
Ocarina
.
Top_Build_Dir
&
"/main"
;
for
Source_Dirs
use
(
Src_Dir
,
Build_Dir
);
for
Source_Dirs
use
(
Src_Dir
,
Build_Dir
,
src_dir_2
);
for
Object_Dir
use
Build_Dir
&
"/objects"
;
for
Object_Dir
use
Build_Dir
&
"/objects"
;
for
Library_Dir
use
Build_Dir
&
"/libs"
;
for
Library_Dir
use
Build_Dir
&
"/libs"
;
for
Exec_Dir
use
Build_Dir
;
for
Exec_Dir
use
Build_Dir
;
...
@@ -51,6 +52,7 @@ project Ocarina.Main is
...
@@ -51,6 +52,7 @@ project Ocarina.Main is
package
Compiler
renames
Ocarina
.
Compiler
;
package
Compiler
renames
Ocarina
.
Compiler
;
package
Binder
renames
Ocarina
.
Binder
;
package
Binder
renames
Ocarina
.
Binder
;
package
Linker
renames
Ocarina
.
Linker
;
package
Linker
renames
Ocarina
.
Linker
;
package
Builder
is
package
Builder
is
for
Executable
(
"ocarina_cmd"
)
use
"ocarina"
;
for
Executable
(
"ocarina_cmd"
)
use
"ocarina"
;
for
Default_Switches
(
"Ada"
)
use
for
Default_Switches
(
"Ada"
)
use
...
...
projects/ocarina-python.gpr
View file @
3b908f5d
...
@@ -32,25 +32,33 @@
...
@@ -32,25 +32,33 @@
------------------------------------------------------------------------------
------------------------------------------------------------------------------
with
"ocarina"
;
with
"ocarina"
;
with
"ocarina-config"
;
with
"ocarina-core"
;
with
"ocarina-core"
;
with
"ocarina-frontends"
;
with
"ocarina-frontends"
;
with
"ocarina-backends"
;
with
"ocarina-backends"
;
with
"ocarina-transfo"
;
with
"ocarina-transfo"
;
with
"gnatcoll_python"
;
with
"gnatcoll_python"
;
project
Ocarina
.
Python
is
project
Ocarina
.
Python
is
Src_Dir
:=
Ocarina
.
Top_Src_Dir
&
"/
mai
n"
;
Src_Dir
:=
Ocarina
.
Top_Src_Dir
&
"/
pytho
n"
;
Build_Dir
:=
Ocarina
.
Top_Build_Dir
&
"/
mai
n"
;
Build_Dir
:=
Ocarina
.
Top_Build_Dir
&
"/
pytho
n"
;
for
Source_Dirs
use
(
Src_Dir
,
Build_Dir
);
for
Source_Dirs
use
(
Src_Dir
,
Build_Dir
);
for
Object_Dir
use
Build_Dir
&
"/objects"
;
for
Object_Dir
use
Build_Dir
&
"/objects"
;
for
Library_Dir
use
Build_Dir
&
"/libs"
;
for
Library_Dir
use
Build_Dir
&
"/libs"
;
for
Library_Name
use
"ocarina
-
python"
;
for
Library_Name
use
"ocarina
_
python"
;
for
Library_Kind
use
Ocarina
.
Lib_Type
;
for
Library_Kind
use
Ocarina
.
Lib_Type
;
for
Library_Version
use
"libocarina_python.so"
;
for
Library_Interface
use
(
"ocarina.python_cmd"
);
for
Library_Standalone
use
"standard"
;
-- for Library_Standalone use "encapsulated";
package
Compiler
renames
Ocarina
.
Compiler
;
package
Compiler
renames
Ocarina
.
Compiler
;
package
Binder
renames
Ocarina
.
Binder
;
package
Binder
renames
Ocarina
.
Binder
;
package
Builder
renames
Ocarina
.
Builder
;
package
Builder
renames
Ocarina
.
Builder
;
end
Ocarina
.
Python
;
end
Ocarina
.
Python
;
projects/ocarina.gpr.in
View file @
3b908f5d
...
@@ -59,6 +59,7 @@ project Ocarina is
...
@@ -59,6 +59,7 @@ project Ocarina is
"-gnatoa"
,
"-gnatoa"
,
"-fstack-check"
,
"-fstack-check"
,
"-gnaty"
,
"-gnaty"
,
"-gnatwl"
,
"-gnatyu"
,
--
not
in
-
gnaty
:
check
multiple
blank
lines
"-gnatyu"
,
--
not
in
-
gnaty
:
check
multiple
blank
lines
"-gnatys"
,
--
not
in
-
gnatx
:
check
useless
parentheses
"-gnatys"
,
--
not
in
-
gnatx
:
check
useless
parentheses
@
GCOV
@
"-fprofile-arcs"
,
@
GCOV
@
"-fprofile-arcs"
,
...
@@ -80,7 +81,7 @@ project Ocarina is
...
@@ -80,7 +81,7 @@ project Ocarina is
package
Binder
is
package
Binder
is
case
Build
is
case
Build
is
when
"debug"
=>
when
"debug"
=>
for
Default_Switches
(
"Ada"
)
use
(
"-E"
,
"-t"
,
"-static"
);
for
Default_Switches
(
"Ada"
)
use
(
"-E"
,
"-t"
);
when
"release"
=>
when
"release"
=>
for
Default_Switches
(
"Ada"
)
use
(
"-t"
,
"-static"
);
for
Default_Switches
(
"Ada"
)
use
(
"-t"
,
"-static"
);
end
case
;
end
case
;
...
...
src/Makefile.am
View file @
3b908f5d
SUBDIRS
=
core frontends backends main transfo
SUBDIRS
=
core frontends backends main transfo python config
src/
main
/ocarina-configuration.adb.in
→
src/
config
/ocarina-configuration.adb.in
View file @
3b908f5d
File moved
src/
main
/ocarina-configuration.ads
→
src/
config
/ocarina-configuration.ads
View file @
3b908f5d
File moved
src/main/ocarina_cmd.adb
View file @
3b908f5d
...
@@ -69,7 +69,7 @@ with Ocarina.FE_AADL.Parser; use Ocarina.FE_AADL.Parser;
...
@@ -69,7 +69,7 @@ with Ocarina.FE_AADL.Parser; use Ocarina.FE_AADL.Parser;
with
Ocarina
.
ME_REAL
.
Tokens
;
with
Ocarina
.
ME_REAL
.
Tokens
;
with
Ocarina
.
Scripts
;
use
Ocarina
.
Scripts
;
with
Ocarina
.
Scripts
;
use
Ocarina
.
Scripts
;
with
Ocarina
.
Utils
;
use
Ocarina
.
Utils
;
with
Ocarina
.
Utils
;
use
Ocarina
.
Utils
;
with
Ocarina
.
Python
;
use
Ocarina
.
Python
;
--
with Ocarina.Python; use Ocarina.Python;
with
Ocarina
.
ME_AADL
.
AADL_Instances
.
Nodes
;
with
Ocarina
.
ME_AADL
.
AADL_Instances
.
Nodes
;
procedure
Ocarina_Cmd
is
procedure
Ocarina_Cmd
is
...
@@ -867,7 +867,7 @@ begin
...
@@ -867,7 +867,7 @@ begin
OS_Exit
(
0
);
OS_Exit
(
0
);
when
Python_Shell
=>
when
Python_Shell
=>
Run_Python
;
--
Run_Python;
OS_Exit
(
0
);
OS_Exit
(
0
);
when
Parse_Scenario_Files_First
=>
when
Parse_Scenario_Files_First
=>
...
...
src/
mai
n/ocarina-python.adb
→
src/
pytho
n/ocarina-python.adb
View file @
3b908f5d
File moved
src/
mai
n/ocarina-python.ads
→
src/
pytho
n/ocarina-python.ads
View file @
3b908f5d
File moved
src/
mai
n/ocarina-python_cmd.adb
→
src/
pytho
n/ocarina-python_cmd.adb
View file @
3b908f5d
...
@@ -111,7 +111,9 @@ package body Ocarina.Python_Cmd is
...
@@ -111,7 +111,9 @@ package body Ocarina.Python_Cmd is
-- register those you intend to support
-- register those you intend to support
Repo
:=
new
Scripts_Repository_Record
;
Repo
:=
new
Scripts_Repository_Record
;
Register_Python_Scripting
(
Repo
,
"ocarina"
);
Register_Python_Scripting
(
Repo
,
"libocarina_python"
);
-- Note: it must match the name of the library generated
Register_Standard_Classes
(
Repo
,
"Console"
);
Register_Standard_Classes
(
Repo
,
"Console"
);
-- Register our custom functions
-- Register our custom functions
...
@@ -152,7 +154,7 @@ package body Ocarina.Python_Cmd is
...
@@ -152,7 +154,7 @@ package body Ocarina.Python_Cmd is
procedure
Initialize_Lib
is
procedure
Initialize_Lib
is
procedure
Adainit
;
procedure
Adainit
;
pragma
Import
(
C
,
Adainit
,
"
ada
init"
);
pragma
Import
(
C
,
Adainit
,
"
ocarina_python
init"
);
begin
begin
-- Initialize Ada runtime
-- Initialize Ada runtime
...
@@ -166,6 +168,7 @@ package body Ocarina.Python_Cmd is
...
@@ -166,6 +168,7 @@ package body Ocarina.Python_Cmd is
-- Initialize Python bindings
-- Initialize Python bindings
Repo
:=
Register_Scripts_And_Functions
;
Repo
:=
Register_Scripts_And_Functions
;
end
Initialize_Lib
;
end
Initialize_Lib
;
----------------
----------------
...
...
src/
mai
n/ocarina-python_cmd.ads
→
src/
pytho
n/ocarina-python_cmd.ads
View file @
3b908f5d
...
@@ -11,7 +11,7 @@ package Ocarina.Python_Cmd is
...
@@ -11,7 +11,7 @@ package Ocarina.Python_Cmd is
-- export
-- export
procedure
Initialize_Lib
;
procedure
Initialize_Lib
;
pragma
Export
(
C
,
Initialize_Lib
,
"initocarina"
);
pragma
Export
(
C
,
Initialize_Lib
,
"init
lib
ocarina
_python
"
);
procedure
Initialize
;
procedure
Initialize
;
...
...
src/
mai
n/ocarina-utils.adb
→
src/
pytho
n/ocarina-utils.adb
View file @
3b908f5d
File moved
src/
mai
n/ocarina-utils.ads
→
src/
pytho
n/ocarina-utils.ads
View file @
3b908f5d
File moved
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