-
Notifications
You must be signed in to change notification settings - Fork 12
/
Makefile
44 lines (31 loc) · 1.05 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
# Source LaTeX files
TEX_MAIN_PAPER = paper.tex
TEX_MAIN_SUBMISSION = submission.tex
# Generated PDF files
PDF_PAPER := $(TEX_MAIN_PAPER:.tex=.pdf)
PDF_SUBMISSION := $(TEX_MAIN_SUBMISSION:.tex=.pdf)
# Resources
IMAGES := $(wildcard images/*.jpg images/*.pdf images/*.png)
.PHONY: all grammar paper submission view-paper view-submission clean
all: ${PDF_SUBMISSION} ${PDF_PAPER}
# spelling and grammar
grammar: $(TEX_MAIN_PAPER)
# check that textidote exists.
@textidote --version
# allowed to fail since it throws error if we have grammar mistakes
-textidote --check en --output html $< > index.html
python3 -m http.server
refcheck: paper
@grep -e 'refcheck.*Unused' paper.log
${PDF_PAPER}: ${TEX_MAIN_PAPER} ${IMAGES}
latexmk ${TEX_MAIN_PAPER}
${PDF_SUBMISSION}: ${TEX_MAIN_SUBMISSION} ${IMAGES}
latexmk ${TEX_MAIN_SUBMISSION}
paper: ${PDF_PAPER}
submission: ${PDF_SUBMISSION}
view-paper: ${TEX_MAIN_PAPER} ${IMAGES}
latexmk -pvc ${TEX_MAIN_PAPER}
view-submission: ${TEX_MAIN_SUBMISSION} ${IMAGES}
latexmk -pvc ${TEX_MAIN_SUBMISSION}
clean:
latexmk -C