configure: Run "svn info" with "-R" to get revision.

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@837 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Kolja Waschk 17 years ago
parent 5b85a14f65
commit cd4890255c

@ -1,3 +1,7 @@
2007-12-13 Kolja Waschk <kawk>
* configure.ac: Run "svn info" with "-R" to get latest revision
2007-12-12 Arnim Laeuger <arniml@users.sourceforge.net>
* data/Makefile.am (nobase_dist_pkgdata_DATA): add missing '\', fixes

@ -29,15 +29,23 @@ AC_REVISION($Revision$)
# Get SVN Revision - idea from xfce-power-manager (C) 2007 by B.Tarricone
dnl get svn revision
AC_MSG_CHECKING([code revision])
SVN=`which svn`
SVN_REVISION=0
if test -n "$SVN" -a -x "$SVN"; then
SVN_REVISION=`LC_ALL=C svn info | awk '/^Revision: / {printf "%d\n", $2}'`
SVN_REVISION=`LC_ALL=C svn info -R | awk 'BEGIN { x=0 } /^Revision: / { if($2>x) x=$2; } END { printf "%d\n",x }'`
if test "$SVN_REVISION" -ne "0" ; then
AC_MSG_RESULT([from svn info: $SVN_REVISION])
fi
fi
if test -z "$SVN_REVISION" -a -e "ChangeLog"; then
SVN_REVISION=`cat ChangeLog | awk '/Revision: / {printf "%d\n", $2}'`
if test "$SVN_REVISION" -eq 0 -a -e "ChangeLog"; then
SVN_REVISION=`awk 'BEGIN { x=0 } /Revision: / { if($2>x) x=$2; } END { printf "%d\n",x }' ChangeLog`
if test "$SVN_REVISION" -ne "0" ; then
AC_MSG_RESULT([from ChangeLog: $SVN_REVISION])
fi
fi
if test -z "$SVN_REVISION" ; then
SVN_REVISION=0
if test "$SVN_REVISION" -eq "0" ; then
AC_MSG_RESULT([unknown, using 0])
fi
AC_DEFINE_UNQUOTED([SVN_REVISION], "$SVN_REVISION", [subversion revision number])
AC_SUBST([SVN_REVISION])

Loading…
Cancel
Save