From 0569db414ea03efb53547b8223161e32199e4348 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Thu, 25 Dec 2014 13:34:35 +0100 Subject: Resolve arguments separate from target. --- Makefile | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index a3b84a4..697cca2 100644 --- a/Makefile +++ b/Makefile @@ -5,12 +5,28 @@ source_basename = EUT/2nd-edition # work around in mediawiki bug parsing blockquote tags on same line re_blockquote = s|\n*()\n*|\n$$1\n|g +filters = ./pandoc-filter-sections ./pandoc-filter-bib + export PANDOC_CITEPROC_FILE = $(stem).bib #PANDOC_CITEPROC_FILE = $(stem).bib # To produce final document: make -B STATUS=final STATUS ?= draft +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 papersize=a4paper -V fontsize=10pt +args += -V documentclass=memoir -V headstyles=komalike -V chapterstyle=ell +args += -V classoption=oneside -V classoption=titlepage -V classoption=$(STATUS) +args += -V lang=english -V langoption=variant=british +args += -V title="Ensuring utmost transparency" +args += -V subtitle="Free Software and Open Standards under the Rules of Procedure of the European Parliament" +args += -V author="Carlo Piana" -V author="Ulf Öberg" +args += -V date="" + all: $(stem).pdf download: @@ -26,17 +42,4 @@ $(stem).mediawiki: $(stem).raw < $< > $@ $(stem).pdf: $(stem).mediawiki template.tex - pandoc -f mediawiki --template=template.tex --latex-engine=xelatex \ - -H header.tex -B before.tex -A after.tex \ - --filter ./pandoc-filter-sections --filter ./pandoc-filter-bib \ - --bibliography=$(PANDOC_CITEPROC_FILE) \ - -V mainfont="Lora" -V sansfont="Quattrocento Sans" -V monofont="Inconsolata" \ - -V papersize=a4paper -V fontsize=10pt \ - -V documentclass=memoir -V headstyles=komalike -V chapterstyle=ell \ - -V classoption=oneside -V classoption=titlepage -V classoption=$(STATUS) \ - -V lang=english -V langoption=variant=british \ - -V title="Ensuring utmost transparency" \ - -V subtitle="Free Software and Open Standards under the Rules of Procedure of the European Parliament" \ - -V author="Carlo Piana" -V author="Ulf Öberg" \ - -V date="" \ - -o $@ $< + pandoc -f mediawiki $(args) -o $@ $< -- cgit v1.2.3