From 6c7875cda907835abeab1ab358c5d3d101c58a7d Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Tue, 30 Dec 2014 15:19:54 +0100 Subject: Tidy Makefile: Split enabling citeproc and exporting it to environment. --- Makefile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index be72240..272415d 100644 --- a/Makefile +++ b/Makefile @@ -2,13 +2,12 @@ stem = eut source_baseurl = http://euwiki.org/ source_basename = EUT/2nd-edition +citeproc_file = $(stem).bib + templates = template.tex header.tex before.tex after.tex filters = ./pandoc-memoir ./pandoc-cs1 - -export PANDOC_CITEPROC_FILE = $(stem).bib -filters += $(if $(PANDOC_CITEPROC_FILE),pandoc-citeproc) - +filters += $(if $(citeproc_file),pandoc-citeproc) filters += ./pandoc-iri localfilters = $(filter ./%,$(filters)) @@ -18,8 +17,9 @@ STATUS ?= draft title = Ensuring utmost transparency subtitle = Free Software and Open Standards under the Rules of Procedure of the European Parliament +env_filter += $(citeproc_file:%=PANDOC_CITEPROC_FILE=%) args_filter += $(filters:%=--filter %) -args_meta += $(PANDOC_CITEPROC_FILE:%=-M bibliography=%) +args_meta += $(citeproc_file:%=-M bibliography=%) args_meta += -V lang=english -V langoption=variant=british args_meta += -M title="$(title) - $(subtitle)" args_meta += -V title="$(title)" @@ -49,7 +49,7 @@ $(stem).mediawiki: $(stem).raw ./mediawiki-uri-escape $@ $(stem).native: $(stem).mediawiki $(localfilters) - pandoc -f mediawiki $(args_meta) $(args_filter) -o $@ $< + $(env_filter) pandoc -f mediawiki $(args_meta) $(args_filter) -o $@ $< $(flavors:%=$(stem)-%.pdf) $(stem).tex: $(stem).native $(templates) pandoc $(args_meta) $(args_latex) $(args_$(@:$(stem)-%.pdf=%)) -o $@ $< -- cgit v1.2.3