]> git.decadent.org.uk Git - ion3-doc.git/blobdiff - Makefile
[svn-upgrade] Integrating new upstream version, ion3-doc (20080207)
[ion3-doc.git] / Makefile
index ca100586f9cff55fbd295a1f8d69729f3286297a..138a4ed64e3a0587a517eec97c5baf5b1a61bf15 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -19,20 +19,26 @@ FNTEXES=ioncore.exports mod_tiling.exports \
        mod_query.exports de.exports mod_menu.exports \
        mod_dock.exports mod_sp.exports mod_statusbar.exports
 
+RUBBER_DVI=rubber
+RUBBER_PS=rubber -p
+RUBBER_PDF=rubber -d
+
+TARGETS = ionconf ionnotes
+
 # Generic rules
 ######################################
 
 nothing:
        @ echo "Please read the README first."
 
-%.ps: %.dvi
-       dvips $<
-
-%.pdf: %.dvi
-       dvipdfm -p a4 $<
+%-dvi:
+       $(RUBBER_DVI) $*
+       
+%-ps:
+       $(RUBBER_PS) $*
 
-%.dvi: %.tex
-       latex $<
+%-pdf:
+       $(RUBBER_PDF) $*
 
 # Install
 ######################################
@@ -51,43 +57,34 @@ install:
 
 # ionconf rules
 ######################################
-ionconf-dvi-full:
-       latex ionconf
-       latex ionconf
-       latex ionconf
-       makeindex ionconf.idx
-       latex ionconf
-
-ionconf-html: 
-       $(L2H) -split 3 ionconf
 
-fntexes: $(FNTEXES)
+ionconf-dvi: fnlist.tex
+ionconf-ps: fnlist.tex
+ionconf-pdf: fnlist.tex
 
-ionconf-all: fntexes fnlist.tex ionconf-dvi-full ionconf-html
+ionconf-html: $(FNTEXES)
+       $(L2H) -split 3 ionconf
 
 # ionnotes rules
 ######################################
 
-ionnotes-dvi-full:
-       latex ionnotes
-       latex ionnotes
-       latex ionnotes
-       makeindex ionnotes.idx
-       latex ionnotes
-
 ionnotes-html: 
        $(L2H) -split 4 ionnotes
 
-ionnotes-all: ionnotes-dvi-full ionnotes-html
-
 # More generic rules
 ######################################
 
-all: ionconf-all ionnotes-all
+.PHONY: all all-dvi all-ps all-pdf all-html
+
+all: all-dvi all-ps all-pdf all-html
+
+all-dvi: $(patsubst %,%-dvi,$(TARGETS))
+
+all-ps: $(patsubst %, %-ps, $(TARGETS))
 
-all-ps: ionconf.ps ionnotes.ps
+all-pdf: $(patsubst %, %-pdf, $(TARGETS))
 
-all-pdf: ionconf.pdf ionnotes.pdf
+all-html: $(patsubst %, %-html, $(TARGETS))
 
 
 # Clean