1
1

configury: fix git describe with VPATH

Этот коммит содержится в:
Gilles Gouaillardet 2014-12-22 15:14:33 +09:00
родитель f6da257477
Коммит 30cde04139

Просмотреть файл

@ -12,6 +12,8 @@ dnl Copyright (c) 2004-2005 The Regents of the University of California.
dnl All rights reserved.
dnl Copyright (c) 2008-2014 Cisco Systems, Inc. All rights reserved.
dnl Copyright (c) 2014 Intel, Inc. All rights reserved.
dnl Copyright (c) 2014 Research Organization for Information Science
dnl and Technology (RIST). All rights reserved.
dnl $COPYRIGHT$
dnl
dnl Additional copyrights may follow
@ -79,7 +81,15 @@ m4_define([OPAL_GET_VERSION],[
# If we're in a git repo and we found the git command, use
# git describe to get the repo rev
if test -d "$srcdir/.git" && test $git_happy -eq 1; then
$2_REPO_REV=`git describe --tags --always`
if test "$srcdir" != "`pwd`"; then
git_save_dir=`pwd`
cd $srcdir
$2_REPO_REV=`git describe --tags --always`
cd $git_save_dir
unset git_save_dir
else
$2_REPO_REV=`git describe --tags --always`
fi
else
$2_REPO_REV="date`date '+%Y-%m-%d'`"
fi