blob: 5d4061c347e228a4db2e73ca8d68cb68c241e233 (
plain)
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
|
#
#
#
LATEX := pdflatex
LATEX_FLAGS := -interaction=nonstopmode \
-file-line-error \
--synctex=15 \
-shell-escape
EXPORT := ../utils/export.py
EXPORT_FLAGS :=
ifdef VERBOSE
MUTE :=
REDIR :=
LATEX_FLAGS :=
EXPORT_FLAGS := -V
else
MUTE := @
REDIR := > /dev/null 2>&1
endif
%.aux:%.tex
@echo "LATEX $< -> $@"
$(MUTE)TEXINPUTS=:..: $(LATEX) $(LATEX_FLAGS) $< $(REDIR)
%.pdf:%.aux
@echo "LATEX $*.tex -> $@ (via $*.aux)"
$(MUTE)TEXINPUTS=:..: $(LATEX) $(LATEX_FLAGS) $*.tex $(REDIR)
%.pdf:%.tex
@echo "LATEX $< -> $@"
$(MUTE)TEXINPUTS=:..: $(LATEX) $(LATEX_FLAGS) $< $(REDIR)
%.json:%.pdf
all: game.pdf Game.vmod
game.aux:game.tex game.sty export.tex
export.pdf:export.tex game.sty
Game.vmod:export.pdf export.json patch.py game.pdf
@echo "$(EXPORT) $< -> $@"
$(MUTE)$(EXPORT) export.pdf export.json -p patch.py -r game.pdf \
-d "Example module from LaTeX PnP game" \
-t "LaTeX wargame tutorial" -v 0.1 -o $@
clean:
rm -f *~ *.log *.out *.aux *.pdf *.vmod *.json
rm -f *.synctex* *.hd
rm -rf __pycache__
|