summaryrefslogtreecommitdiff
path: root/mk/suffix.mk
diff options
context:
space:
mode:
authorsimonmar <unknown>2003-12-11 11:23:24 +0000
committersimonmar <unknown>2003-12-11 11:23:24 +0000
commit87bf5c65a7b9dec4a753960a587ccfce9215a6a1 (patch)
treeab1c51c66352e9dfadc404bdcd06b07be69c9c5f /mk/suffix.mk
parent2b3bb2f22b36d73536eea84182e59d7c99e03633 (diff)
downloadhaskell-87bf5c65a7b9dec4a753960a587ccfce9215a6a1.tar.gz
[project @ 2003-12-11 11:23:24 by simonmar]
Hacking in the .pp suffix rule: leave #include directives in place.
Diffstat (limited to 'mk/suffix.mk')
-rw-r--r--mk/suffix.mk7
1 files changed, 6 insertions, 1 deletions
diff --git a/mk/suffix.mk b/mk/suffix.mk
index 3fddbd8254..fd3b6c4130 100644
--- a/mk/suffix.mk
+++ b/mk/suffix.mk
@@ -328,6 +328,11 @@ 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).
+
% : %.pp
@$(RM) $@
- $(CPP) $(RAWCPP_FLAGS) $(CPP_OPTS) -x c $< | $(SED) -e '/^#/d' > $@
+ $(CPP) $(RAWCPP_FLAGS) $(CPP_OPTS) -x c $< | $(SED) -e '/^#[^i]/d' > $@