summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2014-12-30 15:19:54 +0100
committerJonas Smedegaard <dr@jones.dk>2014-12-30 15:19:54 +0100
commit6c7875cda907835abeab1ab358c5d3d101c58a7d (patch)
treec3fa0969e286a896e0aa0f67c7dc76679e59a414 /Makefile
parent5c2d30c6382dec9b2746fb913b169038bf11d402 (diff)
Tidy Makefile: Split enabling citeproc and exporting it to environment.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 6 insertions, 6 deletions
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 $@ $<