commit: ca0a7692f607a3787d3d9fc38142a3822d3c59a9 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> AuthorDate: Sat Aug 22 14:46:48 2015 +0000 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> CommitDate: Sat Aug 22 14:46:48 2015 +0000 URL: https://gitweb.gentoo.org/proj/eselect.git/commit/?id=ca0a7692
Fix revision detection for out-of-tree builds. * configure.ac (EXTRAVERSION): Fix detection of git revision for out-of-tree builds. ChangeLog | 5 +++++ configure.ac | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5e5e0d5..da5fefd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-08-22 Ulrich Müller <[email protected]> + + * configure.ac (EXTRAVERSION): Fix detection of git revision + for out-of-tree builds. + 2015-08-13 Ulrich Müller <[email protected]> * configure.ac: Update version to 1.4.5. diff --git a/configure.ac b/configure.ac index a18f14e..8f38759 100644 --- a/configure.ac +++ b/configure.ac @@ -77,8 +77,9 @@ AC_SUBST(EPREFIX) # Include extra version information when building from git AC_MSG_CHECKING([whether building from git]) EXTRAVERSION="" -if test -d ${GIT_DIR:-.git}; then - COMMIT=`git describe --long --always HEAD` +eselect_git_dir=${GIT_DIR:-${srcdir}/.git} +if test -d "${eselect_git_dir}"; then + COMMIT=`GIT_DIR="${eselect_git_dir}" git describe --long --always HEAD` if test x$COMMIT != x; then EXTRAVERSION=", git commit $COMMIT" fi
