From 7003cd045e599db4adf145a80b19e1982d00495e Mon Sep 17 00:00:00 2001 From: Kolja Waschk Date: Sun, 9 Dec 2007 18:59:06 +0000 Subject: [PATCH] Fixed taking revision from ChangeLog if "svn" isn't installed git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@829 b68d4a1b-bc3d-0410-92ed-d4ac073336b7 --- jtag/configure.ac | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/jtag/configure.ac b/jtag/configure.ac index 23b1642a..ae5aa1b8 100644 --- a/jtag/configure.ac +++ b/jtag/configure.ac @@ -32,12 +32,13 @@ dnl get svn revision SVN=`which svn` if test -n "$SVN" -a -x "$SVN"; then SVN_REVISION=`LC_ALL=C svn info | awk '/^Revision: / {printf "%d\n", $2}'` -else if test -e "ChangeLog"; then - SVN_REVISION=`cat ChangeLog | awk '/^Revision: / {printf "%d\n", $2}'` -else - SVN_REVISION=`echo '$Revision$' | awk '/^Revision: / {printf "%d\n", $2}'` -fi fi - +fi +if test -z "$SVN_REVISION" -a -e "ChangeLog"; then + SVN_REVISION=`cat ChangeLog | awk '/Revision: / {printf "%d\n", $2}'` +fi +if test -z "$SVN_REVISION" ; then + SVN_REVISION=0 +fi AC_DEFINE_UNQUOTED([SVN_REVISION], "$SVN_REVISION", [subversion revision number]) AC_SUBST([SVN_REVISION])