diff options
author | Ulrich Müller <ulm@gentoo.org> | 2015-08-22 16:46:48 +0200 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2015-08-22 16:46:48 +0200 |
commit | ca0a7692f607a3787d3d9fc38142a3822d3c59a9 (patch) | |
tree | 1f2e3af3f41206bdab140f681c5c08c6ebe05f7e /configure.ac | |
parent | Update version to 1.4.5. (diff) | |
download | eselect-ca0a7692f607a3787d3d9fc38142a3822d3c59a9.tar.gz eselect-ca0a7692f607a3787d3d9fc38142a3822d3c59a9.tar.bz2 eselect-ca0a7692f607a3787d3d9fc38142a3822d3c59a9.zip |
Fix revision detection for out-of-tree builds.
* configure.ac (EXTRAVERSION): Fix detection of git revision
for out-of-tree builds.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 5 |
1 files changed, 3 insertions, 2 deletions
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 |