From 4c023247201855a1a93806bf7f8929ee37bb4ec1 Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Thu, 9 Jul 2015 17:00:19 -0400 Subject: [PATCH] *.apply template generation during build --- Makefile.am | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/Makefile.am b/Makefile.am index 7b81cae1..0566e6d1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -18,12 +18,34 @@ SUBDIRS = doc -path_src := src -path_test := test +path_src = src +path_test = test -.PHONY: check test texis +# all source files will be run through hoxsl; see `applies' target +apply_src := $(shell find "$(path_src)" -name '*.xsl') +apply_dest := $(apply_src:%.xsl=%.xsl.apply) + +# needed by test runner +export SAXON_CP + + +.DELETE_ON_ERROR: + +.PHONY: check test texis applies + +.DEFAULT_GOAL := applies test: check -check: +check: | applies $(path_test)/runner +# the "applies" are hoxsl-generated stylesheets containing definitions to +# permit partial function application +applies: $(apply_dest) +%.apply: % + $(JAVA) -jar "$(SAXON_CP)" \ + -xsl:"$(HOXSL)/transform/apply-gen.xsl" \ + "$<" > "$@" + +clean-local: + $(RM) $(apply_dest)