From 99a3f6d7f827af3fe1ec0d2f9679c77821310d0e Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Thu, 30 Mar 2017 14:20:32 +0200 Subject: Validate local Perl filters before use. --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Makefile') 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 -- cgit v1.2.3