There really is no point in having --enable-build-dist, anyone building a dist

will have a .svn dir which triggers svnversion to run in order to define
BUILD_SVN_REVISION.  After that it's a simple echo to generate svn_revision
rather than running svnversion _twice_ when --enable-build-dist is used.

Originally committed to SVN as r2713.
This commit is contained in:
Amar Takhar 2009-01-29 03:56:23 +00:00
parent 61cce1260d
commit 6bbb5cafaf

View file

@ -160,16 +160,12 @@ PKG_PROG_PKG_CONFIG([pkgconfig_required_version])
#################
AM_MAINTAINER_MODE
AC_ARG_ENABLE(build-dist)
if test "$enable_build_dist" = "yes"; then
`svnversion $srcdir | sed "s/\(^@<:@0-9@:>@*\).*/\1/" > $srcdir/svn_revision`
fi
# XXX: This needs to be fixed to handle mixed revisions properly
# There is probably a better way to handle it as well.
AC_MSG_CHECKING([for svn version])
if test -d "$srcdir/.svn"; then
SVN_REVISION=`svnversion $srcdir | sed "s/\(^@<:@0-9@:>@*\).*/\1/"`
`echo $SVN_REVISION > $srcdir/svn_revision`
AC_MSG_RESULT([$SVN_REVISION from "svnversion $srcdir"])
elif test -f "$srcdir/svn_revision"; then
SVN_REVISION=`cat $srcdir/svn_revision`