forked from wangyif2/RE-for-beginners
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
87 lines (75 loc) · 1.86 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
.SUFFIXES: .m4 .ru .en
.m4.en:
m4 --define=lang=en $*.m4 >$*.en
.m4.ru:
m4 --define=lang=ru $*.m4 >$*.ru
M4SOURCES := $(shell find . $(pwd) -name '*.m4')
RU_LISTINGS := $(M4SOURCES:%.m4=%.ru)
EN_LISTINGS := $(M4SOURCES:%.m4=%.en)
all: russian english russian-A5 english-A5 \
russian-lite english-lite russian-A5-lite english-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 *~
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
russian: $(RU_LISTINGS)
$(call compile,Reverse_Engineering_for_Beginners-ru)
english: $(EN_LISTINGS)
$(call compile,Reverse_Engineering_for_Beginners-en)
russian-A5: $(RU_LISTINGS)
$(call compile,Reverse_Engineering_for_Beginners-ru-A5)
english-A5: $(EN_LISTINGS)
$(call compile,Reverse_Engineering_for_Beginners-en-A5)
russian-lite: $(RU_LISTINGS)
$(call compile,Reverse_Engineering_for_Beginners-ru-lite)
english-lite: $(EN_LISTINGS)
$(call compile,Reverse_Engineering_for_Beginners-en-lite)
russian-A5-lite: $(RU_LISTINGS)
$(call compile,Reverse_Engineering_for_Beginners-ru-A5-lite)
english-A5-lite: $(EN_LISTINGS)
$(call compile,Reverse_Engineering_for_Beginners-en-A5-lite)