-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
40 lines (29 loc) · 882 Bytes
/
Makefile
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
## Markdown extension (e.g. md, markdown, mdown).
MEXT = md
## Bibliography Location
BIB = bib/bibliography.bib
## All markdown files in the working directory except for README.md
README = README.md
SRC = $(filter-out $(README),$(wildcard *.$(MEXT)))
PDFS = $(patsubst %.md,%.pdf,$(SRC))
## Pandoc options to use for all document types
OPTIONS = markdown+simple_tables+table_captions+yaml_metadata_block+smart
SLIDES_DIR = reports/slides
.PHONY: all
all: $(PDFS) slides
%.pdf: %.md config/metadata.yml config/current-date.lua
pandoc -r $(OPTIONS) \
-s \
--pdf-engine=pdflatex \
-F pandoc-crossref \
config/metadata.yml \
--lua-filter=config/current-date.lua \
-o $@ $<
# --template=$(PREFIX)/templates/latex.template \
# --csl=$(PREFIX)/csl/$(CSL).csl \
--filter pandoc-citeproc \
--bibliography=$(BIB)
slides:
$(MAKE) -C $(SLIDES_DIR)
clean:
rm -f *.pdf