From ff4e39fb667139c80934fb4b6bf62f2c4271b30d Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Sun, 13 Apr 2003 14:41:40 +0000 Subject: [PATCH] boostbook.jam: - Factor out XSLT processing rules - Add "tests" rule to build testcases and Jamfiles doxygen.jam: - Use Doxygen as-is, without the monolithic XML file patch xsltproc.jam: - xsltproc XSLT toolset user-config.jam: - add "using xsltproc" [SVN r18241] --- new/boostbook.jam | 89 ++++----------------------------------------- new/doxygen.jam | 37 +++++++++++-------- new/user-config.jam | 3 ++ new/xsltproc.jam | 86 +++++++++++++++++++++++++++++++++++++++++++ v2/boostbook.jam | 89 ++++----------------------------------------- v2/doxygen.jam | 37 +++++++++++-------- v2/user-config.jam | 3 ++ v2/xsltproc.jam | 86 +++++++++++++++++++++++++++++++++++++++++++ 8 files changed, 234 insertions(+), 196 deletions(-) create mode 100644 new/xsltproc.jam create mode 100644 v2/xsltproc.jam diff --git a/new/boostbook.jam b/new/boostbook.jam index b5c996a0d..9e3645bf0 100644 --- a/new/boostbook.jam +++ b/new/boostbook.jam @@ -21,8 +21,8 @@ import scanner ; import make ; feature.feature xsl:param : : free ; -feature.feature format : html onehtml man pdf ps docbook fo - : incidental implicit composite propagated ; +feature.feature format : html onehtml man pdf ps docbook fo tests + : incidental implicit composite ; type.register DTDXML : dtdxml ; type.register XML : xml ; @@ -34,12 +34,11 @@ type.register PS : ps ; type.register XSLT : xsl ; type.register HTMLDIR ; type.register MANPAGES ; - -# Generates handle -> * rules a bit strangely, so don't try to use them for now -#generators.register-standard boostbook.xslt : XML XSLT : * ; +type.register TESTS : tests ; generators.register-standard boostbook.dtdxml-to-boostbook : DTDXML : XML ; generators.register-standard boostbook.boostbook-to-docbook : XML : DOCBOOK ; +generators.register-standard boostbook.boostbook-to-tests : XML : TESTS ; generators.register-standard boostbook.docbook-to-onehtml : DOCBOOK : HTML ; generators.register-standard boostbook.docbook-to-htmldir : DOCBOOK : HTMLDIR ; generators.register-standard boostbook.docbook-to-manpages : DOCBOOK : MANPAGES ; @@ -53,9 +52,7 @@ generators.register-standard boostbook.docbook-to-fo : DOCBOOK : FO ; # docbook-dtd-dir: The DocBook DTD directory. If not provided, we use # DOCBOOK_DTD_DIR From the environment (if available). Otherwise, we let # the XML processor load the DTD remotely. -# -# xsltproc: The xsltproc executable -rule init ( docbook-xsl-dir ? : docbook-dtd-dir ? : xsltproc ? ) +rule init ( docbook-xsl-dir ? : docbook-dtd-dir ? ) { if ! $(docbook-xsl-dir) { @@ -67,11 +64,6 @@ rule init ( docbook-xsl-dir ? : docbook-dtd-dir ? : xsltproc ? ) docbook-dtd-dir = [ modules.peek : DOCBOOK_DTD_DIR ] ; } - if ! $(xsltproc) - { - xsltroc = [ modules.peek : XSLTPROC ] ; - } - if ! $(.initialized) { $(.initialized) = true ; @@ -80,7 +72,6 @@ rule init ( docbook-xsl-dir ? : docbook-dtd-dir ? : xsltproc ? ) local boost-root = [ path.make [ modules.peek : BOOST_ROOT ] ] ; .boostbook-xsl-dir = [ path.join $(boost-root) tools boostbook xsl/ ] ; .boostbook-dtd-dir = [ path.join $(boost-root) tools boostbook dtd/ ] ; - .xsltproc = $(xsltproc) ; } } @@ -104,36 +95,6 @@ rule docbook-dtd-dir return $(.docbook-dtd-dir) ; } -rule xslt ( target : source stylesheet : properties * ) -{ - local flags ; - for local param in [ feature.get-values : $(properties) ] - { - local namevalue = [ regex.split $(param) "=" ] ; - flags += --stringparam $(namevalue[1]) $(namevalue[2]) ; - } - STYLESHEET on $(target) = $(stylesheet) ; - FLAGS on $(target) = $(flags) ; - NAME on $(target) = $(.xsltproc) ; - xslt-xsltproc $(target) : $(source) ; -} - -rule xslt-dir ( target : source stylesheet : properties * : dirname ) -{ - local flags ; - for local param in [ feature.get-values : $(properties) ] - { - local namevalue = [ regex.split $(param) "=" ] ; - flags += --stringparam $(namevalue[1]) $(namevalue[2]) ; - } - - STYLESHEET on $(target) = $(stylesheet) ; - FLAGS on $(target) = $(flags) ; - DIRECTORY on $(target) = $(dirname) ; - NAME on $(target) = $(.xsltproc) ; - xslt-xsltproc-dir $(target) : $(source) ; -} - rule dtdxml-to-boostbook ( target : source : properties * ) { xslt $(target) : $(source) "$(.boostbook-xsl-dir)/dtd/dtd2boostbook.xsl" @@ -286,6 +247,7 @@ rule boostbook-target-class ( name : project : sources * : requirements * case fo : type = FO ; case pdf : type = PDF ; case ps : type = PS ; + case tests : type = TESTS ; } if $(manifest) @@ -332,33 +294,6 @@ rule boostbook ( target-name : sources * : requirements * : default-build * ) ] ; } -if [ modules.peek : NT ] -{ - actions xslt-xsltproc - { - set XML_CATALOG_FILES=catalog.xml - $(NAME:E=xsltproc) $(FLAGS) --xinclude -o $(<) $(STYLESHEET) $(>) - } - - actions xslt-xsltproc-dir - { - set XML_CATALOG_FILES=catalog.xml - $(NAME:E=xsltproc) $(FLAGS) --xinclude -o $(DIRECTORY)/ $(STYLESHEET) $(>) - } -} -else -{ - actions xslt-xsltproc - { - XML_CATALOG_FILES=catalog.xml $(NAME:E=xsltproc) $(FLAGS) --xinclude -o $(<) $(STYLESHEET) $(>) - } - - actions xslt-xsltproc-dir - { - XML_CATALOG_FILES=catalog.xml $(NAME:E=xsltproc) $(FLAGS) --xinclude -o $(DIRECTORY)/ $(STYLESHEET) $(>) - } -} - ############################################################################# # Dependency scanners ############################################################################# @@ -401,9 +336,8 @@ type.set-scanner XML : xinclude-scanner ; ############################################################################# # Testsuite handling ############################################################################# -rule testsuite-to-jamfiles ( target : source : properties * ) +rule boostbook-to-tests ( target : source : properties * ) { - ECHO $(target) ; local boost_root = [ modules.peek : BOOST_ROOT ] ; local native-path = [ path.native [ path.join $(.boostbook-xsl-dir) testing/ ] ] ; @@ -412,12 +346,3 @@ rule testsuite-to-jamfiles ( target : source : properties * ) : $(properties) boost.root=$(boost_root) ; } - -rule testsuite ( target-name : source : requirements * ) -{ - local project = [ CALLER_MODULE ] ; - - make $(target-name) : $(source) : boostbook.testsuite-to-jamfiles - : $(requirements) - ; -} diff --git a/new/doxygen.jam b/new/doxygen.jam index e18c0fa04..68018b0af 100644 --- a/new/doxygen.jam +++ b/new/doxygen.jam @@ -56,32 +56,37 @@ rule extract-xml ( target : sources * : properties * ) RECURSIVE on $(target) = NO ; } - PATTERNS on $(target) = [ feature.get-values : $(properties) ] ; - NAME on $(target) = [ name ] ; - doxygen-action $(<) : $(>) ; + local index-target = $(target:B="xml/index":S=".xml") ; + PATTERNS on $(index-target) = + [ feature.get-values : $(properties) ] ; + NAME on $(index-target) = [ name ] ; + doxygen-action $(index-target) : $(>) ; + + local xsl-dir = [ boostbook.xsl-dir ] ; + DEPENDS $(target) : $(index-target) ; + xslt $(target) : $(index-target) "$(xsl-dir)/doxygen/collect.xsl" + : doxygen.xml.path=/home/gregod/Projects/Boost/boost/libs/any/doc/xml ; } actions doxygen-action { - $(NAME:E=doxygen) -g $(<:S=.doxyfile) - echo "GENERATE_HTML = NO" >> $(<:S=.doxyfile) - echo "GENERATE_LATEX = NO" >> $(<:S=.doxyfile) - echo "GENERATE_XML = YES" >> $(<:S=.doxyfile) - echo "INPUT = $(>) " >> $(<:S=.doxyfile) - echo "MONOLITHIC_XML_FILE = $(<)" >> $(<:S=.doxyfile) - echo "RECURSIVE = $(RECURSIVE) " >> $(<:S=.doxyfile) - echo "FILE_PATTERNS = $(PATTERNS) " >> $(<:S=.doxyfile) - $(NAME:E=doxygen) $(<:S=.doxyfile) ; + $(NAME:E=doxygen) -g doxyfile + echo "GENERATE_HTML = NO" >> doxyfile + echo "GENERATE_LATEX = NO" >> doxyfile + echo "GENERATE_XML = YES" >> doxyfile + echo "INPUT = $(>) " >> doxyfile + echo "RECURSIVE = $(RECURSIVE) " >> doxyfile + echo "FILE_PATTERNS = $(PATTERNS) " >> doxyfile + $(NAME:E=doxygen) doxyfile ; } rule xml-to-boostbook ( target : source : properties * ) { local xsl-dir = [ boostbook.xsl-dir ] ; - boostbook.xslt $(target) - : $(source) "$(xsl-dir)/doxygen/doxygen2boostbook.xsl" - : $(properties) - ; + xslt $(target) : $(source) "$(xsl-dir)/doxygen/doxygen2boostbook.xsl" + : $(properties) + ; } rule doxygen-xml-target-class ( name : project : sources * : requirements * diff --git a/new/user-config.jam b/new/user-config.jam index b6f2aa72a..7798ac693 100644 --- a/new/user-config.jam +++ b/new/user-config.jam @@ -42,6 +42,9 @@ import toolset : using ; # Configure with explicit installation prefix # using qt : /usr/opt/qt ; +# xsltproc (from libxslt) configuration +using xsltproc ; + # BoostBook configuration using boostbook ; # using boostbook : /home/gregod/Projects/share/docbook-xsl-1.60.1/ diff --git a/new/xsltproc.jam b/new/xsltproc.jam new file mode 100644 index 000000000..319be7ec8 --- /dev/null +++ b/new/xsltproc.jam @@ -0,0 +1,86 @@ +# Copyright (C) 2003 Doug Gregor. Permission to copy, use, modify, +# sell and distribute this software is granted provided this +# copyright notice appears in all copies. This software is provided +# "as is" without express or implied warranty, and with no claim as +# to its suitability for any purpose. + +# This module defines rules to apply an XSLT stylesheet to an XML file +# using the xsltproc driver, part of libxslt. + +import feature ; +import regex ; + +# Initialize xsltproc support. The parameters are: +# xsltproc: The xsltproc executable +rule init ( xsltproc ? ) +{ + if ! $(xsltproc) + { + xsltproc = [ modules.peek : XSLTPROC ] ; + } + + if ! $(.initialized) + { + $(.initialized) = true ; + .xsltproc = $(xsltproc) ; + } +} + +rule xslt ( target : source stylesheet : properties * ) +{ + local flags ; + for local param in [ feature.get-values : $(properties) ] + { + local namevalue = [ regex.split $(param) "=" ] ; + flags += --stringparam $(namevalue[1]) $(namevalue[2]) ; + } + STYLESHEET on $(target) = $(stylesheet) ; + FLAGS on $(target) = $(flags) ; + NAME on $(target) = $(.xsltproc) ; + xslt-xsltproc $(target) : $(source) ; +} + +rule xslt-dir ( target : source stylesheet : properties * : dirname ) +{ + local flags ; + for local param in [ feature.get-values : $(properties) ] + { + local namevalue = [ regex.split $(param) "=" ] ; + flags += --stringparam $(namevalue[1]) $(namevalue[2]) ; + } + + STYLESHEET on $(target) = $(stylesheet) ; + FLAGS on $(target) = $(flags) ; + DIRECTORY on $(target) = $(dirname) ; + NAME on $(target) = $(.xsltproc) ; + xslt-xsltproc-dir $(target) : $(source) ; +} +if [ modules.peek : NT ] +{ + actions xslt-xsltproc + { + set XML_CATALOG_FILES=catalog.xml + $(NAME:E=xsltproc) $(FLAGS) --xinclude -o $(<) $(STYLESHEET) $(>) + } + + actions xslt-xsltproc-dir + { + set XML_CATALOG_FILES=catalog.xml + $(NAME:E=xsltproc) $(FLAGS) --xinclude -o $(DIRECTORY)/ $(STYLESHEET) $(>) + } +} +else +{ + actions xslt-xsltproc + { + XML_CATALOG_FILES=catalog.xml $(NAME:E=xsltproc) $(FLAGS) --xinclude -o $(<) $(STYLESHEET) $(>) + } + + actions xslt-xsltproc-dir + { + XML_CATALOG_FILES=catalog.xml $(NAME:E=xsltproc) $(FLAGS) --xinclude -o $(DIRECTORY)/ $(STYLESHEET) $(>) + } +} + +IMPORT $(__name__) : xslt : : xslt ; +IMPORT $(__name__) : xslt-dir : : xslt-dir ; diff --git a/v2/boostbook.jam b/v2/boostbook.jam index b5c996a0d..9e3645bf0 100644 --- a/v2/boostbook.jam +++ b/v2/boostbook.jam @@ -21,8 +21,8 @@ import scanner ; import make ; feature.feature xsl:param : : free ; -feature.feature format : html onehtml man pdf ps docbook fo - : incidental implicit composite propagated ; +feature.feature format : html onehtml man pdf ps docbook fo tests + : incidental implicit composite ; type.register DTDXML : dtdxml ; type.register XML : xml ; @@ -34,12 +34,11 @@ type.register PS : ps ; type.register XSLT : xsl ; type.register HTMLDIR ; type.register MANPAGES ; - -# Generates handle -> * rules a bit strangely, so don't try to use them for now -#generators.register-standard boostbook.xslt : XML XSLT : * ; +type.register TESTS : tests ; generators.register-standard boostbook.dtdxml-to-boostbook : DTDXML : XML ; generators.register-standard boostbook.boostbook-to-docbook : XML : DOCBOOK ; +generators.register-standard boostbook.boostbook-to-tests : XML : TESTS ; generators.register-standard boostbook.docbook-to-onehtml : DOCBOOK : HTML ; generators.register-standard boostbook.docbook-to-htmldir : DOCBOOK : HTMLDIR ; generators.register-standard boostbook.docbook-to-manpages : DOCBOOK : MANPAGES ; @@ -53,9 +52,7 @@ generators.register-standard boostbook.docbook-to-fo : DOCBOOK : FO ; # docbook-dtd-dir: The DocBook DTD directory. If not provided, we use # DOCBOOK_DTD_DIR From the environment (if available). Otherwise, we let # the XML processor load the DTD remotely. -# -# xsltproc: The xsltproc executable -rule init ( docbook-xsl-dir ? : docbook-dtd-dir ? : xsltproc ? ) +rule init ( docbook-xsl-dir ? : docbook-dtd-dir ? ) { if ! $(docbook-xsl-dir) { @@ -67,11 +64,6 @@ rule init ( docbook-xsl-dir ? : docbook-dtd-dir ? : xsltproc ? ) docbook-dtd-dir = [ modules.peek : DOCBOOK_DTD_DIR ] ; } - if ! $(xsltproc) - { - xsltroc = [ modules.peek : XSLTPROC ] ; - } - if ! $(.initialized) { $(.initialized) = true ; @@ -80,7 +72,6 @@ rule init ( docbook-xsl-dir ? : docbook-dtd-dir ? : xsltproc ? ) local boost-root = [ path.make [ modules.peek : BOOST_ROOT ] ] ; .boostbook-xsl-dir = [ path.join $(boost-root) tools boostbook xsl/ ] ; .boostbook-dtd-dir = [ path.join $(boost-root) tools boostbook dtd/ ] ; - .xsltproc = $(xsltproc) ; } } @@ -104,36 +95,6 @@ rule docbook-dtd-dir return $(.docbook-dtd-dir) ; } -rule xslt ( target : source stylesheet : properties * ) -{ - local flags ; - for local param in [ feature.get-values : $(properties) ] - { - local namevalue = [ regex.split $(param) "=" ] ; - flags += --stringparam $(namevalue[1]) $(namevalue[2]) ; - } - STYLESHEET on $(target) = $(stylesheet) ; - FLAGS on $(target) = $(flags) ; - NAME on $(target) = $(.xsltproc) ; - xslt-xsltproc $(target) : $(source) ; -} - -rule xslt-dir ( target : source stylesheet : properties * : dirname ) -{ - local flags ; - for local param in [ feature.get-values : $(properties) ] - { - local namevalue = [ regex.split $(param) "=" ] ; - flags += --stringparam $(namevalue[1]) $(namevalue[2]) ; - } - - STYLESHEET on $(target) = $(stylesheet) ; - FLAGS on $(target) = $(flags) ; - DIRECTORY on $(target) = $(dirname) ; - NAME on $(target) = $(.xsltproc) ; - xslt-xsltproc-dir $(target) : $(source) ; -} - rule dtdxml-to-boostbook ( target : source : properties * ) { xslt $(target) : $(source) "$(.boostbook-xsl-dir)/dtd/dtd2boostbook.xsl" @@ -286,6 +247,7 @@ rule boostbook-target-class ( name : project : sources * : requirements * case fo : type = FO ; case pdf : type = PDF ; case ps : type = PS ; + case tests : type = TESTS ; } if $(manifest) @@ -332,33 +294,6 @@ rule boostbook ( target-name : sources * : requirements * : default-build * ) ] ; } -if [ modules.peek : NT ] -{ - actions xslt-xsltproc - { - set XML_CATALOG_FILES=catalog.xml - $(NAME:E=xsltproc) $(FLAGS) --xinclude -o $(<) $(STYLESHEET) $(>) - } - - actions xslt-xsltproc-dir - { - set XML_CATALOG_FILES=catalog.xml - $(NAME:E=xsltproc) $(FLAGS) --xinclude -o $(DIRECTORY)/ $(STYLESHEET) $(>) - } -} -else -{ - actions xslt-xsltproc - { - XML_CATALOG_FILES=catalog.xml $(NAME:E=xsltproc) $(FLAGS) --xinclude -o $(<) $(STYLESHEET) $(>) - } - - actions xslt-xsltproc-dir - { - XML_CATALOG_FILES=catalog.xml $(NAME:E=xsltproc) $(FLAGS) --xinclude -o $(DIRECTORY)/ $(STYLESHEET) $(>) - } -} - ############################################################################# # Dependency scanners ############################################################################# @@ -401,9 +336,8 @@ type.set-scanner XML : xinclude-scanner ; ############################################################################# # Testsuite handling ############################################################################# -rule testsuite-to-jamfiles ( target : source : properties * ) +rule boostbook-to-tests ( target : source : properties * ) { - ECHO $(target) ; local boost_root = [ modules.peek : BOOST_ROOT ] ; local native-path = [ path.native [ path.join $(.boostbook-xsl-dir) testing/ ] ] ; @@ -412,12 +346,3 @@ rule testsuite-to-jamfiles ( target : source : properties * ) : $(properties) boost.root=$(boost_root) ; } - -rule testsuite ( target-name : source : requirements * ) -{ - local project = [ CALLER_MODULE ] ; - - make $(target-name) : $(source) : boostbook.testsuite-to-jamfiles - : $(requirements) - ; -} diff --git a/v2/doxygen.jam b/v2/doxygen.jam index e18c0fa04..68018b0af 100644 --- a/v2/doxygen.jam +++ b/v2/doxygen.jam @@ -56,32 +56,37 @@ rule extract-xml ( target : sources * : properties * ) RECURSIVE on $(target) = NO ; } - PATTERNS on $(target) = [ feature.get-values : $(properties) ] ; - NAME on $(target) = [ name ] ; - doxygen-action $(<) : $(>) ; + local index-target = $(target:B="xml/index":S=".xml") ; + PATTERNS on $(index-target) = + [ feature.get-values : $(properties) ] ; + NAME on $(index-target) = [ name ] ; + doxygen-action $(index-target) : $(>) ; + + local xsl-dir = [ boostbook.xsl-dir ] ; + DEPENDS $(target) : $(index-target) ; + xslt $(target) : $(index-target) "$(xsl-dir)/doxygen/collect.xsl" + : doxygen.xml.path=/home/gregod/Projects/Boost/boost/libs/any/doc/xml ; } actions doxygen-action { - $(NAME:E=doxygen) -g $(<:S=.doxyfile) - echo "GENERATE_HTML = NO" >> $(<:S=.doxyfile) - echo "GENERATE_LATEX = NO" >> $(<:S=.doxyfile) - echo "GENERATE_XML = YES" >> $(<:S=.doxyfile) - echo "INPUT = $(>) " >> $(<:S=.doxyfile) - echo "MONOLITHIC_XML_FILE = $(<)" >> $(<:S=.doxyfile) - echo "RECURSIVE = $(RECURSIVE) " >> $(<:S=.doxyfile) - echo "FILE_PATTERNS = $(PATTERNS) " >> $(<:S=.doxyfile) - $(NAME:E=doxygen) $(<:S=.doxyfile) ; + $(NAME:E=doxygen) -g doxyfile + echo "GENERATE_HTML = NO" >> doxyfile + echo "GENERATE_LATEX = NO" >> doxyfile + echo "GENERATE_XML = YES" >> doxyfile + echo "INPUT = $(>) " >> doxyfile + echo "RECURSIVE = $(RECURSIVE) " >> doxyfile + echo "FILE_PATTERNS = $(PATTERNS) " >> doxyfile + $(NAME:E=doxygen) doxyfile ; } rule xml-to-boostbook ( target : source : properties * ) { local xsl-dir = [ boostbook.xsl-dir ] ; - boostbook.xslt $(target) - : $(source) "$(xsl-dir)/doxygen/doxygen2boostbook.xsl" - : $(properties) - ; + xslt $(target) : $(source) "$(xsl-dir)/doxygen/doxygen2boostbook.xsl" + : $(properties) + ; } rule doxygen-xml-target-class ( name : project : sources * : requirements * diff --git a/v2/user-config.jam b/v2/user-config.jam index b6f2aa72a..7798ac693 100644 --- a/v2/user-config.jam +++ b/v2/user-config.jam @@ -42,6 +42,9 @@ import toolset : using ; # Configure with explicit installation prefix # using qt : /usr/opt/qt ; +# xsltproc (from libxslt) configuration +using xsltproc ; + # BoostBook configuration using boostbook ; # using boostbook : /home/gregod/Projects/share/docbook-xsl-1.60.1/ diff --git a/v2/xsltproc.jam b/v2/xsltproc.jam new file mode 100644 index 000000000..319be7ec8 --- /dev/null +++ b/v2/xsltproc.jam @@ -0,0 +1,86 @@ +# Copyright (C) 2003 Doug Gregor. Permission to copy, use, modify, +# sell and distribute this software is granted provided this +# copyright notice appears in all copies. This software is provided +# "as is" without express or implied warranty, and with no claim as +# to its suitability for any purpose. + +# This module defines rules to apply an XSLT stylesheet to an XML file +# using the xsltproc driver, part of libxslt. + +import feature ; +import regex ; + +# Initialize xsltproc support. The parameters are: +# xsltproc: The xsltproc executable +rule init ( xsltproc ? ) +{ + if ! $(xsltproc) + { + xsltproc = [ modules.peek : XSLTPROC ] ; + } + + if ! $(.initialized) + { + $(.initialized) = true ; + .xsltproc = $(xsltproc) ; + } +} + +rule xslt ( target : source stylesheet : properties * ) +{ + local flags ; + for local param in [ feature.get-values : $(properties) ] + { + local namevalue = [ regex.split $(param) "=" ] ; + flags += --stringparam $(namevalue[1]) $(namevalue[2]) ; + } + STYLESHEET on $(target) = $(stylesheet) ; + FLAGS on $(target) = $(flags) ; + NAME on $(target) = $(.xsltproc) ; + xslt-xsltproc $(target) : $(source) ; +} + +rule xslt-dir ( target : source stylesheet : properties * : dirname ) +{ + local flags ; + for local param in [ feature.get-values : $(properties) ] + { + local namevalue = [ regex.split $(param) "=" ] ; + flags += --stringparam $(namevalue[1]) $(namevalue[2]) ; + } + + STYLESHEET on $(target) = $(stylesheet) ; + FLAGS on $(target) = $(flags) ; + DIRECTORY on $(target) = $(dirname) ; + NAME on $(target) = $(.xsltproc) ; + xslt-xsltproc-dir $(target) : $(source) ; +} +if [ modules.peek : NT ] +{ + actions xslt-xsltproc + { + set XML_CATALOG_FILES=catalog.xml + $(NAME:E=xsltproc) $(FLAGS) --xinclude -o $(<) $(STYLESHEET) $(>) + } + + actions xslt-xsltproc-dir + { + set XML_CATALOG_FILES=catalog.xml + $(NAME:E=xsltproc) $(FLAGS) --xinclude -o $(DIRECTORY)/ $(STYLESHEET) $(>) + } +} +else +{ + actions xslt-xsltproc + { + XML_CATALOG_FILES=catalog.xml $(NAME:E=xsltproc) $(FLAGS) --xinclude -o $(<) $(STYLESHEET) $(>) + } + + actions xslt-xsltproc-dir + { + XML_CATALOG_FILES=catalog.xml $(NAME:E=xsltproc) $(FLAGS) --xinclude -o $(DIRECTORY)/ $(STYLESHEET) $(>) + } +} + +IMPORT $(__name__) : xslt : : xslt ; +IMPORT $(__name__) : xslt-dir : : xslt-dir ;