[Xfce4-commits] <xfce4-dev-tools:master> use git for revision substitution

Brian J. Tarricone brian at tarricone.org
Wed Aug 19 05:32:02 CEST 2009


Updating branch refs/heads/master
         to f88cea5e782a0496186d42f469782882cac34a7c (commit)
       from 37d405679d49f9bff0fdc1d70cff9ea560c08222 (commit)

commit f88cea5e782a0496186d42f469782882cac34a7c
Author: Brian J. Tarricone <brian at tarricone.org>
Date:   Tue Aug 18 18:56:54 2009 -0700

    use git for revision substitution

 autogen.sh      |   19 ++++++++-----------
 configure.in.in |   12 ++++++------
 2 files changed, 14 insertions(+), 17 deletions(-)

diff --git a/autogen.sh b/autogen.sh
index cae25a9..02b0071 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -9,26 +9,23 @@
 #
 
 # substitute revision and date
-if test -d .git/svn; then
-  revision=$(git svn find-rev trunk 2>/dev/null ||
-             git svn find-rev origin/trunk 2>/dev/null ||
-             git svn find-rev HEAD 2>/dev/null ||
-             git svn find-rev master 2>/dev/null)
-else
-  revision=`LC_ALL=C svn info $0 | awk '/^Revision: / {printf "%05d\n", $2}'`
+if test -d .git; then
+  revision=$(git rev-parse --short HEAD)
+fi
+if test "x$revision" = "x"; then
+  revision=UNKNOWN
 fi
-sed -e "s/@DATE@/`date +%Y%m%d`/g" -e "s/@REVISION@/${revision}/g" \
-  < "configure.in.in" > "configure.in"
+sed -e "s/@REVISION@/${revision}/g" < "configure.in.in" > "configure.in"
 
 if (type xdt-autogen) >/dev/null 2>&1; then
-  exec xdt-autogen $@
+  exec xdt-autogen "$@"
 else
   (aclocal &&
    automake --add-missing --copy --gnu &&
    autoconf) || exit 1
 
   if test x"${NOCONFIGURE}" = x""; then
-    (./configure --enable-maintainer-mode $@ &&
+    (./configure --enable-maintainer-mode "$@" &&
      echo "Now type \"make\" to build.") || exit 1
   else
     echo "Skipping configure process."
diff --git a/configure.in.in b/configure.in.in
index 746759a..90f8bd9 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -10,12 +10,12 @@ dnl ***************************
 dnl *** Version information ***
 dnl ***************************
 m4_define([xdt_version_major], [4])
-m4_define([xdt_version_minor], [6])
-m4_define([xdt_version_micro], [1])
+m4_define([xdt_version_minor], [7])
+m4_define([xdt_version_micro], [0])
 m4_define([xdt_version_nano], [])
-m4_define([xdt_version_build], [r at REVISION@])
-m4_define([xdt_version_tag], [svn])
-m4_define([xdt_version], [xdt_version_major().xdt_version_minor().xdt_version_micro()ifelse(xdt_version_nano(), [], [], [.xdt_version_nano()])ifelse(xdt_version_tag(), [svn], [xdt_version_tag()-xdt_version_build()], [])])
+m4_define([xdt_version_build], [@REVISION@])
+m4_define([xdt_version_tag], [git])
+m4_define([xdt_version], [xdt_version_major().xdt_version_minor().xdt_version_micro()ifelse(xdt_version_nano(), [], [], [.xdt_version_nano()])ifelse(xdt_version_tag(), [git], [xdt_version_tag()-xdt_version_build()], [])])
 
 
 dnl # DO NOT MODIFY ANYTHING BELOW THIS LINE, UNLESS YOU KNOW WHAT
@@ -38,7 +38,7 @@ AC_SUBST([VERSION_MAJOR], [xdt_version_major])
 AC_SUBST([VERSION_MINOR], [xdt_version_minor])
 AC_SUBST([VERSION_MICRO], [xdt_version_micro])
 AC_SUBST([VERSION_NANO], [xdt_version_nano])
-VERSION_REVISION=ifelse(xdt_version_tag(), [svn], [xdt_version_tag()-xdt_version_build()], [])
+VERSION_REVISION=ifelse(xdt_version_tag(), [git], [xdt_version_tag()-xdt_version_build()], [])
 AC_SUBST([VERSION_REVISION])
 
 dnl ***************************



More information about the Xfce4-commits mailing list