summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2014-12-25 15:55:56 +0100
committerJonas Smedegaard <dr@jones.dk>2014-12-25 15:55:56 +0100
commit70ab50a37d8cd144875cb5283d38f8f4f6706aa4 (patch)
treeebb1fecb0d16b5353d2514b3510f73585e535e72
parentfb9efe5c78de9eab8f6ebb59ecbd0a65bbde9145 (diff)
Apply filters only once: Add native format as staging target.
-rw-r--r--Makefile11
1 files changed, 7 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 53825dc..fba545f 100644
--- a/Makefile
+++ b/Makefile
@@ -17,10 +17,10 @@ export PANDOC_CITEPROC_FILE = $(stem).bib
# To produce final document: make -B STATUS=final
STATUS ?= draft
+args_filter += $(filters:%=--filter %)
+args_filter += $(PANDOC_CITEPROC_FILE:%=--bibliography=%)
args += --template=template.tex --latex-engine=xelatex
args += -H header.tex -B before.tex -A after.tex
-args += $(filters:%=--filter %)
-args += $(PANDOC_CITEPROC_FILE:%=--bibliography=%)
args += -V mainfont="Lora" -V sansfont="Quattrocento Sans" -V monofont="Inconsolata"
args += -V documentclass=memoir -V headstyles=komalike -V chapterstyle=ell
args += -V classoption=titlepage -V classoption=$(STATUS)
@@ -49,5 +49,8 @@ $(stem).mediawiki: $(stem).raw
-e '$(re_urlencode);' \
< $< > $@
-$(flavors:%=$(stem)-%.pdf): $(stem)-%.pdf: $(stem).mediawiki $(templates) $(filters)
- pandoc -f mediawiki $(args_$*) -o $@ $<
+$(stem).native: $(stem).mediawiki $(filters)
+ pandoc -f mediawiki $(args_filter) -o $@ $<
+
+$(flavors:%=$(stem)-%.pdf): $(stem)-%.pdf: $(stem).native $(templates)
+ pandoc $(args_$*) -o $@ $<