summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/wargame/doc/tutorial/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/wargame/doc/tutorial/Makefile')
-rw-r--r--macros/latex/contrib/wargame/doc/tutorial/Makefile51
1 files changed, 51 insertions, 0 deletions
diff --git a/macros/latex/contrib/wargame/doc/tutorial/Makefile b/macros/latex/contrib/wargame/doc/tutorial/Makefile
new file mode 100644
index 0000000000..5d4061c347
--- /dev/null
+++ b/macros/latex/contrib/wargame/doc/tutorial/Makefile
@@ -0,0 +1,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__