Add a slightly cleaned-up version of the paper, superseding the "notes"
[match/match.git] / paper / Makefile
diff --git a/paper/Makefile b/paper/Makefile
new file mode 100644 (file)
index 0000000..11b16fd
--- /dev/null
@@ -0,0 +1,40 @@
+figures = flow
+inputs = 
+
+all: paper.pdf #paper.ps
+
+.DELETE_ON_ERROR:
+
+paper.pdf: $(inputs) $(addsuffix .pdf_t,$(figures)) $(addsuffix .pdf,$(figures))
+# Note: paper.dvi refers to the PostScript figures by filename instead of
+# embedding them.  The figures are read once when the references are placed in
+# paper.dvi and again when the figures are embedded in streaming.ps, so we
+# list them as prerequisites of both files.
+paper.dvi: $(inputs) $(addsuffix .pstex_t,$(figures)) $(addsuffix .pstex,$(figures))
+paper.ps: $(addsuffix .pstex,$(figures))
+
+# TeX compiling rules
+%.pdf: %.tex
+# Avoid writing the file in place because that seems to make evince crash.
+       rm -f $@
+       ./retex pdflatex $*
+%.dvi: %.tex
+       retex latex $*
+%.ps: %.dvi
+       dvips $< -o $@
+
+# Figure exporting rules (equivalent to Xfig's export command)
+%.pdf: %.fig
+# Force portrait mode to prevent rotation.
+       fig2dev -L pdftex -p dummy $< $@
+%.pdf_t: %.fig
+       fig2dev -L pdftex_t -p $*.pdf $< $@
+%.pstex: %.fig
+       fig2dev -L pstex -p dummy $< $@
+%.pstex_t: %.fig
+       fig2dev -L pstex_t -p $*.pstex $< $@
+
+generated_files = $(addprefix paper,.aux .bbl .blg .dvi .log .pdf .ps .toc) \
+       $(foreach fn,$(figures),$(fn).pdf $(fn).pdf_t $(fn).pstex $(fn).pstex_t)
+clean:
+       rm -f $(generated_files) *.retex-keep.*