-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
56 lines (40 loc) · 1.24 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
RUBBER_INFO = rubber-info
RUBBER = rubber --unsafe -m graphics -m xelatex --warn=refs --warn=misc
.SECONDARY:
SHELL = /bin/bash -eu
-include Makefile.local
all: annotated-presentation-skim.pdf presentation-skim.pdf
skim: annotated-presentation-skim.pdf
open -a /Applications/Skim.app $<
annotated-presentation.pdf: presentation.tex
.PHONY: .FORCE
annotated-presentation.pdf: labels.aux
labels.aux: presentation-skim.pdf
grep '^\\newlabel' presentation.aux > $@ ||:
%.pdf: %.tex .FORCE
#iconv -f UTF-8 -t US-ASCII $< > /dev/null
${RUBBER} $<
if grep -q 'fourupslides Warning: $*-skim.pdf not found' $*.log; then \
cat $@ > $*-skim.pdf; \
${RUBBER} --force $<; \
fi
$(EXTRA_CMDS)
%-skim.pdf: %.pdf
cat $< > $@
clean::
rm -f *.aux *.log *.snm *.toc *.nav *.out *.toc *.vrb \
{annotated-,}presentation*.pdf \
transcript.tex transcript*.pdf
realclean:: clean
rm -f {annotated-,}presentation-skim.pdf
PYTHON_FILES = $(wildcard *.py)
presentation.pdf: $(PYTHON_FILES:%.py=%.py.include)
%.py.include: %.py ./python-interpret
echo -n > $@
echo '\begin{verbatim}' >> $@
./python-interpret < $*.py >> $@
echo '\end{verbatim}' >> $@
%.py.out: %.py
(echo 'import datetime'; cat $<) | python > $@
clean::
rm -f *.out *.include