-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
134 lines (102 loc) · 3.26 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
VOL1=main-en-vol1
VOL1_A4=main-en-vol1-a4
VOL2=main-en-vol2
PT_VOL1=main-pt-vol1
TH_VOL1=main-th-vol1
# LATEX=lualatex
# LATEX_OPTS=-interaction=nonstopmode -halt-on-error
LATEX=xelatex
LATEX_OPTS=-interaction=nonstopmode -halt-on-error -xelatex
# TH_LATEX=xelatex
# TH_LATEX_OPTS=-interaction=nonstopmode -halt-on-error -output-driver='xdvipdfmx -z0'
TH_LATEX=latexmk
TH_LATEX_OPTS=-interaction=nonstopmode -halt-on-error -xelatex
# PT_LATEX=latexmk
# PT_LATEX_OPTS=-interaction=nonstopmode -halt-on-error -xelatex
PT_LATEX=xelatex
PT_LATEX_OPTS=-interaction=nonstopmode -halt-on-error -xelatex
# PT_LATEX=lualatex
# PT_LATEX_OPTS=-interaction=nonstopmode -halt-on-error
# lualatex --version
# This is LuaHBTeX, Version 1.13.2 (TeX Live 2021)
# xelatex --version
# XeTeX 3.141592653-2.6-0.999993 (TeX Live 2021)
all:
@echo "Make what?"
%.pdf: %.tex
$(LATEX) $(LATEX_OPTS) $<
vol1-ebooks:
./helpers/ebooks.sh "chapters/english/markdown-vol1/book.toml"
vol2-ebooks:
./helpers/ebooks.sh "chapters/english/markdown-vol2/book.toml"
pt-ebooks:
./helpers/ebooks.sh "chapters/portuguese/markdown/book.toml"
satipatthana-ebooks:
./helpers/ebooks.sh "chapters/english/markdown-satipatthana/book.toml"
ebooks: vol1-ebooks vol2-ebooks pt-ebooks satipatthana-ebooks
vol1:
cat $(VOL1).fir | \
sed '/\\contentsfinish/d' | \
sort > $(VOL1).fir.tmp
echo '\contentsfinish' >> $(VOL1).fir.tmp
mv $(VOL1).fir.tmp $(VOL1).fir
$(LATEX) $(LATEX_OPTS) $(VOL1).tex;
vol1-a4:
cat $(VOL1_A4).fir | \
sed '/\\contentsfinish/d' | \
sort > $(VOL1_A4).fir.tmp
echo '\contentsfinish' >> $(VOL1_A4).fir.tmp
mv $(VOL1_A4).fir.tmp $(VOL1_A4).fir
$(LATEX) $(LATEX_OPTS) $(VOL1_A4).tex;
vol1-retreat:
cat $(VOL1)-retreat.fir | \
sed '/\\contentsfinish/d' | \
sort > $(VOL1)-retreat.fir.tmp
echo '\contentsfinish' >> $(VOL1)-retreat.fir.tmp
mv $(VOL1)-retreat.fir.tmp $(VOL1)-retreat.fir
$(LATEX) $(LATEX_OPTS) $(VOL1)-retreat.tex;
vol2:
cat $(VOL2).fir | \
sed '/\\contentsfinish/d' | \
sort > $(VOL2).fir.tmp
echo '\contentsfinish' >> $(VOL2).fir.tmp
mv $(VOL2).fir.tmp $(VOL2).fir
$(LATEX) $(LATEX_OPTS) $(VOL2).tex;
release:
@echo -n "Vol 1 x4...."
make vol1 && make vol1 && make vol1 && make vol1
@echo -n "Vol 2 x4...."
make vol2 && make vol2 && make vol2 && make vol2
font-stress-test:
$(LATEX) $(LATEX_OPTS) font-stress-test.tex;
part-pages-test:
$(LATEX) $(LATEX_OPTS) part-pages-test.tex;
pt:
cat $(PT_VOL1).fir | \
sed '/\\contentsfinish/d' | \
sort > $(PT_VOL1).fir.tmp
echo '\contentsfinish' >> $(PT_VOL1).fir.tmp
mv $(PT_VOL1).fir.tmp $(PT_VOL1).fir
$(PT_LATEX) $(PT_LATEX_OPTS) $(PT_VOL1).tex;
pt-release:
@echo -n "PT Vol 1 x4...."
make pt && make pt && make pt && make pt
pt-cover-front:
$(LATEX) $(LATEX_OPTS) cover-front-pt-vol1.tex;
pt-cover-back:
$(LATEX) $(LATEX_OPTS) cover-back-pt-vol1.tex;
th:
cat $(TH_VOL1).fir | \
sed '/\\contentsfinish/d' | \
sort > $(TH_VOL1).fir.tmp
echo '\contentsfinish' >> $(TH_VOL1).fir.tmp
mv $(TH_VOL1).fir.tmp $(TH_VOL1).fir
$(TH_LATEX) $(TH_LATEX_OPTS) $(TH_VOL1).tex;
th-preview:
./helpers/th-preview.sh
satipatthana:
$(LATEX) $(LATEX_OPTS) satipatthana-en.tex;
satipatthana-cover-front:
$(LATEX) $(LATEX_OPTS) cover-front-satipatthana.tex;
satipatthana-cover-back:
$(LATEX) $(LATEX_OPTS) cover-back-satipatthana.tex;