From 65fd4516b2c410f927337607254b46b5591dd85e Mon Sep 17 00:00:00 2001 From: wolfgang Date: Sat, 2 Oct 2004 15:12:49 +0000 Subject: [PATCH] [project @ 2004-10-02 15:12:48 by wolfgang] Deal with Apple's broken cpp 3.3 (you know, the one that inserts useless #pragma lines into it's output) by filtering it's output through grep -v. This shouldn't be a problem for other platforms, and it's much simpler than to make the parsers for ghc-pkg, genprimopcode and happy ignore those lines. MERGE TO STABLE --- mk/package.mk | 4 +++- mk/suffix.mk | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/mk/package.mk b/mk/package.mk index e81e7ce..ab6453b 100644 --- a/mk/package.mk +++ b/mk/package.mk @@ -1,5 +1,5 @@ # ----------------------------------------------------------------------------- -# $Id: package.mk,v 1.38 2004/03/27 09:57:58 panne Exp $ +# $Id: package.mk,v 1.39 2004/10/02 15:12:48 wolfgang Exp $ ifneq "$(PACKAGE)" "" @@ -24,10 +24,12 @@ endif package.conf.inplace : package.conf.in $(CPP) $(RAWCPP_FLAGS) -P $(PKGCONF_CPP_EXTRA_OPTS) -x c $(PACKAGE_CPP_OPTS) $< | \ + grep -v '^#pragma GCC' | \ sed -e 's/""//g' -e 's/\[ *,/[ /g' >$@ package.conf.installed : package.conf.in $(CPP) $(RAWCPP_FLAGS) -P $(PKGCONF_CPP_EXTRA_OPTS) -DINSTALLING -x c $(PACKAGE_CPP_OPTS) $< | \ + grep -v '^#pragma GCC' | \ sed -e 's/""//g' -e 's/\[ *,/[ /g' >$@ # we could be more accurate here and add a dependency on diff --git a/mk/suffix.mk b/mk/suffix.mk index fa76355..8792d3c 100644 --- a/mk/suffix.mk +++ b/mk/suffix.mk @@ -362,4 +362,5 @@ endif % : %.pp @$(RM) $@ - $(CPP) $(RAWCPP_FLAGS) -P $(CPP_OPTS) -x c $< > $@ + $(CPP) $(RAWCPP_FLAGS) -P $(CPP_OPTS) -x c $< | \ + grep -v '^#pragma GCC' > $@ -- 1.7.10.4