#! /bin/sh
srcdir=@abs_srcdir@
PACKAGE=@PACKAGE@
VERSION=@VERSION@

if test -f $srcdir/.git/HEAD; then
    GIT_REPO="$srcdir/.git"
    GIT_HEAD_ID=`GIT_DIR=$GIT_REPO git describe`
elif test -f $srcdir/CLOOG_HEAD; then
    GIT_HEAD_ID=`cat $srcdir/CLOOG_HEAD`
else
    GIT_HEAD_ID="$PACKAGE-$VERSION-UNKNOWN"
fi

echo $GIT_HEAD_ID | sed -e 's/cloog-//'

#! /bin/sh
srcdir=@abs_srcdir@
PACKAGE=@PACKAGE@
VERSION=@VERSION@

if test -f $srcdir/.git/HEAD; then
    GIT_REPO="$srcdir/.git"
    GIT_HEAD_ID="$PACKAGE-$VERSION-`GIT_DIR=$GIT_REPO git rev-parse --short HEAD`"
elif test -f $srcdir/CLOOG_HEAD; then
    GIT_HEAD_ID=`cat $srcdir/CLOOG_HEAD`
else
    GIT_HEAD_ID="$PACKAGE-$VERSION-UNKNOWN"
fi

echo $GIT_HEAD_ID | sed -e 's/cloog-//'

Use git option rev-parse instead of non-working option describe in genversion
Use git option rev-parse instead of non-working option describe in genversion
