From 90d428f67a9f170f469ddfc9db4d25bec795f542 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 11 Jul 2015 20:48:54 +0200 Subject: [PATCH] use local copy of tolua if it isn't installed in the system --- .gitmodules | 22 +++++++++++----------- cmake | 2 +- s/build | 2 ++ s/cmake-init | 14 +++++++++++--- tolua | 2 +- 5 files changed, 26 insertions(+), 16 deletions(-) diff --git a/.gitmodules b/.gitmodules index f58803ffc..f8177ab09 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,34 +1,34 @@ [submodule "lunit"] path = lunit - url = git://github.com/badgerman/lunit.git + url = git://github.com/ennorehling/lunit.git [submodule "crypto"] path = crypto - url = git://github.com/badgerman/crypto.git + url = git://github.com/ennorehling/crypto.git [submodule "cmake"] path = cmake - url = git://github.com/badgerman/cmake.git + url = git://github.com/ennorehling/cmake.git [submodule "quicklist"] path = quicklist - url = git://github.com/badgerman/quicklist.git + url = git://github.com/ennorehling/quicklist.git [submodule "critbit"] path = critbit - url = git://github.com/badgerman/critbit.git + url = git://github.com/ennorehling/critbit.git [submodule "dlmalloc"] path = dlmalloc - url = git://github.com/badgerman/dlmalloc.git + url = git://github.com/ennorehling/dlmalloc.git [submodule "cutest"] path = cutest - url = git://github.com/badgerman/cutest.git + url = git://github.com/ennorehling/cutest.git [submodule "iniparser"] path = iniparser - url = git://github.com/badgerman/iniparser.git + url = git://github.com/ennorehling/iniparser.git [submodule "cJSON"] path = cJSON - url = git://github.com/badgerman/cJSON.git + url = git://github.com/ennorehling/cJSON.git [submodule "storage"] path = storage - url = git://github.com/badgerman/storage.git + url = git://github.com/ennorehling/storage.git branch = master [submodule "tolua"] path = tolua - url = git@github.com:ennorehling/tolua.git + url = git://github.com/ennorehling/tolua.git diff --git a/cmake b/cmake index cd779ba36..b0059eb8b 160000 --- a/cmake +++ b/cmake @@ -1 +1 @@ -Subproject commit cd779ba36efb4045a040af170588a8dfe496d7b9 +Subproject commit b0059eb8b0e3258c1350ad72a1c25ac95582ea2f diff --git a/s/build b/s/build index 44d4ad6d5..2ce652684 100755 --- a/s/build +++ b/s/build @@ -30,7 +30,9 @@ if [ ! -d $ROOT/$BIN_DIR ]; then fi git submodule update +echo "build tolua" cd $ROOT/tolua ; make +echo "build eressea" cd $ROOT/$BIN_DIR make $MAKEOPTS && make test cd $OLDPWD diff --git a/s/cmake-init b/s/cmake-init index 913aef82b..c1f0b44ab 100755 --- a/s/cmake-init +++ b/s/cmake-init @@ -1,4 +1,5 @@ #!/bin/sh +set -e ROOT=$(pwd) while [ ! -d $ROOT/.git ]; do ROOT=$(dirname $ROOT) @@ -13,10 +14,9 @@ MACHINE=`uname -m` [ -z "$CC" ] && [ ! -z `which gcc` ] && CC="gcc" [ -z "$CC" ] && [ ! -z `which tcc` ] && CC="tcc" [ -z "$CC" ] && [ ! -z `which cc` ] && CC="cc" -BIN_DIR="build-$MACHINE-$CC-$BUILD" +BIN_DIR="$ROOT/build-$MACHINE-$CC-$BUILD" mkdir -p $BIN_DIR ln -sf $BIN_DIR $BUILD -cd $BIN_DIR MACHINE=$(gcc -dumpmachine) rm -f CMakeCache.txt @@ -33,8 +33,16 @@ if [ -d $HOME/usr ]; then PREFIX_PATH=$HOME/usr:$HOME/usr/local:$PREFIX_PATH fi +if [ "$HAVE_TOLUA" = "0" ] || [ ! -e "$(which tolua)" ]; then + echo "tolua is not installed, building from source" + cd $ROOT/tolua ; make + ARGS="$ARGS -DPC_TOLUA_DIR=$ROOT/tolua" +fi + +cd $BIN_DIR cmake .. \ - -DCMAKE_MODULE_PATH=$PWD/../cmake/Modules \ + $ARGS \ + -DCMAKE_MODULE_PATH=$ROOT/cmake/Modules \ -DCMAKE_BUILD_TYPE=$BUILD \ -DCMAKE_LIBRARY_PATH=$LIBRARY_PATH \ -DCMAKE_INCLUDE_PATH=$INCLUDE_PATH \ diff --git a/tolua b/tolua index e046e5d05..240651682 160000 --- a/tolua +++ b/tolua @@ -1 +1 @@ -Subproject commit e046e5d05c3ef425b0f43203bae9a77486c74e55 +Subproject commit 2406516829c6295a7a9add24b9f35d376e7e60ad