Commit | Line | Data |
---|---|---|
f3084293 MM |
1 | figures = flow |
2 | inputs = | |
3 | ||
4 | all: paper.pdf #paper.ps | |
5 | ||
6 | .DELETE_ON_ERROR: | |
7 | ||
8 | paper.pdf: $(inputs) $(addsuffix .pdf_t,$(figures)) $(addsuffix .pdf,$(figures)) | |
9 | # Note: paper.dvi refers to the PostScript figures by filename instead of | |
10 | # embedding them. The figures are read once when the references are placed in | |
11 | # paper.dvi and again when the figures are embedded in streaming.ps, so we | |
12 | # list them as prerequisites of both files. | |
13 | paper.dvi: $(inputs) $(addsuffix .pstex_t,$(figures)) $(addsuffix .pstex,$(figures)) | |
14 | paper.ps: $(addsuffix .pstex,$(figures)) | |
15 | ||
16 | # TeX compiling rules | |
17 | %.pdf: %.tex | |
18 | # Avoid writing the file in place because that seems to make evince crash. | |
19 | rm -f $@ | |
20 | ./retex pdflatex $* | |
21 | %.dvi: %.tex | |
22 | retex latex $* | |
23 | %.ps: %.dvi | |
24 | dvips $< -o $@ | |
25 | ||
26 | # Figure exporting rules (equivalent to Xfig's export command) | |
27 | %.pdf: %.fig | |
28 | # Force portrait mode to prevent rotation. | |
29 | fig2dev -L pdftex -p dummy $< $@ | |
30 | %.pdf_t: %.fig | |
31 | fig2dev -L pdftex_t -p $*.pdf $< $@ | |
32 | %.pstex: %.fig | |
33 | fig2dev -L pstex -p dummy $< $@ | |
34 | %.pstex_t: %.fig | |
35 | fig2dev -L pstex_t -p $*.pstex $< $@ | |
36 | ||
37 | generated_files = $(addprefix paper,.aux .bbl .blg .dvi .log .pdf .ps .toc) \ | |
38 | $(foreach fn,$(figures),$(fn).pdf $(fn).pdf_t $(fn).pstex $(fn).pstex_t) | |
39 | clean: | |
40 | rm -f $(generated_files) *.retex-keep.* |