2011-11-20 22:15:54 +04:00
|
|
|
#!/bin/bash
|
2011-11-18 22:14:09 +04:00
|
|
|
set -e
|
2011-11-21 23:41:10 +04:00
|
|
|
if
|
|
|
|
which bjam >/dev/null 2>/dev/null && #Have a bjam in path
|
2011-12-13 17:54:15 +04:00
|
|
|
! grep UFIHGUFIHBDJKNCFZXAEVA "$(which bjam)" </dev/null >/dev/null && #bjam in path isn't this script
|
2011-11-25 21:28:48 +04:00
|
|
|
bjam --help >/dev/null 2>/dev/null && #bjam in path isn't broken (i.e. has boost-build)
|
|
|
|
bjam --version |grep "Boost.Build 201" >/dev/null 2>/dev/null #It's recent enough.
|
2011-11-21 23:41:10 +04:00
|
|
|
then
|
|
|
|
#Delegate to system bjam
|
2011-11-21 22:30:00 +04:00
|
|
|
exec bjam "$@"
|
|
|
|
fi
|
2011-11-18 22:14:09 +04:00
|
|
|
|
|
|
|
top="$(dirname "$0")"
|
|
|
|
if [ ! -x "$top"/jam-files/bjam ]; then
|
|
|
|
pushd "$top/jam-files/engine"
|
|
|
|
./build.sh
|
|
|
|
cp -f bin.*/bjam ../bjam
|
|
|
|
popd
|
|
|
|
fi
|
|
|
|
|
2011-11-20 22:15:54 +04:00
|
|
|
export BOOST_BUILD_PATH="$top"/jam-files/boost-build
|
|
|
|
exec "$top"/jam-files/bjam "$@"
|