forked from tgweber/tiscript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
53 lines (38 loc) · 1.06 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
SHELL=/bin/bash
LATEX=pdflatex
LATEXOPT=--shell-escape
LATEXMK=latexmk
LATEXMKOPT=-pdf
BIBER=biber
GLOS=makeglossaries
MAIN=script
SOURCES=$(MAIN).tex Makefile $(shell find content/*)
all: $(MAIN).pdf
.refresh:
touch .refresh
$(MAIN).pdf: $(MAIN).tex .refresh $(shell find content/*)
$(LATEXMK) $(LATEXMKOPT) \
-pdflatex="$(LATEX) $(LATEXOPT) %O %S" $(MAIN)
$(BIBER) $(MAIN)
# $(GLOS) $(MAIN)
$(LATEXMK) $(LATEXMKOPT) \
-pdflatex="$(LATEX) $(LATEXOPT) %O %S" $(MAIN)
force:
touch .refresh
rm $(MAIN).pdf
$(LATEXMK) $(LATEXMKOPT) \
-pdflatex="$(LATEX) $(LATEXOPT) %O %S" $(MAIN)
clean:
$(LATEXMK) -C $(MAIN)
rm -f $(MAIN).pdfsync
rm -rf *~ *.tmp
rm -f *.bbl *.blg *.aux *.end *.fls *.log *.out *.fdb_latexmk *.tdo $(MAIN).mtc*
rm -f content/*.aux
publish:
$(LATEXMK) $(LATEXMKOPT) \
-pdflatex="$(LATEX) $(LATEXOPT) %O %S" $(MAIN)
scp $(MAIN).pdf [email protected]:html/ti/$(MAIN).pdf
git push origin master
once:
$(LATEXMK) $(LATEXMKOPT) -pdflatex="$(LATEX) $(LATEXOPT) %O %S" $(MAIN)
.PHONY: clean force once all