From 5e49ac6fdfac79021c2034be243274e7005a0788 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Fri, 25 Nov 2016 16:01:28 +0000 Subject: [PATCH] fix $MACHINE variable, update submodules --- s/cmake-init | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/s/cmake-init b/s/cmake-init index b1ea6759a..ea94afb7c 100755 --- a/s/cmake-init +++ b/s/cmake-init @@ -9,17 +9,18 @@ while [ ! -d $ROOT/.git ]; do done [ -z $BUILD ] && BUILD=Debug -MACHINE=`uname -m` [ -z "$CC" ] && [ ! -z `which clang` ] && CC="clang" [ -z "$CC" ] && [ ! -z `which gcc` ] && CC="gcc" [ -z "$CC" ] && [ ! -z `which tcc` ] && CC="tcc" [ -z "$CC" ] && [ ! -z `which cc` ] && CC="cc" + +MACHINE=`$CC -dumpmachine` +[ -z $MACHINE ] && MACHINE=`uname -m` BIN_DIR="$ROOT/build-$MACHINE-$CC-$BUILD" mkdir -p $BIN_DIR rm -f $BUILD ln -sf $BIN_DIR $BUILD -MACHINE=$(gcc -dumpmachine) rm -f CMakeCache.txt # use anything installed in /opt or /usr @@ -41,6 +42,8 @@ ARGS=" -DCMAKE_MODULE_PATH=$ROOT/cmake/Modules \ -DCMAKE_PREFIX_PATH=$PREFIX_PATH \ -DCMAKE_INSTALL_PREFIX=$HOME/eressea/server" +git submodule update --init + path="$(which tolua)" if [ "$HAVE_TOLUA" = "0" ] || [ -z $path ] ; then echo "tolua is not installed, building from source"