Old buggy bjam always returns 0. Detect+reject.

http://boost.2283326.n4.nabble.com/bjam-exit-code-always-zero-td2696668.html
This commit is contained in:
Kenneth Heafield 2012-09-09 12:00:13 +01:00
parent dca9d8952d
commit be76c67f96
2 changed files with 6 additions and 1 deletions

3
bjam
View File

@ -4,7 +4,8 @@ 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}" --sanity-test 2>/dev/null |grep Sane >/dev/null #The test in jam-files/sanity.jam passes
"${bjam}" --sanity-test 2>/dev/null |grep Sane >/dev/null && #The test in jam-files/sanity.jam passes
(cd jam-files/fail && ! "${bjam}") >/dev/null #Returns non-zero on failure
then
#Delegate to system bjam
exec "${bjam}" "$@"

4
jam-files/fail/Jamroot Normal file
View File

@ -0,0 +1,4 @@
actions fail {
false
}
make fail : : fail ;