-
Notifications
You must be signed in to change notification settings - Fork 43
/
Makefile
executable file
·86 lines (70 loc) · 2.79 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
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
switch_to_singlesided:
sed -i "s|^%\\\documentclass\[11pt,a4paper,oneside|\\\documentclass[11pt,a4paper,oneside|" $(DOCUMENT).tex
sed -i "s|^\\\documentclass\[11pt,a4paper,twoside|%\\\documentclass[11pt,a4paper,twoside|" $(DOCUMENT).tex
switch_to_duplex:
sed -i "s|^\\\documentclass\[11pt,a4paper,oneside|%\\\documentclass[11pt,a4paper,oneside|" $(DOCUMENT).tex
sed -i "s|^%\\\documentclass\[11pt,a4paper,twoside|\\\documentclass[11pt,a4paper,twoside|" $(DOCUMENT).tex
test_duplex:
${MAKE} switch_to_duplex
${MAKE} clean compile_xelatex
${MAKE} clean compile_pdflatex
${MAKE} clean compile_lualatex
mv $(DOCUMENT)-xelatex.pdf ../pdf/$(DOCUMENT)-xelatex-duplex.pdf
mv $(DOCUMENT)-pdflatex.pdf ../pdf/$(DOCUMENT)-pdflatex-duplex.pdf
mv $(DOCUMENT)-lualatex.pdf ../pdf/$(DOCUMENT)-lualatex-duplex.pdf
${MAKE} switch_to_singlesided
test: test_hu test_en test_duplex
echo
clean:
echo Cleaning temporary files...
rm -f *.aux *.dvi *.thm *.lof *.log *.lot *.fls *.out *.toc *.bbl *.blg