]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/tools/build/src/tools/saxonhe.jam
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / boost / tools / build / src / tools / saxonhe.jam
index f48cf7fc827b919156f5265714e5a342e1c908ea..01213193b8cd00fde1823a475f6144ee07b14cf2 100644 (file)
@@ -1,11 +1,13 @@
 #
 # Copyright (c) 2018 Damian Jarek (damian dot jarek93 at gmail dot com)
+# Copyright (c) 2019 Richard Hodges (hodges dot r at gmail dot com)
 #
 # Distributed under the Boost Software License, Version 1.0. (See accompanying
 # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 #
 
 import common ;
+import os ;
 
 rule init ( saxonhe_jar ? : java_exe ? )
 {
@@ -21,7 +23,31 @@ rule init ( saxonhe_jar ? : java_exe ? )
     }
 }
 
+#
+# execute the saxonhe jar file passing files as inputs and outputs.
+#
 actions saxonhe
 {
     "$(.java_exe)" -jar "$(.saxonhe_jar)" -o:"$(<)" -s:"$(>[1])" -xsl:"$(>[2])"
 }
+
+#
+# execute the saxonhe jar file passing directories as inputs and outputs.
+# saxonhe requires that the output directory already exists
+#
+if [ os.on-windows ]
+{
+    actions saxonhe_dir
+    {
+        if not exist "$(<)\\" mkdir "$(<)"
+        "$(.java_exe)" -jar "$(.saxonhe_jar)" -o:"$(<)" -s:"$(>[1])" -xsl:"$(>[2])"
+    }
+}
+else
+{
+    actions saxonhe_dir
+    {
+        mkdir -p "$(<)"
+        "$(.java_exe)" -jar "$(.saxonhe_jar)" -o:"$(<)" -s:"$(>[1])" -xsl:"$(>[2])"
+    }
+}