-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
41 lines (27 loc) · 984 Bytes
/
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
name := KdV_JSC
dir := Latex
path := $(dir)/$(name)
latex := cd $(dir) && pdflatex $(name).tex
latex_files :=
figures := $(patsubst %.eps,%-eps-converted-to.pdf,$(wildcard Fig/*.eps))
.PHONY: all clean cleanall help
all: $(path).pdf
help:
@cat README.rst
clean:
rm -f $(dir)/*.log $(dir)/*.aux $(dir)/*.out $(dir)/*.bbl $(dir)/*.blg $(dir)/*.tmp
cleanall: clean
rm -rf tmp
rm -f $(path).pdf
$(path).pdf: $(path).log
@if [ `grep "Package rerunfilecheck Warning: File" $(path).log | wc -l` != 0 ]; then $(latex); fi
@if [ `grep "Rerun to get cross-references right." $(path).log | wc -l` != 0 ]; then $(latex); fi
@if [ `grep "Package natbib Warning: Citation(s) may have changed." $(path).log | wc -l` != 0 ]; then $(latex); fi
$(path).log: $(path).tex $(figures) $(latex_files) $(path).bbl
$(latex)
$(path).bbl: $(path).aux $(dir)/KdV-To-cite.bib
cd $(dir) && bibtex $(name).aux
$(path).aux: $(path).tex
$(latex)
%-eps-converted-to.pdf: %.eps
epstopdf $< $@