diff options
author | Jonas Smedegaard <dr@jones.dk> | 2014-12-30 15:19:54 +0100 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2014-12-30 15:19:54 +0100 |
commit | 6c7875cda907835abeab1ab358c5d3d101c58a7d (patch) | |
tree | c3fa0969e286a896e0aa0f67c7dc76679e59a414 | |
parent | 5c2d30c6382dec9b2746fb913b169038bf11d402 (diff) |
Tidy Makefile: Split enabling citeproc and exporting it to environment.
-rw-r--r-- | Makefile | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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 $@ $< |