[project @ 2004-10-01 03:52:57 by wolfgang]
authorwolfgang <unknown>
Fri, 1 Oct 2004 03:52:57 +0000 (03:52 +0000)
committerwolfgang <unknown>
Fri, 1 Oct 2004 03:52:57 +0000 (03:52 +0000)
Replace \? by \{0,1\} in the sed regular expressions, as the former
does not work with Mac OS X's (= BSD's) sed.

I'm a bit confused by the situation here:
According to Mac OS X man pages, the latter syntax is part of the
POSIX 1003.2 standard for basic regular expressions, while the former
is not. According to the manpage installed with my Gentoo linux, neither
is in the POSIX standard.

However, GNU sed accepts both \? and \{0,1\}, while Mac OS X's sed accepts
only \{0,1\}.

ghc/aclocal.m4

index a871c1a..ed54156 100644 (file)
@@ -7,10 +7,10 @@ AC_SUBST([ProjectNameShort], [$PACKAGE_TARNAME])
 AC_SUBST([ProjectVersion], [$PACKAGE_VERSION])
 
 # Split PACKAGE_VERSION into (possibly empty) parts
-VERSION_MAJOR=`echo $PACKAGE_VERSION | sed 's/^\(@<:@^.@:>@*\)\(\.\?\(.*\)\)$/\1'/`
-VERSION_TMP=`echo $PACKAGE_VERSION | sed 's/^\(@<:@^.@:>@*\)\(\.\?\(.*\)\)$/\3'/`
-VERSION_MINOR=`echo $VERSION_TMP | sed 's/^\(@<:@^.@:>@*\)\(\.\?\(.*\)\)$/\1'/`
-ProjectPatchLevel=`echo $VERSION_TMP | sed 's/^\(@<:@^.@:>@*\)\(\.\?\(.*\)\)$/\3'/`
+VERSION_MAJOR=`echo $PACKAGE_VERSION | sed 's/^\(@<:@^.@:>@*\)\(\.\{0,1\}\(.*\)\)$/\1'/`
+VERSION_TMP=`echo $PACKAGE_VERSION | sed 's/^\(@<:@^.@:>@*\)\(\.\{0,1\}\(.*\)\)$/\3'/`
+VERSION_MINOR=`echo $VERSION_TMP | sed 's/^\(@<:@^.@:>@*\)\(\.\{0,1\}\(.*\)\)$/\1'/`
+ProjectPatchLevel=`echo $VERSION_TMP | sed 's/^\(@<:@^.@:>@*\)\(\.\{0,1\}\(.*\)\)$/\3'/`
 
 # Calculate project version as an integer, using 2 digits for minor version
 case $VERSION_MINOR in