-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile
64 lines (56 loc) · 1.21 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
# General Makefile rules
TOPIC = rplan
MAIN = $(TOPIC)
BIBDIR = refs
BIBFILES = $(wildcard $(BIBDIR)/*.bib)
TEXFILES = $(wildcard ./*.tex)
STYLEFILES = $(wildcard ./*.sty)
all: research-plan
research-plan: $(MAIN).pdf
# main rule
$(MAIN).pdf: $(MAIN).tex $(TEXFILES) Makefile $(STYLEFILES) $(BIBFILES)
# Create PDF-files
pdflatex $(subst .pdf,.tex,$@)
pdflatex $(subst .pdf,.tex,$@)
bibtex $(subst .pdf,,$@)
pdflatex $(subst .pdf,.tex,$@)
@while ( grep "Rerun to get cross-references" \
$(subst .pdf,.log,$@) > /dev/null ); do \
echo '** Re-running LaTeX **'; \
pdflatex $(subst .pdf,.tex,$@); \
done
# clean rule
clean:
rm -f ./*.aux
rm -f ./*.tex~
rm -f ./*.log
rm -f ./*.ps
rm -f ./*.dvi
rm -f ./*.blg
rm -f ./*.bbl
rm -f ./*.tmp
rm -f ./*.bib~
rm -f ./*.thm
rm -f ./*.toc
rm -f ./*.lo*
rm -f ./comment.cut
rm -f ./*.nav
rm -f ./*.out
rm -f ./*.snm
rm -f ./*~
rm -f ./*.pdf
rm -f ./*.gl*
rm -f ./*.ist
rm -f ./*.rel
rm -f ./\#*
rm -f ./*.tdo
rm -f ./*.fdb_latexmk
rm -f ./*.fls
rm -rf ./figs/*.pdf
# works for linux
view:
evince $(MAIN).pdf &
# continuous latex compilation
continous:
make all
latexmk -pvc -bibtex -pdf -view=none $(MAIN).tex