This repository has been archived by the owner on Jan 9, 2019. It is now read-only.
forked from miekg/gobook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
57 lines (45 loc) · 1.47 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
.PHONY: once spell compilecheck fmtcheck
# use recursive make to make two other versions.
DIRS := traditional_chinese simplified_chinese
all: go.pdf chinese
chinese::
@for d in $(DIRS); \
do \
$(MAKE) --directory=$$d; \
done
go.pdf: go-*.tex ex-*/*.tex src/*.go tab/*.tex fig/*.tex blocksbook.cls go.bib .fig .tab about-*.tex
rm -f go.tex && ln -s go_a4.tex go.tex
xelatex go.tex && bibtex go && makeindex go \
&& xelatex go.tex && xelatex go.tex
go-kindle.pdf: go-*.tex ex-*/*.tex src/*.go tab/*.tex fig/*.tex blocksbook.cls go.bib .fig .tab about-*.tex
rm -f go.tex && ln -s go_kindle.tex go.tex
xelatex go.tex && bibtex go && makeindex go \
&& xelatex go.tex && xelatex go.tex
mv go.pdf go-kindle.pdf
.fig: fig/*.svg
( cd fig; make all )
touch .fig
.tab:
( cd tab; make all )
touch .tab
clean:
rm -f go.lol go.aux *.log map.log go.pdf go.bbl go.blg go.toc go.ind go.lot go.lof go.loe
rm -f go.ilg go.idx go.lgpl missfont.log doc_data.txt go.ex .fig .tab
rm -f go.code
distclean: clean
( cd fig; make clean )
( cd tab; make clean )
( cd src; make clean )
spell:
for i in *.tex ex-*/*.tex; do aspell check $$i; done
once:
xelatex go.tex
compilecheck:
@bin/go-lstinputlisting.pl ~/git/gobook *.tex
@bin/go-lstinputlisting.pl ~/git/gobook ex-*/*.tex
@bin/go-lstinputlisting.pl ~/git/gobook fig/*.tex
@rm -f *.6 *.8
fmtcheck:
@bin/go-lstlisting.pl *.tex
@bin/go-lstlisting.pl ex-*/*.tex
@bin/go-lstlisting.pl fig/*.tex