[project @ 2004-02-10 17:54:50 by simonpj]
[ghc-hetmet.git] / mk / suffix.mk
index 2e1bc8e..a975c5d 100644 (file)
@@ -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,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 $< > $@