-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
executable file
·59 lines (44 loc) · 1.3 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
OPTS = -z -Ppdf -Pcmz -Pamz -Poutline -G0 -j0 -f -D 600 -Z -Pdownload35
DEPS =
all: winter-day-2016-lecture.pdf winter-day-2016-handout.pdf
force:
rm -f *.dvi *.pdf *.ps
make
%-handout.tex: %-lecture.tex
sed 's/,presentation/,handout/' < $< > $@
#######################
# Classic latex
#######################
#%.pdf: %.ps
# ps2pdfwr $<
#%.ps: %.dvi
# dvips $(OPTS) -o $@ $<
#%.dvi: %.tex $(DEPS)
# echo "Running latex... "
# latex $<
# latex_count=5 ; \
# while egrep -s 'Rerun (LaTeX|to get cross-references right)' $(subst tex,log,$<) && \
# [ $$latex_count -gt 0 ] ;\
# do \
# echo "Rerunning latex...." ;\
# latex $< ;\
# latex_count=`expr $$latex_count - 1` ;\
# done
#######################
# pdflatex
#######################
%.pdf: %.tex
echo "Running pdflatex... "
pdflatex $<
latex_count=5 ; \
while egrep -s 'Rerun (LaTeX|to get cross-references right|to get citations correct)' $(subst tex,log,$<) && \
[ $$latex_count -gt 0 ] ;\
do \
echo "Rerunning latex...." ;\
pdflatex $< ;\
latex_count=`expr $$latex_count - 1` ;\
done
clean-all: clean
rm -f *.dvi *.pdf *.ps
clean:
rm -f *.log *.aux *.tmp *.out *.snm *.toc *.nav *~