DarcsConversion: aclocal.m4.compat.patch

File aclocal.m4.compat.patch, 1.6 KB (added by guest, 6 years ago)

aclocal.m4 with darcs >and< git compatability

  • aclocal.m4

    diff --git a/aclocal.m4 b/aclocal.m4
    index 3f0ec00..f739bfe 100644
    a b if test "$RELEASE" = "NO"; then 
    988988    if test -f VERSION_DATE; then 
    989989        PACKAGE_VERSION=${PACKAGE_VERSION}.`cat VERSION_DATE` 
    990990        AC_MSG_RESULT(given $PACKAGE_VERSION) 
     991    elif test -d .git; then 
     992        changequote(, )dnl 
     993        ver_date=`git log -n 1 --date=short --pretty=format:%ci | sed "s/^.*\([0-9][0-9][0-9][0-9]\)-\([0-9][0-9]\)-\([0-9][0-9]\).*$/\1\2\3/"` 
     994        if echo $ver_date | grep '^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]$' 2>&1 >/dev/null; then true; else 
     995        changequote([, ])dnl 
     996                AC_MSG_ERROR([failed to detect version date: check that git is in your path]) 
     997        fi 
     998        PACKAGE_VERSION=${PACKAGE_VERSION}.$ver_date 
     999        AC_MSG_RESULT(inferred $PACKAGE_VERSION) 
    9911000    elif test -d _darcs; then 
     1001        # TODO: Remove this branch after conversion to Git 
    9921002        changequote(, )dnl 
    9931003        ver_date=`darcs changes --quiet --no-summary --xml | head -500 | grep 'date=' | sed "s/^.*date='\([0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]\).*$/\1/g" | sort -n | tail -1` 
    9941004        if echo $ver_date | grep '^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]$' 2>&1 >/dev/null; then true; else 
    if test "$RELEASE" = "NO"; then 
    10011011        PACKAGE_VERSION=`cat VERSION` 
    10021012        AC_MSG_RESULT(given $PACKAGE_VERSION) 
    10031013    else 
    1004         AC_MSG_WARN([cannot determine snapshot version: no _darcs directory and no VERSION file]) 
     1014        AC_MSG_WARN([cannot determine snapshot version: no .git or _darcs directory and no VERSION file]) 
    10051015    fi 
    10061016fi 
    10071017