-
Notifications
You must be signed in to change notification settings - Fork 337
/
Makefile
29 lines (20 loc) · 684 Bytes
/
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
DOC := stat-cookbook.tex
RERUN := "(undefined references|Rerun to get (cross-references|the bars|point totals) right|Table widths have changed. Rerun LaTeX.|Linenumber reference failed)"
RERUNBIB := "No file.*\.bbl|Citation.*undefined"
all: figs doc
figs:
@$(MAKE) -C $@
doc: $(DOC:.tex=.pdf)
%.pdf: %.tex
pdflatex $<
@egrep -q $(RERUNBIB) $*.log && bibtex $* && pdflatex $<; true
@egrep -q $(RERUN) $*.log && pdflatex $<; true
@egrep -q $(RERUN) $*.log && pdflatex $<; true
latexmk:
-latexmk -pvc -pdf $(DOC)
purge:
-rm -f *.{aux,dvi,log,bbl,blg,brf,fls,toc,thm,out,fdb_latexmk}
clean: purge
$(MAKE) -C figs $@
-rm -f $(DOC:.tex=.pdf)
.PHONY: all figs purge clean