X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=mk%2Fsuffix.mk;h=fd3b6c4130ab8ffaf19fd858cb772e812ae4fc1d;hb=7473349e010c1f8f5d78afbe2b7c66345818406c;hp=2e1bc8efeae5657b460554f0d43317c2e9c95baf;hpb=9546b1bcbb9686370ee67975ebf2791b5c5a97d6;p=ghc-hetmet.git diff --git a/mk/suffix.mk b/mk/suffix.mk index 2e1bc8e..fd3b6c4 100644 --- a/mk/suffix.mk +++ b/mk/suffix.mk @@ -234,18 +234,6 @@ endif $(FLEX) -t $(FLEX_OPTS) $< > $@ #----------------------------------------------------------------------------- -# Yacc stuff - -%.tab.c %.tab.h : %.y - @$(RM) $*.tab.h $*.tab.c y.tab.c y.tab.h y.output - $(YACC) $(YACC_OPTS) $< - $(MV) y.tab.c $*.tab.c - @chmod 444 $*.tab.c - $(MV) y.tab.h $*.tab.h - @chmod 444 $*.tab.h - - -#----------------------------------------------------------------------------- # Runtest rules for calling $(HC) on a single-file Haskell program %.runtest : %.hs @@ -340,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' > $@