mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-08-17 07:20:48 +03:00
Loosen requirements for system bjam versions / Tom Hoar
This commit is contained in:
parent
1d6fa9178a
commit
edf34e9d35
3
bjam
3
bjam
@ -4,8 +4,7 @@ if
|
||||
bjam="$(which bjam 2>/dev/null)" && #exists
|
||||
[ ${#bjam} != 0 ] && #paranoia about which printing nothing then returning true
|
||||
! grep UFIHGUFIHBDJKNCFZXAEVA "${bjam}" </dev/null >/dev/null && #bjam in path isn't this script
|
||||
"${bjam}" --version |grep "Boost.Build 201" >/dev/null 2>/dev/null && #It's recent enough.
|
||||
"${bjam}" --help >/dev/null 2>/dev/null #bjam in path isn't broken (i.e. has boost-build)
|
||||
"${bjam}" --sanity-test 2>/dev/null |grep Sane >/dev/null #The test in jam-files/sanity.jam passes
|
||||
then
|
||||
#Delegate to system bjam
|
||||
exec "${bjam}" "$@"
|
||||
|
@ -4,6 +4,7 @@ import os ;
|
||||
import path ;
|
||||
import project ;
|
||||
import build-system ;
|
||||
import version ;
|
||||
|
||||
#Shell with trailing line removed http://lists.boost.org/boost-build/2007/08/17051.php
|
||||
rule trim-nl ( str extras * ) {
|
||||
@ -244,3 +245,12 @@ rule always-if-changed ( file current : targets * ) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if [ option.get "sanity-test" : : "yes" ] {
|
||||
local current_version = [ modules.peek : JAM_VERSION ] ;
|
||||
if ( $(current_version[0]) < 2000 && [ version.check-jam-version 3 1 16 ] ) || [ version.check-jam-version 2011 0 0 ] {
|
||||
EXIT "Sane" : 0 ;
|
||||
} else {
|
||||
EXIT "Bad" : 1 ;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user