trying to fix tolua build

This commit is contained in:
Enno Rehling 2015-07-11 23:25:09 +02:00
parent 90d428f67a
commit 252d8b8d88
6 changed files with 22 additions and 29 deletions

View File

@ -7,7 +7,6 @@ script: s/travis-build
addons: addons:
apt: apt:
packages: packages:
- libtolua-dev
- liblua5.2-dev - liblua5.2-dev
- libncurses5-dev - libncurses5-dev
- libsqlite3-dev - libsqlite3-dev

16
s/build
View File

@ -4,12 +4,8 @@ while [ ! -d $ROOT/.git ]; do
ROOT=$(dirname $ROOT) ROOT=$(dirname $ROOT)
done done
[ -z $BUILD ] && BUILD=Debug [ -z "$CC" ] && CC=clang
MACHINE=`uname -m` [ -z "$BUILD" ] && BUILD=Debug
[ -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"
[ -z "$JOBS" ] && JOBS=$(nproc) [ -z "$JOBS" ] && JOBS=$(nproc)
DISTCC=`which distcc` DISTCC=`which distcc`
@ -22,10 +18,10 @@ CC="$DISTCC $CC"
MAKEOPTS=-j$JOBS MAKEOPTS=-j$JOBS
fi fi
fi fi
echo "Building with $CC and $JOBS jobs" echo "Building with CC=$CC and $JOBS jobs"
if [ ! -d $ROOT/$BIN_DIR ]; then if [ ! -d $ROOT/$BUILD ]; then
echo "cannot find build directory $BIN_DIR in $ROOT. did you run cmake-init?" echo "cannot find build directory $BUILD in $ROOT. did you run cmake-init?"
exit exit
fi fi
@ -33,6 +29,6 @@ git submodule update
echo "build tolua" echo "build tolua"
cd $ROOT/tolua ; make cd $ROOT/tolua ; make
echo "build eressea" echo "build eressea"
cd $ROOT/$BIN_DIR cd $ROOT/$BUILD
make $MAKEOPTS && make test make $MAKEOPTS && make test
cd $OLDPWD cd $OLDPWD

View File

@ -11,6 +11,7 @@ done
[ -z $BUILD ] && BUILD=Debug [ -z $BUILD ] && BUILD=Debug
MACHINE=`uname -m` MACHINE=`uname -m`
[ -z "$CC" ] && [ ! -z `which gcc` ] && 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"

View File

@ -4,20 +4,16 @@ while [ ! -d $ROOT/.git ]; do
ROOT=$(dirname $ROOT) ROOT=$(dirname $ROOT)
done done
MACHINE=`uname -m` [ -z $BUILD ] && BUILD=Debug ; export BUILD
[ -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-Debug"
if [ ! -d $ROOT/$BIN_DIR ]; then if [ ! -e $ROOT/$BUILD ]; then
echo "cannot find build directory $BIN_DIR in $ROOT. did you run cmake-init?" echo "cannot find build directory $BUILD in $ROOT. did you run cmake-init?"
exit exit
fi fi
$ROOT/$BIN_DIR/eressea/test_eressea $ROOT/$BUILD/eressea/test_eressea
cd $ROOT cd $ROOT
[ -e eressea.ini ] || ln -sf conf/eressea.ini [ -e eressea.ini ] || ln -sf conf/eressea.ini
$ROOT/$BIN_DIR/eressea/eressea -v0 scripts/run-tests.lua $ROOT/$BUILD/eressea/eressea -v0 sacripts/run-tests.lua
$ROOT/$BIN_DIR/eressea/eressea -v0 scripts/run-tests-e3.lua $ROOT/$BUILD/eressea/eressea -v0 scripts/run-tests-e3.lua
cd $OLDWPD cd $OLDWPD

View File

@ -1,5 +1,7 @@
#!/bin/sh #!/bin/sh
ROOT=`pwd`
inifile() { inifile() {
if [ ! -e eressea.ini ]; then if [ ! -e eressea.ini ]; then
cp conf/eressea.ini . cp conf/eressea.ini .
@ -7,10 +9,9 @@ build/iniparser/inifile eressea.ini add lua:paths lunit:scripts
fi fi
} }
[ -d build ] || mkdir build [ -z $BUILD ] && BUILD=Debug ; export BUILD
cd build && cmake .. \ s/cmake-init
-DCMAKE_MODULE_PATH=$PWD/../cmake/Modules \ s/build
-DCMAKE_BUILD_TYPE=Debug .. && \ cd $ROOT
make && cd .. && inifile && inifile
build/eressea/test_eressea && s/runtests
build/eressea/eressea -v0 scripts/run-tests.lua

2
tolua

@ -1 +1 @@
Subproject commit 2406516829c6295a7a9add24b9f35d376e7e60ad Subproject commit eebd697f736af4807f7e4b3a17a7eb4a2c9a061f