-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
66 lines (49 loc) · 1.48 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
.PHONY: all clean cleaner checkindex
all: pr7rs.pdf
clean:
rm -f *~
cleaner: clean
rm -f *.pdf *.aux *.log *.idx *.toc *.out
DIFF_SOURCES=basic.tex derive.tex example.tex expr.tex \
lex.tex procs.tex prog.tex struct.tex
SOURCES=pr7rs.tex $(DIFF_SOURCES) intro.tex \
bib.tex syn.tex commands.tex first.tex notes.tex \
repository.tex index.tex sem.tex stdmod-raw.tex \
features.tex
# index.tex: r7rs.idx
# csi index.sch -e '(run)'
stdmod.tex: stdmod-raw.tex
./genstdmod.pl < $< > $@
checkindex: stdmod-raw.tex index.tex
./checkindex.sh
intro-ebook.tex: intro.tex
sed 's/\\clearextrapart{\(.*\)}/\1/g' $< > $@
pr7rs.pdf: $(SOURCES) stdmod.tex
pdflatex $<
pdflatex $<
makeindex pr7rs.idx
pdflatex $<
pr7rs_a5.pdf: pr7rs_a5.tex $(SOURCES) stdmod.tex first_a5.tex
pdflatex $<
pdflatex $<
makeindex pr7rs_a5.idx
pdflatex $<
pr7rs_a4.pdf: pr7rs_a4.tex $(SOURCES) stdmod.tex
pdflatex $<
pdflatex $<
makeindex pr7rs_a4.idx
pdflatex $<
overview.pdf: overview.tex overview-body.tex
pdflatex $<
pdflatex $<
r7rs-ebook.pdf: r7rs-ebook.tex intro-ebook.tex $(SOURCES) stdmod.tex
pdflatex $<
pdflatex $<
r5diff/%.tex: %.tex
hg cat -r 1 $< > r5diff/old-$<
latexdiff --type=UNDERLINE --subtype=SAFE r5diff/old-$< $< | \
perl -pe 's/\\section{\\DIF(add|del){([^{}]*)}}/\\section{\2}/; s/}\\ev \\DIFadd{/\\ev/' | \
perl -pe 'BEGIN{undef $$/} s/\\ev([^%{]*)(%.*)?\n}/} \\ev \1\n/g' > $@
rm -f r5diff/old-$<
r5diff/r7rs.pdf: $(DIFF_SOURCES:%=r5diff/%)
cd r5diff && $(MAKE) r7rs.pdf