X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=mk%2Fsuffix.mk;h=60308b31dee878606dd7814ec9dba2a844409c4d;hb=e940363a7b70bc3373ebebeff5fe5075b5b141ec;hp=96a04033f2df532abf23cb85f41f4d71bb21c65a;hpb=57c3ca2603ef0f2358d8d246bff1dd47ef97e843;p=ghc-hetmet.git diff --git a/mk/suffix.mk b/mk/suffix.mk index 96a0403..60308b3 100644 --- a/mk/suffix.mk +++ b/mk/suffix.mk @@ -84,14 +84,14 @@ ifneq "$(BootingFromHc)" "YES" %.$(way_)hi : %.$(way_)o @if [ ! -f $@ ] ; then \ - echo Panic! $< exists, but $@ does not. \ + echo Panic! $< exists, but $@ does not.; \ exit 1; \ else exit 0 ; \ fi %.$(way_)hi : %.$(way_)hc @if [ ! -f $@ ] ; then \ - echo Panic! $< exists, but $@ does not. \ + echo Panic! $< exists, but $@ does not.; \ exit 1; \ else exit 0 ; \ fi @@ -114,7 +114,8 @@ endif # BootingViaC # ifneq "$(BootingFromHc)" "YES" %_hsc.c %_hsc.h %.hs : %.hsc - $(HSC2HS) $< + $(HSC2HS) $(HSC2HS_OPTS) $< + @touch $(patsubst %.hsc,%_hsc.c,$<) endif #----------------------------------------------------------------------------- @@ -227,6 +228,8 @@ endif # $(JADE) -t sgml -V html-index -d $(SGMLSTYLESHEET) -c $(DOCBOOK_CATALOG) $< # $(PERL) $(COLLATEINDEX) -N -o index.sgml $(SGML2HTML) $(SGML2HTML_OPTS) $< +# touch the .html file so that it is seen to be built + @touch $@ %.html : %.tex @$(RM) $@ @@ -270,3 +273,10 @@ endif %.$(way_)o : %.$(way_)rc @$(RM) $@ windres $< $@ + +#----------------------------------------------------------------------------- +# Preprocessor suffix rule + +% : %.pp + rm -f $@ + $(CPP) $(CPP_OPTS) -x c $< | $(SED) -e '/^#/d' > $@