Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
Ocarina
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
TASTE
Ocarina
Commits
0a26a50e
Commit
0a26a50e
authored
Jul 27, 2015
by
yoogx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Resolve duplication of the Version function
parent
2c48bb29
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
32 additions
and
56 deletions
+32
-56
src/config/ocarina-configuration.adb.in
src/config/ocarina-configuration.adb.in
+27
-11
src/config/ocarina-configuration.ads
src/config/ocarina-configuration.ads
+3
-0
src/main/ocarina_cmd.adb
src/main/ocarina_cmd.adb
+1
-22
src/python/ocarina-python_cmd.adb
src/python/ocarina-python_cmd.adb
+1
-1
src/python/ocarina-utils.adb
src/python/ocarina-utils.adb
+0
-19
src/python/ocarina-utils.ads
src/python/ocarina-utils.ads
+0
-3
No files found.
src/config/ocarina-configuration.adb.in
View file @
0a26a50e
...
...
@@ -45,12 +45,14 @@ with Ocarina.Analyzer;
with
Ocarina
.
Options
;
use
Ocarina
.
Options
;
with
Ocarina
.
Parser
;
use
Ocarina
.
Parser
;
with
GNAT
.
Compiler_Version
;
with
GNAT
.
OS_Lib
;
use
GNAT
.
OS_Lib
;
with
GNAT
.
Source_Info
;
with
Ada
.
Command_Line
;
use
Ada
.
Command_Line
;
with
Charset
;
use
Charset
;
with
Ocarina
.
Namet
;
use
Ocarina
.
Namet
;
with
Ocarina
.
Output
;
use
Ocarina
.
Output
;
with
Ocarina
.
Types
;
use
Ocarina
.
Types
;
package
body
Ocarina
.
Configuration
is
...
...
@@ -58,8 +60,7 @@ package body Ocarina.Configuration is
--
As
some
of
the
values
of
the
constants
below
may
make
the
lines
--
too
long
for
GNAT
styles
,
we
put
the
litterals
in
a
new
line
.
Version
:
constant
String
:=
"@VERSION@"
;
Ocarina_V
:
constant
String
:=
"@VERSION@"
;
--
This
is
the
official
version
of
Ocarina
Stored
in
configure
.
ac
Default_AADL_Version
:
constant
AADL_Version_Type
:=
...
...
@@ -75,10 +76,6 @@ package body Ocarina.Configuration is
--
substitution
pattern
to
work
.
We
disable
style
checks
because
--
this
line
may
be
too
long
.
Last_Config_Date
:
constant
String
:=
"@LAST_CONFIG_DATE@"
;
--
The
date
of
the
latest
execution
of
the
configure
script
Last_Config_Year
:
constant
String
:=
"@LAST_CONFIG_YEAR@"
;
--
The
year
of
the
latest
execution
of
the
configure
script
...
...
@@ -239,12 +236,12 @@ package body Ocarina.Configuration is
function Ocarina_Version return String is
begin
return
Version
;
return
Ocarina_V
;
end Ocarina_Version;
----------------------
----
----------------------
-- Ocarina_Revision --
-----------------------
---
-----------------------
function Ocarina_Revision return String is
begin
...
...
@@ -257,7 +254,8 @@ package body Ocarina.Configuration is
function Ocarina_Last_Configure_Date return String is
begin
return Last_Config_Date;
return GNAT.Source_Info.Compilation_Date & " "
& GNAT.Source_Info.Compilation_Time;
end Ocarina_Last_Configure_Date;
---------------------------------
...
...
@@ -278,4 +276,22 @@ package body Ocarina.Configuration is
return GNU_Make_Str;
end GNU_Make_Cmd;
-------------
-- Version --
-------------
procedure Version is
package Compiler_Version is new GNAT.Compiler_Version;
begin
Write_Line
("Ocarina " & Ocarina_Version & " (" & Ocarina_Revision & ")");
Write_Line
("Copyright (c) 2003-2009 Telecom ParisTech, 2010-" &
Ocarina_Last_Configure_Year &
" ESA & ISAE");
Write_Line ("Build date: " & Ocarina_Last_Configure_Date);
Write_Line ("Compiled with: " & Compiler_Version.Version);
end Version;
end Ocarina.Configuration;
src/config/ocarina-configuration.ads
View file @
0a26a50e
...
...
@@ -43,6 +43,9 @@ package Ocarina.Configuration is
function
Ocarina_Last_Configure_Year
return
String
;
-- Version control routines
procedure
Version
;
-- Display a text with Ocarina version information
private
function
GNU_Make_Cmd
return
String
;
...
...
src/main/ocarina_cmd.adb
View file @
0a26a50e
...
...
@@ -86,9 +86,6 @@ procedure Ocarina_Cmd is
procedure
Usage
;
-- Display a message describing the usage of Ocarina
procedure
Version
;
-- Display version information
procedure
Ocarina_Shell
;
-- Launch Ocarina interactive mode
...
...
@@ -1216,26 +1213,8 @@ procedure Ocarina_Cmd is
Free
(
Exec_Suffix
);
end
Usage
;
-------------
-- Version --
-------------
procedure
Version
is
begin
Write_Line
(
"Ocarina "
&
Ocarina_Version
&
" ("
&
Ocarina_Revision
&
")"
);
if
Ocarina_Last_Configure_Date
/=
""
then
Write_Line
(
"Build date: "
&
Ocarina_Last_Configure_Date
);
end
if
;
Write_Line
(
"Copyright (c) 2003-2009 Telecom ParisTech, 2010-"
&
Ocarina_Last_Configure_Year
&
" ESA & ISAE"
);
end
Version
;
package
RT
renames
Ocarina
.
ME_REAL
.
Tokens
;
begin
-- Init
...
...
src/python/ocarina-python_cmd.adb
View file @
0a26a50e
...
...
@@ -83,7 +83,7 @@ package body Ocarina.Python_Cmd is
is
pragma
Unreferenced
(
Data
,
Command
);
begin
Ocarina
.
Utils
.
Version
;
Ocarina
.
Configuration
.
Version
;
end
On_Version
;
---------------
...
...
src/python/ocarina-utils.adb
View file @
0a26a50e
...
...
@@ -83,25 +83,6 @@ package body Ocarina.Utils is
Language
:=
No_Name
;
end
Reset
;
-------------
-- Version --
-------------
procedure
Version
is
begin
Write_Line
(
"Ocarina "
&
Ocarina_Version
&
" ("
&
Ocarina_Revision
&
")"
);
if
Ocarina_Last_Configure_Date
/=
""
then
Write_Line
(
"Build date: "
&
Ocarina_Last_Configure_Date
);
end
if
;
Write_Line
(
"Copyright (c) 2003-2009 Telecom ParisTech, 2010-"
&
Ocarina_Last_Configure_Year
&
" ESA & ISAE"
);
end
Version
;
------------------
-- Print_Status --
------------------
...
...
src/python/ocarina-utils.ads
View file @
0a26a50e
...
...
@@ -37,9 +37,6 @@ with Ocarina.ME_AADL.AADL_Tree.Nodes;
package
Ocarina
.
Utils
is
procedure
Version
;
-- Display version information
procedure
Usage
;
-- Display a message describing the usage of Ocarina
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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