Hong-Phuc Bui
2018-10-07 294846b38b63d5cd91d2385744bd7a20fdc6d9ad
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
LATEX = xelatex
LATEX_OPT :=--shell-escape -interaction=nonstopmode --synctex=1
# pythontex
PYTHONTEX := pythontex.py
PYTHONTEX_OPT := -v
#bibtex
BIBTEX := biber
BIBTEX_OPT := 
 
 
# latexmk setting
LATEXMK = latexmk
LATEXMK_OPT :=
LATEXMK_INTERACTIVE_OPT := -pvc
 
# interactive TARGET Setting
INTERACTIVE_TARGET = zusammenfassung.pdf
 
########################################################
# file variables 
exclude := $(wildcard _*.tex)
tex := $(wildcard *.tex)
tex := $(filter-out $(exclude), $(tex))
pdf := $(tex:.tex=.pdf)
 
.PHONY: all
all: $(pdf)
 
 
%.pdf: %.tex
    $(LATEXMK) $(LATEXMK_OPT) $<
 
zusammenfassung.tex: $(wildcard chap/*.tex)
    touch $@
 
autoren-handbuch.tex: $(wildcard autoren-kap/*.tex)
    touch $@
 
.PHONY: interactive
interactive: $(INTERACTIVE_TARGET)
    $(LATEXMK) $(LATEXMK_INTERACTIVE_OPT) $(<:.pdf=.tex)
 
.PHONY: mostlyclean clean
mostlyclean:
    rm -fv *.aux *.out *.bbl *.blg *.pytxcode *.toc *.nav *.bcf *.log *.run.xml *.snm *.vrb *.synctex.gz
    rm -fv chap/*.aux
 
clean:
    make mostlyclean
    rm -fv *.pdf
    rm -rfv pythontex-files-*
    rm -rfv _minted-*
    rm -rf *.fdb_latexmk *.fls