From 8af72d7ed742716ba3d95d0bfa0810ecea78a300 Mon Sep 17 00:00:00 2001 From: ross Date: Fri, 8 Oct 2004 10:16:14 +0000 Subject: [PATCH] [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). --- ghc/includes/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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." -- 1.7.10.4