1
0
forked from 0ad/0ad

Support parallel build jobs in update-workspaces (via JOBS=-j3 or argument -j3 etc)

This was SVN commit r9418.
This commit is contained in:
Ykkrosh 2011-05-03 23:54:29 +00:00
parent 16a654ccae
commit 962fb41729

View File

@ -6,11 +6,14 @@ die()
exit 1 exit 1
} }
JOBS=${JOBS:="-j2"}
with_system_nvtt=false with_system_nvtt=false
for i in "$@" for i in "$@"
do do
case $i in case $i in
--with-system-nvtt ) with_system_nvtt=true ;; --with-system-nvtt ) with_system_nvtt=true ;;
-j* ) JOBS=$i ;;
esac esac
done done
@ -21,12 +24,12 @@ echo "Updating bundled third-party dependencies..."
echo echo
# Build/update bundled external libraries # Build/update bundled external libraries
(cd ../../libraries/fcollada/src && make) || die "FCollada build failed" (cd ../../libraries/fcollada/src && make ${JOBS}) || die "FCollada build failed"
echo echo
(cd ../../libraries/spidermonkey-tip && ./build.sh) || die "SpiderMonkey build failed" (cd ../../libraries/spidermonkey-tip && JOBS=${JOBS} ./build.sh) || die "SpiderMonkey build failed"
echo echo
if [ "$with_system_nvtt" = "false" ]; then if [ "$with_system_nvtt" = "false" ]; then
(cd ../../libraries/nvtt && ./build.sh) || die "NVTT build failed" (cd ../../libraries/nvtt && JOBS=${JOBS} ./build.sh) || die "NVTT build failed"
fi fi
echo echo
@ -35,7 +38,7 @@ mkdir -p gcc
# Now build premake and run it to create the makefiles # Now build premake and run it to create the makefiles
cd ../premake cd ../premake
make -C src || die "Premake build failed" make -C src ${JOBS} || die "Premake build failed"
echo echo