-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathMakefile
40 lines (32 loc) · 1.16 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
all: thesis.pdf
SHELL := /bin/bash
.PHONY: clean distclean declaration approval
thesis.pdf:
latexmk thesis.tex -M -MP -MF thesis.d
synopsis:
latexmk synopsis.tex -M -MP -MF synopsis.d
declaration:
sed -i '/^\\documentclass/s/final,//g' thesis.tex
echo "\usepackage[2]{pagesel}" >> common/preamble.tex
latexmk thesis.tex -M -MP -MF thesis.d
mv thesis.pdf declaration.pdf
sed -i '/^\\usepackage\[2\]{pagesel}/d' common/preamble.tex
approval:
sed -i '/^\\documentclass/s/final,//g' thesis.tex
echo "\usepackage[3]{pagesel}" >> common/preamble.tex
latexmk thesis.tex -M -MP -MF thesis.d
mv thesis.pdf approval.pdf
sed -i '/^\\usepackage\[3\]{pagesel}/d' common/preamble.tex
final:
sed -i 's/^\\documentclass\[/&final,/' thesis.tex
#sed -i 's/^\\documentclass\[/\\documentclass\[final,/' thesis.tex
latexmk thesis.tex -M -MP -MF thesis.d
sed -i '/^\\documentclass/s/final,//g' thesis.tex
-include *.d
clean:
rm -f *.out *.aux *.bbl *.blg *.fdb_latexmk \
*.fls *.log *.toc *.brf thesis.d synopsis.d \
*.idx *.ilg *.ind *.lof *.lot *.loa *.los *.lol \
*.nlo *.nls */*.aux */*/*.aux
distclean: clean
rm -f thesis.pdf synopsis.pdf approval.pdf declaration.pdf