Generate Postscript and PDF versions of documents.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 5 Apr 2012 14:22:18 +0000 (15:22 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Tue, 10 Apr 2012 10:04:08 +0000 (11:04 +0100)
.gitignore
Makefile.m4

index 53d147c..74e44b3 100644 (file)
@@ -8,6 +8,9 @@
 *.ind
 *.log
 *.lot
+*.out
+*.ps
+*.pdf
 *.sty
 *.thm
 *.tmp
index cfb7e1f..c610da7 100644 (file)
@@ -1,4 +1,4 @@
-## -*-makefile-*-
+## -*-m4-*-
 ##
 ## Build system for strayman
 ##
@@ -34,6 +34,8 @@ define(`BASE', `strayman')
 AUX = gpl.tex strayman.cls
 SRC = addsuffix(BASE, `.dtx')
 DVI = addsuffix(BASE, `.dvi')
+PS = addsuffix(BASE, `.ps')
+PDF = addsuffix(BASE, `.pdf')
 OBJ = \
        strayman.8pt \
        strayman.9pt \
@@ -44,17 +46,18 @@ OBJ = \
        strayman.cls
 
 pkglatex_DATA = $(OBJ)
-pkgdoc_DATA = $(DVI)
+pkgdoc_DATA = $(DVI) $(PS) $(PDF)
 
-SUFFIXES = .dtx .tex .dvi
+SUFFIXES = .dtx .tex .dvi .ps .pdf
 define(`run_latex', `latex "\def\indexing{n} \nonstopmode \input $<"
        latex "\def\indexing{y} \nonstopmode \input $<"
        makeindex -s gind.ist $`'*.idx
        latex "\def\indexing{n} \nonstopmode \input $<"')
 
 $(DVI): $(AUX)
-.dtx.dvi:
-       run_latex
+.dtx.dvi:; run_latex
+.dvi.ps:; dvips $<
+.ps.pdf:; ps2pdf $< $@
 
 $(OBJ): $(SRC) strayman.ins
        tex strayman.ins
@@ -62,7 +65,7 @@ $(OBJ): $(SRC) strayman.ins
 EXTRA_DIST = $(SRC) $(AUX) $(DVI) $(OBJ) strayman.ins Makefile.m4
 
 MAINTAINERCLEANFILES = $(OBJ) $(DVI)
-CLEANFILES = *.tmp *.aux *.idx *.ilg *.log *.toc *.ind *.lot *.ans
+CLEANFILES = *.tmp *.aux *.idx *.ilg *.log *.toc *.ind *.lot *.ans *.ps *.pdf
 
 Makefile.am: Makefile.m4
        cd $(srcdir) && m4 Makefile.m4 >Makefile.am