-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
68 lines (55 loc) · 1.96 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
DOCUMENT=thesis
#MODE=-interaction=batchmode
all: clean xelatex
echo
xelatex: compile_xelatex
mv $(DOCUMENT)-xelatex.pdf ../pdf/$(DOCUMENT).pdf
compile_xelatex:
xelatex $(MODE) $(DOCUMENT)
bibtex $(DOCUMENT)
xelatex $(MODE) $(DOCUMENT)
xelatex $(MODE) $(DOCUMENT)
mv $(DOCUMENT).pdf $(DOCUMENT)-xelatex.pdf
pdflatex: compile_pdflatex
mv $(DOCUMENT)-pdflatex.pdf ../pdf/$(DOCUMENT).pdf
compile_pdflatex:
pdflatex $(MODE) $(DOCUMENT)
bibtex $(DOCUMENT)
pdflatex $(MODE) $(DOCUMENT)
pdflatex $(MODE) $(DOCUMENT)
mv $(DOCUMENT).pdf $(DOCUMENT)-pdflatex.pdf
lualatex: compile_lualatex
mv $(DOCUMENT)-lualatex.pdf ../pdf/$(DOCUMENT).pdf
compile_lualatex:
lualatex $(MODE) $(DOCUMENT)
bibtex $(DOCUMENT)
lualatex $(MODE) $(DOCUMENT)
lualatex $(MODE) $(DOCUMENT)
mv $(DOCUMENT).pdf $(DOCUMENT)-lualatex.pdf
switch_to_hungarian:
sed -i "s|^\\\input{include/thesis-en}|%\\\input{include/thesis-en}|" $(DOCUMENT).tex
sed -i "s|^%\\\input{include/thesis-hu}|\\\input{include/thesis-hu}|" $(DOCUMENT).tex
test_hu:
${MAKE} clean compile_xelatex
${MAKE} clean compile_pdflatex
${MAKE} clean compile_lualatex
mv $(DOCUMENT)-xelatex.pdf ../pdf/$(DOCUMENT)-xelatex-hu.pdf
mv $(DOCUMENT)-pdflatex.pdf ../pdf/$(DOCUMENT)-pdflatex-hu.pdf
mv $(DOCUMENT)-lualatex.pdf ../pdf/$(DOCUMENT)-lualatex-hu.pdf
switch_to_english:
sed -i "s|^\\\input{include/thesis-hu}|%\\\input{include/thesis-hu}|" $(DOCUMENT).tex
sed -i "s|^%\\\input{include/thesis-en}|\\\input{include/thesis-en}|" $(DOCUMENT).tex
test_en:
${MAKE} switch_to_english
${MAKE} clean compile_xelatex
${MAKE} clean compile_pdflatex
${MAKE} clean compile_lualatex
mv $(DOCUMENT)-xelatex.pdf ../pdf/$(DOCUMENT)-xelatex-en.pdf
mv $(DOCUMENT)-pdflatex.pdf ../pdf/$(DOCUMENT)-pdflatex-en.pdf
mv $(DOCUMENT)-lualatex.pdf ../pdf/$(DOCUMENT)-lualatex-en.pdf
${MAKE} switch_to_hungarian
test: test_hu test_en
echo
clean:
echo Cleaning temporary files...
rm -f *.aux *.dvi *.thm *.lof *.log *.lot *.fls *.out *.toc *.bbl *.blg