forked from cplusplus/draft
/
Makefile
60 lines (47 loc) · 1.45 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
### -*- mode: makefile-gmake -*-
# Note: If building on Mac OS X, and if you use MacPorts, the following ports
# should be installed:
#
# texlive-latex
# texlive-plain-extra
# texlive-latex-recommended
# texlive-latex-extra
# texlive-fonts-recommended
# texlive-fonts-extra
FIGURES = $(patsubst %.dot,%.pdf,$(wildcard source/*.dot))
SOURCES = $(wildcard source/*.tex)
all: std.pdf
%.pdf: %.dot
dot -o $@ -Tpdf $<
grammar:
(cd source ; sh ../tools/makegram)
xrefs:
(cd source ; sh ../tools/makexref)
std.pdf: $(SOURCES) $(FIGURES) grammar xrefs
(cd source ; pdflatex std)
(cd source ; pdflatex std)
(cd source ; pdflatex std)
(cd source ; makeindex generalindex)
(cd source ; makeindex libraryindex)
(cd source ; makeindex grammarindex)
(cd source ; makeindex impldefindex)
(cd source ; pdflatex std)
(cd source ; pdflatex std)
(cd source ; pdflatex std)
mv source/std.pdf $@
@echo Draft standard compiled
convert2texi: convert2texi.cpp
g++ -g2 -o $@ $<
source/std.texi: $(SOURCES) convert2texi
./convert2texi -I source source/std.tex > $@
perl -i -pe 's/``\@quotation''/``\@\@quotation''/g;' $@
perl -i -pe 's/``\@end quotation''/``\@\@end quotation''/g;' $@
./texinfo-update $@
std.info: source/std.texi
makeinfo --error-limit=10000 --force -o .$@ $< ; echo | cat - .$@ > $@ && rm .$@
@echo Draft standard converted to TeXinfo
info: std.info
clean:
rm -f convert2texi std.info*
(cd source; rm -f *.aux *.texi)
### Makefile ends here