summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile30
1 files changed, 26 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index b3538cf..02a5361 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,26 @@
-all:
- cd content; latexmk -pdf tcr -output-directory=.. -aux-directory=../build/ -usepretex="\newcommand{\gitorigin}{https://github.com/mzuenni/ContestReference/tree/$(shell git branch --show-current)/content/}"
-clean:
- rm -r build/*
+LATEXMK = latexmk -interaction=nonstopmode
+
+tcr.pdf: FORCE
+ cd content && $(LATEXMK)
+
+tcr-opt.pdf: FORCE
+ cd content && $(LATEXMK) -r latexmk.opt
+
+pdf: tcr.pdf tcr-opt.pdf
+
+all: pdf test
+
+test:
+ +gmake -C test
+
+clean: cleanpdf cleantest
+
+cleanpdf:
+ cd content && $(LATEXMK) -C
+ cd content && $(LATEXMK) -r latexmk.opt -C
+
+cleantest:
+ +-gmake -C clean
+
+FORCE:
+.PHONY: all pdf test clean cleanpdf cleantest FORCE