-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
73 lines (55 loc) · 1.55 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
###########################################################
#
# Makefile for LaTeX docs
#
###########################################################
.SUFFIXES:
.SUFFIXES: .ps .dvi .tex
TEXINPUTS := .:${TEXINPUTS}
BIBINPUTS := .:${TEXINPUTS}
#all: eps dvi ps pdf # res
all: pdf
eps: fig obj
PAPER=safeandcalm
LATEX=pdflatex
ps: $(PAPER).ps
pdf: $(PAPER).pdf
dvi: $(PAPER).dvi
obj: $(patsubst %.obj, %.eps, $(wildcard *.obj))
fig: $(patsubst %.fig, %.eps, $(wildcard *.fig))
res:
make -C results
make -C figs
clean:
$(RM) *.aux *.log *.bbl *.blg *~ \#*\# *.toc *.idx
$(RM) $(patsubst %.tex, $(PAPER).ps, $(wildcard *.tex))
$(RM) $(patsubst %.tex, %.dvi, $(wildcard *.tex))
$(RM) $(patsubst %.tex, $(PAPER).pdf, $(wildcard *.tex))
distclean: clean
$(RM) $(patsubst %.fig, %.eps, $(wildcard *.fig))
$(RM) $(patsubst %.obj, %.eps, $(wildcard *.obj))
# only need -Ppdf if using CM fonts
#%.pdf: %.dvi $(wildcard *.bib)
# dvips -Ppdf -G0 -t letter -o $*.tmp.ps $<
# ps2pdf $*.tmp.ps $*.pdf
# $(RM) $*.tmp.ps $*.dvi *.aux *.log *.bbl *.blg *.toc
figs:
neato meta.dot -Tpdf -o meta.pdf
%.pdf: $(wildcard *.tex) $(wildcard *.bib)
$(LATEX) $*
bibtex $*
$(LATEX) $*
if [ -e $*.toc ] ; then $(LATEX) $* ; fi
if [ -e $*.bbl ] ; then $(LATEX) $* ; fi
if egrep Rerun $*.log ; then $(LATEX) $* ; fi
if egrep Rerun $*.log ; then $(LATEX) $* ; fi
if egrep Rerun $*.log ; then $(LATEX) $* ; fi
$(RM) *.aux *.log *.bbl *.blg *.toc
%.ps: %.dvi
dvips -Ppdf -G0 -tletter -o $@ $<
%.ps.gz: %.ps
gzip -v9 $<
%.eps: %.obj
tgif -print -eps $*
%.eps: %.fig
fig2dev -L eps $< $@