Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Heafield <github@kheafield.com>2012-03-31 03:57:05 +0400
committerKenneth Heafield <github@kheafield.com>2012-03-31 03:57:05 +0400
commita54f7f855f5ef4e20d8ddad80f55393c8873fd23 (patch)
tree64cfedd51ff11d69e23761e07e6f1385d3b5024c /Jamroot
parentfba75a885e1ecf309e133b69b81f3643f6adef47 (diff)
Save bjam arguments to previous.sh.
Diffstat (limited to 'Jamroot')
-rw-r--r--Jamroot11
1 files changed, 11 insertions, 0 deletions
diff --git a/Jamroot b/Jamroot
index ab75440e0..8faf5c7c2 100644
--- a/Jamroot
+++ b/Jamroot
@@ -62,6 +62,7 @@
import option ;
import modules ;
+import path ;
path-constant TOP : . ;
@@ -221,3 +222,13 @@ if $(includedir) {
install prefix-header : [ glob-tree *.h *.hh : jam-files dist kenlm moses ] : <location>$(includedir) <install-source-root>. ;
install prefix-moses-header : moses/src//headers-to-install : <location>$(includedir) <install-source-root>moses/src ;
}
+
+#Write the current command line to previous.sh. This does not do shell escaping.
+path-constant BUILD-LOG : previous.sh ;
+if ! [ path.exists $(BUILD-LOG) ] {
+ SHELL "touch $(BUILD-LOG) && chmod +x $(BUILD-LOG)" ;
+}
+local script = [ modules.peek : ARGV ] ;
+script = $(script:J=" ") ;
+script = "#!/bin/sh\n$(script)\n" ;
+local ignored = @($(BUILD-LOG):E=$(script)) ;