Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <gerwitm@lovullo.com>2015-07-09 17:00:19 -0400
committerMike Gerwitz <gerwitm@lovullo.com>2015-07-10 12:46:34 -0400
commit4c023247201855a1a93806bf7f8929ee37bb4ec1 (patch)
tree96149193b88427fb92ed1820a3fda6f2ff9f22d1 /Makefile.am
parenta6de312b82352575a79e23627efec274f4a31b98 (diff)
downloadtame-4c023247201855a1a93806bf7f8929ee37bb4ec1.tar.gz
tame-4c023247201855a1a93806bf7f8929ee37bb4ec1.tar.bz2
tame-4c023247201855a1a93806bf7f8929ee37bb4ec1.zip
*.apply template generation during build
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am30
1 files changed, 26 insertions, 4 deletions
diff --git a/Makefile.am b/Makefile.am
index 7b81cae..0566e6d 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)