diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..17a8d13 --- /dev/null +++ b/Makefile | |||
@@ -0,0 +1,38 @@ | |||
1 | .PHONY: all clean | ||
2 | |||
3 | MARKDOWN_FILES := $(wildcard *.md) | ||
4 | TEX_FILES := $(patsubst %.md,build/%.tex,$(MARKDOWN_FILES)) | ||
5 | PDF_FILES := $(patsubst %.md,build/%.pdf,$(MARKDOWN_FILES)) | ||
6 | |||
7 | .SECONDARY: $(TEX_FILES) | ||
8 | |||
9 | all: $(PDF_FILES) | ||
10 | |||
11 | clean: | ||
12 | $(RM) -r build | ||
13 | |||
14 | build: | ||
15 | mkdir -p build | ||
16 | |||
17 | lua-filters/minted/minted.lua: | ||
18 | git submodule update --init | ||
19 | |||
20 | build/%.tex: %.md build beamer-template.tex lua-filters/minted/minted.lua | ||
21 | pandoc "$<" \ | ||
22 | --from markdown \ | ||
23 | --to beamer \ | ||
24 | --template ./beamer-template.tex \ | ||
25 | --lua-filter ./lua-filters/minted/minted.lua \ | ||
26 | --biblatex \ | ||
27 | -so "$@" | ||
28 | |||
29 | build/%.pdf: build/%.tex bibliography.bib | ||
30 | cd build; latexmk \ | ||
31 | -xelatex \ | ||
32 | -interaction=nonstopmode \ | ||
33 | -shell-escape \ | ||
34 | -8bit \ | ||
35 | -file-line-error \ | ||
36 | -output-directory=./build \ | ||
37 | "$*.tex" | ||
38 | cp build/build/$*.pdf build | ||