Add Makefile

The added makefile builds each pdf in its own folder with `latexmk`.

To add a new pdf, just add its path to the main rule.
This commit is contained in:
regnat 2017-04-01 10:44:52 +02:00
parent 9f6f9b90b0
commit 1bdbeb3bda
2 changed files with 18 additions and 0 deletions

1
.latexmkrc Normal file
View File

@ -0,0 +1 @@
$pdf_previewer = evince

17
Makefile Normal file
View File

@ -0,0 +1,17 @@
# borrowed from
# http://tex.stackexchange.com/questions/40738/how-to-properly-make-a-latex-project
.PHONY: all clean
all: grammar/grammar.pdf semantics/semantics.pdf
%.pdf: %.tex FORCE
latexmk -cd -pdf -xelatex -pv -use-make $<
clean:
latexmk -CA
# Fore some reasons that are far behind my understanding of make, The PHONY
# rule doesn't work for the "%.pdf" rule, so let's use this old trick to
# force-rebuild them every time.
FORCE: