[project @ 2004-10-02 15:12:48 by wolfgang]
authorwolfgang <unknown>
Sat, 2 Oct 2004 15:12:49 +0000 (15:12 +0000)
committerwolfgang <unknown>
Sat, 2 Oct 2004 15:12:49 +0000 (15:12 +0000)
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
mk/suffix.mk

index e81e7ce..ab6453b 100644 (file)
@@ -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
index fa76355..8792d3c 100644 (file)
@@ -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' > $@