On Mon, Apr 18, 2011 at 09:10:28AM +0200, Karel Gardas wrote:
> >Apart from this, a much simpler version (using cut, inspired by
> >your diff, but also tr) may be:
> >
> > git log -n 1 --date=short --pretty=format:%ci | cut -d ' ' -f 1 | tr
> > -d -
> >
> >Does this work on Solaris?
>
> Great! This works too and is way much nicer than my original attempt to
> fix it.
So the attached patch should be tested on some other systems (at
least the outcome of configure on OpenBSD still looks correct).
Ciao,
Kili
>From 9594339a9286f550addc592083de07e89d14dd62 Mon Sep 17 00:00:00 2001
From: Matthias Kilian <[email protected]>
Date: Mon, 18 Apr 2011 23:59:51 +0200
Subject: [PATCH] do not use sed for version date processing but rather cut and
tr
Based on an idea from Karel Gardas, who had troubles with the original
sed version (which didn't work with /usr/bin/sed on Solaris).
---
aclocal.m4 | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/aclocal.m4 b/aclocal.m4
index 0e72d22..ed3d006 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1116,7 +1116,7 @@ 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/"`
+ ver_date=`git log -n 1 --date=short --pretty=format:%ci | cut -d ' '
-f 1 | tr -d -`
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.3.5
_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc