# Haskell Suffix Rules
HASKELL_SPLIT_PRE= \
- $(RM) $@ ; if [ ! -d $(basename $@) ]; then mkdir $(basename $@) ; else exit 0; fi; \
- find $(basename $@) -name '*.$(way_)o' -print | xargs $(RM) __rm_food;
+ $(RM) $@ ; if [ ! -d $(basename $@) ]; then mkdir $(basename $@); else \
+ find $(basename $@) -name '*.$(way_)o' -print | xargs $(RM) __rm_food ; fi
HASKELL_SPLIT_POST= touch $@
HASKELL_PRE_COMPILE=$(patsubst %,$(HASKELL_SPLIT_PRE),$(filter -split-objs,$(HC_OPTS)))
HASKELL_POST_COMPILE=$(patsubst %,$(HASKELL_SPLIT_POST),$(filter -split-objs,$(HC_OPTS)))
#-----------------------------------------------------------------------------
# Runtest rules for calling $(HC) on a single-file Haskell program
-%.hs : %.runtest
- $(TIME) $(RUNTEST) $(HC) $(RUNTEST_FLAGS) -o2 $*.stderr $<
-
+%.runtest : %.hs
+ $(TIME) $(RUNTEST) $(HC) $(RUNTEST_OPTS) $<
#-----------------------------------------------------------------------------
# Doc processing suffix rules
-
+#
+# ToDo: make these more robust
+#
%.dvi : %.tex
@$(RM) $@
$(LTX) $<
fig2dev -L latex $< $@
#-----------------------------------------------------------------------------
+# SGML suffix rules
+#
+# make sure these don't conflict with the literate rules!
+
+%.sgml : %.vsgml
+ @$(RM) $@
+ expand $*.verb | $(SGMLVERB) > $@
+
+%.dvi : %.sgml
+ @$(RM) $@
+ $(SGML2LATEX) -m --output=dvi $<
+
+%.html : %.sgml
+ @$(RM) $@
+ $(SGML2HTML) $<
+
+%.info : %.sgml
+ @$(RM) $@
+ $(SGML2INFO) $<
+
+%.txt : %.sgml
+ @$(RM) $@
+ $(SGML2TXT) $<
+
+#-----------------------------------------------------------------------------
# Literate suffix rules
# ToDo: somehow macroize this lot. (if only!)