[project @ 2004-02-10 17:54:50 by simonpj]
[ghc-hetmet.git] / mk / suffix.mk
index fd3b6c4..a975c5d 100644 (file)
@@ -328,11 +328,9 @@ endif
 #-----------------------------------------------------------------------------
 # Preprocessor suffix rule
 
-# We're careful to remove cpp-droppings from the generated file; things like
-# '#line' pragmas.  But we also leave in #include directives, because these
-# are likely to be intentional (perhaps the file is going to be CPP'd again -
-# this is used by ghc/compiler/parser/Parser.y.pp).
+# Note use of -P option to prevent #line pragmas being left in the CPP
+# output.
 
 % : %.pp
        @$(RM) $@
-       $(CPP) $(RAWCPP_FLAGS) $(CPP_OPTS) -x c $< | $(SED) -e '/^#[^i]/d' > $@
+       $(CPP) $(RAWCPP_FLAGS) -P $(CPP_OPTS) -x c $< > $@