summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2017-03-30 14:20:32 +0200
committerJonas Smedegaard <dr@jones.dk>2017-03-30 14:20:32 +0200
commit99a3f6d7f827af3fe1ec0d2f9679c77821310d0e (patch)
tree36f728e41be81bf287f59eb93823f84dc612af36
parentc65cb773b6025c32a7980aac8da34b48948cf658 (diff)
Validate local Perl filters before use.
-rw-r--r--Makefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 126a29e..83a48af 100644
--- a/Makefile
+++ b/Makefile
@@ -17,7 +17,7 @@ markdown_includes = copyright.md colophon.md
includes += $(markdown_includes:.md=.tex)
-localfilters = $(filter ./%,$(filters))
+localperlfilters = $(filter ./%,$(filters))
title = Ensuring utmost transparency
subtitle = Free Software and Open Standards under the Rules of Procedure of the European Parliament
@@ -85,8 +85,12 @@ $(stem).mw: $(stem).raw
./mediawiki-uri-escape $@
./mediawiki-matter $@
-$(stem).native: $(stem).mw $(localfilters)
+$(stem).native: $(stem).mw $(localperlfilters)
+ # validate syntax and dependencies of local Perl filters
+ set -e; $(foreach filter,$(localperlfilters),perl -c $(filter);)
+ # convert content from mediawiki to pandoc-native
$(env_filter) pandoc -f mediawiki --smart $(args_meta) $(args_filter) -o $@ $<
+ # tweak pandoc-native data
./native-hacks $@
$(markdown_includes:.md=.tex): %.tex: %.md