2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-16 01:12:13 +00:00

Factored out egregious code duplication

[SVN r27098]
This commit is contained in:
Dave Abrahams
2005-02-04 20:18:33 +00:00
parent b88077a679
commit dc820237b1

View File

@@ -53,36 +53,31 @@ rule compute-xslt-flags ( target : properties * )
}
local rule .xsltproc ( target : source stylesheet : properties * : dirname : action )
{
STYLESHEET on $(target) = $(stylesheet) ;
FLAGS on $(target) = [ compute-xslt-flags $(target) : $(properties) ] ;
NAME on $(target) = $(.xsltproc) ;
for local catalog in [ feature.get-values <catalog> : $(properties) ]
{
CATALOG = [ common.variable-setting-command XML_CATALOG_FILES : catalog.xml ] ;
}
DIRECTORY on $(target) = $(dirname) ;
$(action) $(target) : $(source) ;
}
rule xslt ( target : source stylesheet : properties * )
{
STYLESHEET on $(target) = $(stylesheet) ;
FLAGS on $(target) = [ compute-xslt-flags $(target) : $(properties) ] ;
NAME on $(target) = $(.xsltproc) ;
for local catalog in [ feature.get-values <catalog> : $(properties) ]
{
CATALOG = [ common.variable-setting-command "XML_CATALOG_FILES" $(catalog) ] ;
}
xslt-xsltproc $(target) : $(source) ;
return [ .xsltproc $(target) : $(source) $(stylesheet) : $(properties) : : xslt-xsltproc ] ;
}
rule xslt-dir ( target : source stylesheet : properties * : dirname )
{
STYLESHEET on $(target) = $(stylesheet) ;
FLAGS on $(target) = [ compute-xslt-flags $(target) : $(properties) ] ;
DIRECTORY on $(target) = $(dirname) ;
NAME on $(target) = $(.xsltproc) ;
for local catalog in [ feature.get-values <catalog> : $(properties) ]
{
CATALOG = [ common.variable-setting-command "XML_CATALOG_FILES" $(catalog) ] ;
}
xslt-xsltproc-dir $(target) : $(source) ;
{
return [ .xsltproc $(target) : $(source) $(stylesheet) : $(properties) : $(dirname) : xslt-xsltproc-dir ] ;
}
actions xslt-xsltproc
{
$(CATALOG) "$(NAME:E=xsltproc)" $(FLAGS) --xinclude -o "$(<)" "$(STYLESHEET)" "$(>)"