diff options
author | Max Bolingbroke <batterseapower@hotmail.com> | 2008-08-06 21:02:07 +0000 |
---|---|---|
committer | Max Bolingbroke <batterseapower@hotmail.com> | 2008-08-06 21:02:07 +0000 |
commit | 99daef874ab8f0c3b1d1ec1888d6bb6d368a4b79 (patch) | |
tree | 396d0ccfd2dbdc1151c7cb96630459ccc28ba5be /aclocal.m4 | |
parent | d1984e439154e95b2804ee83897e740b1713c53d (diff) | |
download | haskell-99daef874ab8f0c3b1d1ec1888d6bb6d368a4b79.tar.gz |
Prepare GHC for building with Git
* New packages format lets you select source control system in use
* Packages file now includes root repo explicitly
* Scripts darcs-all and push-all updated for the new packages format only
* New sync-all script, intended for use after Git changeover and for buildbots right now
* Had to remove libraries/bootstrapping from tree since Git cannot track empty directories without a hack
* Determine checkout date with Git using Darcs fallback in aclocal.m4
Diffstat (limited to 'aclocal.m4')
-rw-r--r-- | aclocal.m4 | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/aclocal.m4 b/aclocal.m4 index 3f0ec004fc..f739bfe3f1 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -988,7 +988,17 @@ if test "$RELEASE" = "NO"; then if test -f VERSION_DATE; then PACKAGE_VERSION=${PACKAGE_VERSION}.`cat VERSION_DATE` AC_MSG_RESULT(given $PACKAGE_VERSION) + elif test -d .git; then + changequote(, )dnl + 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/"` + 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 + changequote([, ])dnl + AC_MSG_ERROR([failed to detect version date: check that git is in your path]) + fi + PACKAGE_VERSION=${PACKAGE_VERSION}.$ver_date + AC_MSG_RESULT(inferred $PACKAGE_VERSION) elif test -d _darcs; then + # TODO: Remove this branch after conversion to Git changequote(, )dnl 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` 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 @@ -1001,7 +1011,7 @@ if test "$RELEASE" = "NO"; then PACKAGE_VERSION=`cat VERSION` AC_MSG_RESULT(given $PACKAGE_VERSION) else - AC_MSG_WARN([cannot determine snapshot version: no _darcs directory and no VERSION file]) + AC_MSG_WARN([cannot determine snapshot version: no .git or _darcs directory and no VERSION file]) fi fi |