X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=mk%2Fsuffix.mk;h=a975c5d83348215207469118c344d778d38eacb4;hb=ea79fe9020185332b7c79134f7bdb0f1bc5f1857;hp=b3bc8fcd53eac86669dc68040b1cc6257125f162;hpb=8e57a9c2bc401b55ed154c587d0bedae58be001b;p=ghc-hetmet.git diff --git a/mk/suffix.mk b/mk/suffix.mk index b3bc8fc..a975c5d 100644 --- a/mk/suffix.mk +++ b/mk/suffix.mk @@ -140,6 +140,13 @@ endif # BootingFromHc $(HAPPY) $(HAPPY_OPTS) $< #----------------------------------------------------------------------------- +# Alex Suffix Rules +# + +%.hs : %.x + $(ALEX) $(ALEX_OPTS) $< + +#----------------------------------------------------------------------------- # hsc2hs Suffix Rules # ifneq "$(BootingFromHc)" "YES" @@ -227,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 @@ -333,6 +328,9 @@ endif #----------------------------------------------------------------------------- # Preprocessor suffix rule +# 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 '/^#/d' > $@ + $(CPP) $(RAWCPP_FLAGS) -P $(CPP_OPTS) -x c $< > $@