-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
42 lines (35 loc) · 1.25 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
LATEXMK = latexmk -lualatex -shell-escape
TEX_FILES := $(shell find . -name '*.tex')
all: main.pdf \
src/introduction/abstract.pdf \
src/introduction/acknowledgements.pdf \
src/introduction/introduction.pdf \
src/background/background.pdf \
src/background/tools.pdf \
src/background/parsers.pdf \
src/body/body.pdf \
src/body/simple-rules.pdf \
src/body/leftrec.pdf \
src/body/impl.pdf \
src/body/impl/parser.pdf \
src/body/impl/expr.pdf \
src/body/complex-rules.pdf \
src/evaluation/evaluation.pdf \
src/conclusion/conclusion.pdf \
src/appendix/appendix.pdf
main: main.pdf
%.pdf: %.tex
cd $(dir $<) && $(LATEXMK) $(notdir $<)
clean:
@echo "Cleaning up auxiliary files..."
@find . -name '*.tex' -exec sh -c 'cd $$(dirname {}) && latexmk -c $$(basename {})' \;
@find . -type f -name '*.bbl' -exec rm {} +
@find . -type f -name '*.bbl-SAVE-ERROR' -exec rm {} +
@find . -type d -name '_minted-*' -exec rm -rf {} +
distclean:
@echo "Cleaning up all files including PDF outputs..."
@find . -name '*.tex' -exec sh -c 'cd $$(dirname {}) && latexmk -C $$(basename {})' \;
@find . -type f -name '*.bbl' -exec rm {} +
@find . -type f -name '*.bbl-SAVE-ERROR' -exec rm {} +
@find . -type d -name '_minted-*' -exec rm -rf {} +
.PHONY: all main clean distclean