fix $MACHINE variable, update submodules

This commit is contained in:
Enno Rehling 2016-11-25 16:01:28 +00:00
parent c9c4f5dd37
commit 5e49ac6fdf

View file

@ -9,17 +9,18 @@ while [ ! -d $ROOT/.git ]; do
done done
[ -z $BUILD ] && BUILD=Debug [ -z $BUILD ] && BUILD=Debug
MACHINE=`uname -m`
[ -z "$CC" ] && [ ! -z `which clang` ] && CC="clang" [ -z "$CC" ] && [ ! -z `which clang` ] && CC="clang"
[ -z "$CC" ] && [ ! -z `which gcc` ] && CC="gcc" [ -z "$CC" ] && [ ! -z `which gcc` ] && CC="gcc"
[ -z "$CC" ] && [ ! -z `which tcc` ] && CC="tcc" [ -z "$CC" ] && [ ! -z `which tcc` ] && CC="tcc"
[ -z "$CC" ] && [ ! -z `which cc` ] && CC="cc" [ -z "$CC" ] && [ ! -z `which cc` ] && CC="cc"
MACHINE=`$CC -dumpmachine`
[ -z $MACHINE ] && MACHINE=`uname -m`
BIN_DIR="$ROOT/build-$MACHINE-$CC-$BUILD" BIN_DIR="$ROOT/build-$MACHINE-$CC-$BUILD"
mkdir -p $BIN_DIR mkdir -p $BIN_DIR
rm -f $BUILD rm -f $BUILD
ln -sf $BIN_DIR $BUILD ln -sf $BIN_DIR $BUILD
MACHINE=$(gcc -dumpmachine)
rm -f CMakeCache.txt rm -f CMakeCache.txt
# use anything installed in /opt or /usr # use anything installed in /opt or /usr
@ -41,6 +42,8 @@ ARGS=" -DCMAKE_MODULE_PATH=$ROOT/cmake/Modules \
-DCMAKE_PREFIX_PATH=$PREFIX_PATH \ -DCMAKE_PREFIX_PATH=$PREFIX_PATH \
-DCMAKE_INSTALL_PREFIX=$HOME/eressea/server" -DCMAKE_INSTALL_PREFIX=$HOME/eressea/server"
git submodule update --init
path="$(which tolua)" path="$(which tolua)"
if [ "$HAVE_TOLUA" = "0" ] || [ -z $path ] ; then if [ "$HAVE_TOLUA" = "0" ] || [ -z $path ] ; then
echo "tolua is not installed, building from source" echo "tolua is not installed, building from source"