From: ross Date: Fri, 8 Oct 2004 10:16:14 +0000 (+0000) Subject: [project @ 2004-10-08 10:16:14 by ross] X-Git-Tag: Initial_conversion_from_CVS_complete~1521 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=8af72d7ed742716ba3d95d0bfa0810ecea78a300;p=ghc-hetmet.git [project @ 2004-10-08 10:16:14 by ross] Make the sed command turning '#define PACKAGE_FOO "blah"' into '/* #undef PACKAGE_FOO */' more portable, though a tad less precise. The use of \| deep inside the pattern is a GNU extension (from sed 2.05). --- diff --git a/ghc/includes/Makefile b/ghc/includes/Makefile index 13528c5..b32efa2 100644 --- a/ghc/includes/Makefile +++ b/ghc/includes/Makefile @@ -1,5 +1,5 @@ # ----------------------------------------------------------------------------- -# $Id: Makefile,v 1.24 2004/09/19 09:15:03 panne Exp $ +# $Id: Makefile,v 1.25 2004/10/08 10:16:14 ross Exp $ # TOP = .. @@ -74,7 +74,7 @@ endif @echo "#define $(TargetVendor_CPP)_TARGET_VENDOR 1" >> $@ @echo "#define $(BuildVendor_CPP)_BUILD_VENDOR 1" >> $@ # Turn '#define PACKAGE_FOO "blah"' into '/* #undef PACKAGE_FOO */'. - @sed 's,^\([ ]*\)#[ ]*define[ ][ ]*\(PACKAGE_BUGREPORT\|PACKAGE_NAME\|PACKAGE_STRING\|PACKAGE_TARNAME\|PACKAGE_VERSION\)[ ].*$$,\1/* #undef \2 */,' $(FPTOOLS_TOP)/mk/config.h >> $@ + @sed 's,^\([ ]*\)#[ ]*define[ ][ ]*\(PACKAGE_[A-Z]*\)[ ][ ]*".*".*$$,\1/* #undef \2 */,' $(FPTOOLS_TOP)/mk/config.h >> $@ @echo "#endif /* __GHCCONFIG_H__ */" >> $@ @echo "Done."