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-04-02 23:20:56 +0400
committerKenneth Heafield <github@kheafield.com>2012-04-02 23:20:56 +0400
commitd3a8d281a9489fb1433483f3e2d5c5465d591fe5 (patch)
tree4365985a92e64d2e67776b6fa71df8ea6cae3d51 /Jamroot
parentc5095706c12fd7d0ee302f292c9585961dd4a6a3 (diff)
Fix previous.sh for people who don't have bjam installed
Diffstat (limited to 'Jamroot')
-rw-r--r--Jamroot8
1 files changed, 7 insertions, 1 deletions
diff --git a/Jamroot b/Jamroot
index 8faf5c7c2..8bff74366 100644
--- a/Jamroot
+++ b/Jamroot
@@ -229,6 +229,12 @@ if ! [ path.exists $(BUILD-LOG) ] {
SHELL "touch $(BUILD-LOG) && chmod +x $(BUILD-LOG)" ;
}
local script = [ modules.peek : ARGV ] ;
-script = $(script:J=" ") ;
+if $(script[1]) = "./jam-files/bjam" {
+ #The ./bjam shell script calls ./jam-files/bjam so that appears in argv but
+ #we want ./bjam to appear so the environment variables are set correctly.
+ script = "./bjam "$(script[2-]:J=" ") ;
+} else {
+ script = $(script:J=" ") ;
+}
script = "#!/bin/sh\n$(script)\n" ;
local ignored = @($(BUILD-LOG):E=$(script)) ;