diff options
author | Kenneth Heafield <github@kheafield.com> | 2012-03-31 03:57:05 +0400 |
---|---|---|
committer | Kenneth Heafield <github@kheafield.com> | 2012-03-31 03:57:05 +0400 |
commit | 40c5888723dd18d94ee7256866b210b1ae1953e1 (patch) | |
tree | 64cfedd51ff11d69e23761e07e6f1385d3b5024c | |
parent | cebf88f39ec75118853c46f99ae879f3467d585a (diff) |
Save bjam arguments to previous.sh.
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Jamroot | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore index 63b584e16..d4493bce1 100644 --- a/.gitignore +++ b/.gitignore @@ -51,3 +51,4 @@ scripts/training/symal/symal scripts/training/train-model.perl dist bin +previous.sh @@ -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)) ; |