Commit 978ea608 authored by yoogx's avatar yoogx

* Update circuitry to get current revision to git

parent bd56a3d6
...@@ -68,7 +68,7 @@ package body Ocarina.Configuration is ...@@ -68,7 +68,7 @@ package body Ocarina.Configuration is
@AADL_VERSION@; @AADL_VERSION@;
pragma Style_Checks (Off); pragma Style_Checks (Off);
SVN_Revision : constant String := "Working Copy from @SVN_REVISION@"; SCM_Revision : constant String := "Working Copy from @SCM_REVISION@";
pragma Style_Checks (On); pragma Style_Checks (On);
-- We keep the repository version as "(Working Copy) from ..." to -- We keep the repository version as "(Working Copy) from ..." to
-- distinguish modified versions. When packaging Ocarina, we -- distinguish modified versions. When packaging Ocarina, we
...@@ -245,13 +245,13 @@ package body Ocarina.Configuration is ...@@ -245,13 +245,13 @@ package body Ocarina.Configuration is
end Ocarina_Version; end Ocarina_Version;
-------------------------- --------------------------
-- Ocarina_SVN_Revision -- -- Ocarina_Revision --
-------------------------- --------------------------
function Ocarina_SVN_Revision return String is function Ocarina_Revision return String is
begin begin
return SVN_Revision; return SCM_Revision;
end Ocarina_SVN_Revision; end Ocarina_Revision;
--------------------------------- ---------------------------------
-- Ocarina_Last_Configure_Date -- -- Ocarina_Last_Configure_Date --
......
...@@ -40,7 +40,7 @@ package Ocarina.Configuration is ...@@ -40,7 +40,7 @@ package Ocarina.Configuration is
procedure Reset_Modules; procedure Reset_Modules;
function Ocarina_Version return String; function Ocarina_Version return String;
function Ocarina_SVN_Revision return String; function Ocarina_Revision return String;
function Ocarina_Last_Configure_Date return String; function Ocarina_Last_Configure_Date return String;
function Ocarina_Last_Configure_Year return String; function Ocarina_Last_Configure_Year return String;
-- Version control routines -- Version control routines
......
...@@ -1299,7 +1299,7 @@ procedure Ocarina_Cmd is ...@@ -1299,7 +1299,7 @@ procedure Ocarina_Cmd is
begin begin
Write_Line Write_Line
("Ocarina " & Ocarina_Version ("Ocarina " & Ocarina_Version
& " (" & Ocarina_SVN_Revision & ")"); & " (" & Ocarina_Revision & ")");
if Ocarina_Last_Configure_Date /= "" then if Ocarina_Last_Configure_Date /= "" then
Write_Line ("Build date: " & Ocarina_Last_Configure_Date); Write_Line ("Build date: " & Ocarina_Last_Configure_Date);
......
...@@ -8,22 +8,22 @@ AC_DEFUN([AM_REVISION_UTILS], ...@@ -8,22 +8,22 @@ AC_DEFUN([AM_REVISION_UTILS],
[ [
# Take the current SVN revision # Take the current SVN revision
AC_MSG_CHECKING(whether this is an SVN working copy) AC_MSG_CHECKING(whether this is a SCM working copy)
temp_svn_output=`LANG=C svn info [$1] 2>/dev/null | grep "^Revision:" | awk '{print $NF}'` temp_scm_output=`(cd $srcdir; git rev-parse --short HEAD)`
if test x"${temp_svn_output}" = x""; then if test x"${temp_scm_output}" = x""; then
# This means we are NOT working on a repository copy, the value of # This means we are NOT working on a repository copy, the value of
# SVN_REVISION will not be taken into account. # SCM_REVISION will not be taken into account.
SVN_REVISION="" SCM_REVISION=""
AC_MSG_RESULT(no.) AC_MSG_RESULT(no.)
else else
SVN_REVISION="r${temp_svn_output}" SCM_REVISION="r${temp_scm_output}"
AC_MSG_RESULT(yes: ${SVN_REVISION}.) AC_MSG_RESULT(yes: ${SCM_REVISION}.)
fi fi
AC_SUBST(SVN_REVISION) AC_SUBST(SCM_REVISION)
# Take the configure full date # Take the configure full date
......
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