summaryrefslogtreecommitdiff
path: root/aclocal.m4
diff options
context:
space:
mode:
authorSylvain Henry <sylvain@haskus.fr>2018-10-29 19:02:45 +0100
committerKrzysztof Gogolewski <krz.gogolewski@gmail.com>2018-10-29 23:12:05 +0100
commit66cb344dc70d447d2d1c8bc3865bc5a8e68a8656 (patch)
treea6cc91b6939cba0820874e84c314934858496a9f /aclocal.m4
parent78fb31077e58d949ea644c9d51abe53de9a9d2cb (diff)
downloadhaskell-66cb344dc70d447d2d1c8bc3865bc5a8e68a8656.tar.gz
Correctly detect GIT in a subtree
When we use a git subtree, .git is a file, not a directory. The script was already fixed for the commit ID but not for its date. PR: https://github.com/ghc/ghc/pull/212/
Diffstat (limited to 'aclocal.m4')
-rw-r--r--aclocal.m42
1 files changed, 1 insertions, 1 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index 55b4162774..18e0d7e5b3 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1536,7 +1536,7 @@ 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
+ elif test -e .git; then
changequote(, )dnl
ver_posixtime=`git log -1 --pretty=format:%ct`
ver_date=`perl -MPOSIX -e "print strftime('%Y%m%d', gmtime($ver_posixtime));"`