-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·65 lines (51 loc) · 1.28 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
#!/usr/bin/make
# Use TeXmacs instead!
# Then:
# pandoc -f html -t epub3 -o limit.epub limit.html
default: volume-1.pdf
.PRECIOUS: tmp/%/index.html
tmp/%/index.html: %.tex
mkdir -p tmp/$*
texmacs -c $< $@ -q
%.epub: tmp/%/index.html
cd tmp/$* && pandoc -f html -t epub -o ../../$@ ../../$<
%_polished.epub: %.epub
ebook-polish -i -u $< $@
# Resulting file does not diplay in Kindle preview properly
%.docx: %_polished.epub
pandoc -f epub -t docx -o $@ $<
# %.docx: tmp/%/index.html
# cd tmp/$* && pandoc -f html -t docx -o ../../$@ ../../$<
FORCE::
volume-1.pdf: FORCE
pdflatex volume-1.tex
bibtex volume-1.aux
pdflatex volume-1.tex
pdflatex volume-1.tex
makeindex volume-1
pdflatex volume-1.tex
volume-3.pdf: FORCE
pdflatex volume-3.tex
bibtex volume-3.aux
pdflatex volume-3.tex
pdflatex volume-3.tex
# makeindex volume-1
# pdflatex volume-3.tex
addons.pdf: FORCE
pdflatex addons.tex
bibtex addons.aux
pdflatex addons.tex
pdflatex addons.tex
volume-2.pdf: FORCE
pdflatex volume-2.tex
bibtex volume-2.aux
pdflatex volume-2.tex
pdflatex volume-2.tex
ideas.pdf: FORCE
pdflatex ideas.tex
# bibtex addons.aux
pdflatex ideas.tex
pdflatex ideas.tex
clean: FORCE
rm -f *.pdf *.aux *.bbl *.blg *.dvi *.idx *.log *.out *.toc *.ilg *.ind *.synctex *.epub *.docx
rm -rf tmp