]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - misc/tools/all/release.subr
Moved MAKEFLAGS out of DLL script
[xonotic/xonotic.git] / misc / tools / all / release.subr
index 02c78b15dba1b628357fa7ccda769ef91fda2d74..93c2586557e6df667f3119bf65ba081ea05ebaab 100644 (file)
@@ -2,6 +2,13 @@ release_common()
 {
        export LC_ALL=C
 
+       if [ -z "$MAKEFLAGS" ]; then
+               ncpus=`getconf _NPROCESSORS_ONLN 2>/dev/null || getconf NPROCESSORS_ONLN 2>/dev/null || echo 1`
+               if [ $ncpus -gt 1 ]; then
+                       export MAKEFLAGS=-j$ncpus
+               fi
+       fi
+
        release_args="$cmd $*"
        msg "*** $release_args: start"
        release_starttime=`date +%s`