summaryrefslogtreecommitdiff
path: root/tools/build/v2/tools/xsltproc-config.jam
blob: d1be25fa85865e5bbf9e0a404ee4a1035c1d13e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#~ Copyright 2005 Rene Rivera.
#~ Distributed under the Boost Software License, Version 1.0.
#~ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)

# Automatic configuration for the xsltproc toolset. To use, just import this
# module.

import os ;
import toolset : using ;


local rule locate-executable ( name )
{
    local path = [ modules.peek : PATH ] ;
    local exe ;
    if [ os.name ] = NT
    {
        exe = [ GLOB $(path) "C:\\Boost\\bin" : $(name)\.exe ] ;
    }
    else
    {
        exe = [ GLOB $(path) : $(name) ] ;
    }
    return $(exe[1]) ;
}


local xsltproc-exe = [ locate-executable xsltproc ] ;
if $(xsltproc-exe)
{
    if --debug-configuration in [ modules.peek : ARGV ]
    {
        ECHO notice: using xsltproc ":" $(xsltproc-exe) ;
    }
    using xsltproc : $(xsltproc-exe) ;
}