forked from wangyif2/RE-for-beginners
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
145 lines (122 loc) · 2.87 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
135
136
137
138
139
140
141
142
143
144
145
.SUFFIXES: .m4 .ru .en .es .ptbr .pl .it .de .th .nl
.m4.en:
m4 --define=lang=en $*.m4 >$*.en
.m4.ru:
m4 --define=lang=ru $*.m4 >$*.ru
.m4.es:
m4 --define=lang=es $*.m4 >$*.es
.m4.ptbr:
m4 --define=lang=ptbr $*.m4 >$*.ptbr
.m4.pl:
m4 --define=lang=es $*.m4 >$*.pl
.m4.it:
m4 --define=lang=it $*.m4 >$*.it
.m4.de:
m4 --define=lang=de $*.m4 >$*.de
.m4.th:
m4 --define=lang=th $*.m4 >$*.th
.m4.nl:
m4 --define=lang=nl $*.m4 >$*.nl
M4SOURCES := $(shell find . $(pwd) -name '*.m4')
RU_LISTINGS := $(M4SOURCES:%.m4=%.ru)
EN_LISTINGS := $(M4SOURCES:%.m4=%.en)
ES_LISTINGS := $(M4SOURCES:%.m4=%.es)
PL_LISTINGS := $(M4SOURCES:%.m4=%.pl)
PTBR_LISTINGS := $(M4SOURCES:%.m4=%.ptbr)
IT_LISTINGS := $(M4SOURCES:%.m4=%.it)
DE_LISTINGS := $(M4SOURCES:%.m4=%.de)
TH_LISTINGS := $(M4SOURCES:%.m4=%.th)
NL_LISTINGS := $(M4SOURCES:%.m4=%.nl)
all: RU EN RU-A5 EN-A5 RU-lite EN-lite RU-A5-lite EN-A5-lite
clean:
rm -f *.aux
rm -f *.fls
rm -f *.swp
rm -f *.pdf
rm -f *.out
rm -f *.toc
rm -f *.stackdump
rm -f *.bbl
rm -f *.blg
rm -f *.fdb_latexmk
rm -f *.idx
rm -f *.ilg
rm -f *.ind
rm -f *.html
rm -f *.tmp
rm -f *-2k
rm -f *.4ct
rm -f *.4tc
rm -f *.dvi
rm -f *.glg
rm -f *.glo
rm -f *.gls
rm -f *.idv
rm -f *.ist
rm -f *.xref
rm -f *.torrent
rm -f *.en
rm -f *.ru
rm -f RE_for_beginners-*.log
rm -f Reverse_Engineering_for_Beginners-*.log
rm -f RE4B-*.log
rm -f *~
rm -f *.log
rm -f *.lyx
rm -f *.ni
rm -f *.odt
rm -f *.rtf
# there are two xelatex invocations at the end, because \myref{} doesn't show pages correctly otherwise
define compile
rm -f *.fls
rm -f *.bbl
rm -f *.aux
xelatex $1
biber $1
makeindex $1
makeglossaries $1
xelatex $1
xelatex $1
endef
RU: $(RU_LISTINGS)
$(call compile,RE4B-RU)
EN: $(EN_LISTINGS)
$(call compile,RE4B-EN)
RU-A5: $(RU_LISTINGS)
$(call compile,RE4B-RU-A5)
EN-A5: $(EN_LISTINGS)
$(call compile,RE4B-EN-A5)
RU-lite: $(RU_LISTINGS)
$(call compile,RE4B-RU-lite)
EN-lite: $(EN_LISTINGS)
$(call compile,RE4B-EN-lite)
RU-A5-lite: $(RU_LISTINGS)
$(call compile,RE4B-RU-A5-lite)
EN-A5-lite: $(EN_LISTINGS)
$(call compile,RE4B-EN-A5-lite)
ES: $(ES_LISTINGS)
$(call compile,RE4B-ES)
PTBR: $(PTBR_LISTINGS)
$(call compile,RE4B-PTBR)
ES-lite: $(ES_LISTINGS)
$(call compile,RE4B-ES-lite)
PTBR-lite: $(PTBR_LISTINGS)
$(call compile,RE4B-PTBR-lite)
PL: $(PL_LISTINGS)
$(call compile,RE4B-PL)
PL-lite: $(PL_LISTINGS)
$(call compile,RE4B-PL-lite)
IT: $(IT_LISTINGS)
$(call compile,RE4B-IT)
IT-lite: $(IT_LISTINGS)
$(call compile,RE4B-IT-lite)
DE: $(DE_LISTINGS)
$(call compile,RE4B-DE)
DE-lite: $(DE_LISTINGS)
$(call compile,RE4B-DE-lite)
TH-lite: $(TH_LISTINGS)
$(call compile,RE4B-TH-lite)
NL: $(NL_LISTINGS)
$(call compile,RE4B-NL)
NL-lite: $(NL_LISTINGS)
$(call compile,RE4B-NL-lite)