From: simonmar Date: Thu, 11 Dec 2003 11:23:24 +0000 (+0000) Subject: [project @ 2003-12-11 11:23:24 by simonmar] X-Git-Tag: Approx_11550_changesets_converted~205 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=87bf5c65a7b9dec4a753960a587ccfce9215a6a1;p=ghc-hetmet.git [project @ 2003-12-11 11:23:24 by simonmar] Hacking in the .pp suffix rule: leave #include directives in place. --- diff --git a/mk/suffix.mk b/mk/suffix.mk index 3fddbd8..fd3b6c4 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' > $@