]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/tools/build/src/tools/saxonhe.jam
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / tools / build / src / tools / saxonhe.jam
CommitLineData
92f5a8d4
TL
1#
2# Copyright (c) 2018 Damian Jarek (damian dot jarek93 at gmail dot com)
f67539c2 3# Copyright (c) 2019 Richard Hodges (hodges dot r at gmail dot com)
92f5a8d4
TL
4#
5# Distributed under the Boost Software License, Version 1.0. (See accompanying
1e59de90 6# file LICENSE.txt or copy at https://www.bfgroup.xyz/b2/LICENSE.txt)
92f5a8d4
TL
7#
8
9import common ;
f67539c2 10import os ;
92f5a8d4
TL
11
12rule init ( saxonhe_jar ? : java_exe ? )
13{
14 .java_exe = [ common.get-invocation-command saxonhe : java : $(java_exe) : ] ;
15 if $(saxonhe_jar)
16 {
17 .saxonhe_jar = $(saxonhe_jar) ;
18 }
19 else
20 {
21 local jar = [ GLOB "/usr/share/java/saxon/" "/usr/share/java/" : Saxon-HE.jar ] ;
22 .saxonhe_jar = $(jar[1]) ;
23 }
24}
25
f67539c2
TL
26#
27# execute the saxonhe jar file passing files as inputs and outputs.
28#
92f5a8d4
TL
29actions saxonhe
30{
31 "$(.java_exe)" -jar "$(.saxonhe_jar)" -o:"$(<)" -s:"$(>[1])" -xsl:"$(>[2])"
32}
f67539c2
TL
33
34#
35# execute the saxonhe jar file passing directories as inputs and outputs.
36# saxonhe requires that the output directory already exists
37#
38if [ os.on-windows ]
39{
40 actions saxonhe_dir
41 {
42 if not exist "$(<)\\" mkdir "$(<)"
43 "$(.java_exe)" -jar "$(.saxonhe_jar)" -o:"$(<)" -s:"$(>[1])" -xsl:"$(>[2])"
44 }
45}
46else
47{
48 actions saxonhe_dir
49 {
50 mkdir -p "$(<)"
51 "$(.java_exe)" -jar "$(.saxonhe_jar)" -o:"$(<)" -s:"$(>[1])" -xsl:"$(>[2])"
52 }
53}