-
Notifications
You must be signed in to change notification settings - Fork 84
/
makefile
84 lines (84 loc) · 1.49 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
fname=main
${fname}.pdf: ${fname}.tex \
abstract/abstract.tex \
committee/committee.tex \
acknowledgments/acknowledgments.tex \
intro_chapter/intro_chapter.tex \
intro_chapter/intro_chapter.bib \
conclusion_chapter/conclusion_chapter.tex \
conclusion_chapter/conclusion_chapter.bib \
rnw_chapter/rnw_chapter.bib \
rnw_chapter/rnw_chapter.Rnw
if [ -e ${fname}.aux ]; \
then \
rm ${fname}.aux; \
fi;
cd rnw_chapter/ \
make clean && make;
pdflatex ${fname}
bibtex ${fname}
bibtex ${fname}1-blx
bibtex ${fname}2-blx
bibtex ${fname}3-blx
# Add more if you have more chapters
pdflatex ${fname}
pdflatex ${fname}
cp ${fname}.pdf PhD_Thesis.pdf
open PhD_Thesis.pdf
clean:
if [ -e ${fname}.aux ]; \
then \
rm *.aux; \
fi;
if [ -e ${fname}.bbl ]; \
then \
rm *.bbl; \
fi;
if [ -e ${fname}.blg ]; \
then \
rm *.blg; \
fi;
if [ -e ${fname}.lof ]; \
then \
rm ${fname}.lof; \
fi;
if [ -e ${fname}.log ]; \
then \
rm ${fname}.log; \
fi;
if [ -e ${fname}.lot ]; \
then \
rm ${fname}.lot; \
fi;
if [ -e ${fname}.toc ]; \
then \
rm ${fname}.toc; \
fi;
if [ -e ${fname}-blx.bib ]; \
then \
rm ${fname}-blx.bib; \
fi;
if [ -e ${fname}.out ]; \
then \
rm ${fname}.out; \
fi;
if [ -e ${fname}.run.xml ]; \
then \
rm ${fname}.run.xml; \
fi;
if [ -e acknowledgments/acknowledgments.aux ]; \
then \
rm */*.aux; \
fi;
if [ -e ${fname}.pdf ]; \
then \
rm ${fname}.pdf; \
fi;
if [ -e pdfa.xmpi ]; \
then \
rm pdfa.xmpi; \
fi;
open:
open ${fname}.pdf
edit:
open ${fname}.tex