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
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
-# $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 $
package.conf.inplace : package.conf.in
$(CPP) $(RAWCPP_FLAGS) -P $(PKGCONF_CPP_EXTRA_OPTS) -x c $(PACKAGE_CPP_OPTS) $< | \
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) $< | \
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
sed -e 's/""//g' -e 's/\[ *,/[ /g' >$@
# we could be more accurate here and add a dependency on
- $(CPP) $(RAWCPP_FLAGS) -P $(CPP_OPTS) -x c $< > $@
+ $(CPP) $(RAWCPP_FLAGS) -P $(CPP_OPTS) -x c $< | \
+ grep -v '^#pragma GCC' > $@