From 70ab50a37d8cd144875cb5283d38f8f4f6706aa4 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Thu, 25 Dec 2014 15:55:56 +0100 Subject: Apply filters only once: Add native format as staging target. --- Makefile | 11 +++++++---- 1 file 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 $@ $< -- cgit v1.2.3