1
1

Double check that "hg" is found on the system before trying to use

it.  If not found, insert a warning version string.

This commit was SVN r21946.
Этот коммит содержится в:
Jeff Squyres 2009-09-05 09:01:30 +00:00
родитель c81fee8ab3
Коммит b6d406f9c2

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

@ -75,13 +75,28 @@ m4_define([OMPI_GET_VERSION],[
if test "$$2_SVN_R" = "-1" ; then
m4_ifdef([AC_MSG_CHECKING],
[AC_MSG_CHECKING([for SVN version])])
d=`date '+%m-%d-%Y'`
if test -d "$srcdir/.svn" ; then
$2_SVN_R=r`svnversion "$srcdir"`
if test $? != 0; then
$2_SVN_R="unknown svn version (svnversion not found); $d"
fi
elif test -d "$srcdir/.hg" ; then
$2_SVN_R=hg`hg -v -R "$srcdir" tip | grep ^changeset: | head -n 1 | cut -d: -f3`
# Check to see if we can find the hg command
# (remember that $? reflects the status of the
# *last* command in a pipe change, so if "hg .. |
# cut ..." runs and "hg" is not found, $? will
# reflect the status of "cut", not hg not being
# found. So test for hg specifically first.
hg --version > /dev/null 2>&1
if test $? = 0; then
OMPI_SVN_R=hg`hg -v -R "$srcdir" tip | grep ^changeset: | head -n 1 | cut -d: -f3`
else
OMPI_SVN_R="unknown hg version (hg not found); $d"
fi
fi
if test "$2_SVN_R" = ""; then
$2_SVN_R=svn`date '+%m%d%Y'`
$2_SVN_R="svn$d"
fi
m4_ifdef([AC_MSG_RESULT],
[AC_MSG_RESULT([done])])