This patch fixes issue with version date processing on Solaris while using
Solaris' provided sed. I don't know sed enough to remove GNUism in version
date processing so I replaced sed usage in this task by few cut calls.
---
aclocal.m4 | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/aclocal.m4 b/aclocal.m4
index 0e72d22..d9ab580 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1116,7 +1116,11 @@ if test "$RELEASE" = "NO"; then
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/"`
+ tmp_ver_date=`git log -n 1 --date=short --pretty=format:%ci | cut -d '
' -f -1`
+ tmp_year=`echo $tmp_ver_date|cut -d '-' -f 1-1`
+ tmp_month=`echo $tmp_ver_date|cut -d '-' -f 2-2`
+ tmp_day=`echo $tmp_ver_date|cut -d '-' -f 3-3`
+ ver_date=`echo $tmp_year$tmp_month$tmp_day`
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])
--
1.7.4.3
_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc