1
0
Fork 0

Add hoxsl to configure.ac

* configure.ac (HOXSL): Add check.
  Add generation of ./hoxsl symlink.
* Makefile.am (%.apply): Add generation of apply files.
* .gitignore (/hoxsl): Ignore generated symlink.
  (*.xsl.apply): Ignore hoxsl-generated files.
master
Mike Gerwitz 2017-06-19 11:29:48 -04:00
parent 7bd95153f9
commit cd240d5fbb
3 changed files with 31 additions and 1 deletions

4
.gitignore vendored
View File

@ -15,10 +15,14 @@ Makefile.in
Makefile
VERSION
/src/init.xsl
/hoxsl
# generated docs
/src/**/*.texi
# hoxsl-generated
*.xsl.apply
# generated by xspec or test runner
/test/index.html
/test/**/xspec/

View File

@ -18,11 +18,26 @@
SUBDIRS = doc
path_src = src
path_test = test
#
# all source files will be run through hoxsl; see `applies' target
apply_src := $(shell find "$(path_src)" "$(path_test)" \
-name '*.xsl' )
apply_dest := $(apply_src:%.xsl=%.xsl.apply)
.DELETE_ON_ERROR:
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)/src/transform/apply-gen.xsl" \
"$<" > "$@"

View File

@ -62,5 +62,16 @@ AC_SUBST([SET_SRCURI], [$set_srcuri])
AC_CONFIG_FILES([Makefile doc/Makefile doc/config.texi src/init.xsl VERSION])
: ${HOXSL=hoxsl}
AC_ARG_VAR([HOXSL], [Path to hoxsl])
AC_MSG_CHECKING([hoxsl path HOXSL=$HOXSL])
AS_IF(test ! -d "$HOXSL",
AC_MSG_ERROR([hoxsl path '$HOXSL' does not exist!]))
AC_MSG_RESULT(found)
AC_MSG_NOTICE([creating symlink ./hoxsl])
ln -sf "$HOXSL" hoxsl
AC_OUTPUT