forked from github/server
make build script figure out how many jobs to run
This commit is contained in:
parent
7358c48580
commit
9aeb0f6b86
15
s/build
15
s/build
|
@ -7,6 +7,19 @@ done
|
|||
[ -z "$CC" ] && [ ! -z `which gcc` ] && CC="gcc"
|
||||
[ -z "$CC" ] && [ ! -z `which tcc` ] && CC="tcc"
|
||||
[ -z "$CC" ] && [ ! -z `which cc` ] && CC="cc"
|
||||
[ -z "$JOBS" ] && JOBS=$(nproc)
|
||||
DISTCC=`which distcc`
|
||||
if [ ! -z "$DISTCC" ] ; then
|
||||
JOBS=`distcc -j`
|
||||
if [ -z "$JOBS" ] ; then
|
||||
JOBS=1
|
||||
elif [ $JOBS -gt 1 ] ; then
|
||||
CC="$DISTCC $CC"
|
||||
MAKEOPTS=-j$JOBS
|
||||
fi
|
||||
fi
|
||||
echo "Building with $CC and $JOBS jobs"
|
||||
|
||||
MACHINE=`uname -m`
|
||||
BIN_DIR="build-$MACHINE-$CC-Debug"
|
||||
if [ ! -d $ROOT/$BIN_DIR ]; then
|
||||
|
@ -15,5 +28,5 @@ if [ ! -d $ROOT/$BIN_DIR ]; then
|
|||
fi
|
||||
|
||||
cd $ROOT/$BIN_DIR
|
||||
make && make test
|
||||
make $MAKEOPTS && make test
|
||||
cd -
|
||||
|
|
|
@ -252,7 +252,9 @@ bool b_blockall(const connection * b, const unit * u, const region * r)
|
|||
|
||||
bool b_blocknone(const connection * b, const unit * u, const region * r)
|
||||
{
|
||||
unused_arg((u, r, b));
|
||||
unused_arg(u);
|
||||
unused_arg(r);
|
||||
unused_arg(b);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -264,13 +266,16 @@ bool b_rvisible(const connection * b, const region * r)
|
|||
bool b_fvisible(const connection * b, const struct faction * f,
|
||||
const region * r)
|
||||
{
|
||||
unused_arg(r, f, b);
|
||||
unused_arg(r);
|
||||
unused_arg(f);
|
||||
unused_arg(b);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool b_uvisible(const connection * b, const unit * u)
|
||||
{
|
||||
unused_arg(u, b);
|
||||
unused_arg(u);
|
||||
unused_arg(b);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue