]> git.rm.cloudns.org Git - xonotic/xonotic.git/commitdiff
Moved MAKEFLAGS out of DLL script
authorz411 <z411@omaera.org>
Fri, 25 Feb 2022 23:39:55 +0000 (20:39 -0300)
committerz411 <z411@omaera.org>
Fri, 25 Feb 2022 23:39:55 +0000 (20:39 -0300)
misc/buildsrc/dlls.sh
misc/tools/all/release.subr

index bec5df23743ef4a37c1fefd9b8953fe5506d191f..c5c8ff7285529a8f04c23aafdb0518d914dd4930 100755 (executable)
@@ -4,7 +4,6 @@
 # by z411
 
 d0=$(pwd)
-cjobs=$(($(nproc) + 1))
 
 require () {
        if ! dpkg -s "$1" >/dev/null 2>&1 ; then
@@ -100,7 +99,7 @@ build_zlib () {
              -DBUILD_SHARED_LIBS=ON \
              -DCMAKE_INSTALL_PREFIX="$pkg_dir" \
              -G"Unix Makefiles" "$this_src"
-       make -j${cjobs}
+       make
        make install
 }      
 
@@ -114,7 +113,7 @@ build_gmp () {
                              --enable-fat \
                              --disable-static \
                              --enable-shared
-       make -j${cjobs}
+       make
        make install
 }
 
@@ -135,7 +134,7 @@ build_libd0 () {
        "$src_dir/d0_blind_id/configure" --with-pic \
                                         --prefix="$pkg_dir" \
                                         --host="$CHOST"
-       make -j${cjobs}
+       make
        make install
 }
 
@@ -150,7 +149,7 @@ build_libogg() {
              -DBUILD_SHARED_LIBS=ON \
              -DCMAKE_INSTALL_PREFIX="$pkg_dir" \
              -G"Unix Makefiles" "$this_src"
-       make -j${cjobs}
+       make
        make install
 }
 
@@ -169,7 +168,7 @@ build_libvorbis () {
              -DOGG_LIBRARY="$pkg_dir/lib/libogg.dll.a" \
              -DCMAKE_INSTALL_PREFIX="$pkg_dir" \
              -G"Unix Makefiles" "$this_src"
-       make -j${cjobs}
+       make
        make install
 }
 
@@ -193,7 +192,7 @@ build_libtheora () {
                              --disable-sdltest \
                              --disable-vorbistest \
                              --disable-oggtest
-       make -j${cjobs}
+       make
        make install
 }
 
@@ -206,7 +205,7 @@ build_freetype () {
              -DCMAKE_BUILD_TYPE=Release \
              -DCMAKE_INSTALL_PREFIX="$pkg_dir" \
              -G"Unix Makefiles" "$this_src"
-       make -j${cjobs}
+       make
        make install
 }
 
@@ -221,7 +220,7 @@ build_libpng16 () {
              -DZLIB_LIBRARY="$pkg_dir/lib/libzlib.dll.a" \
              -DCMAKE_INSTALL_PREFIX="$pkg_dir" \
              -G"Unix Makefiles" "$this_src"
-       make -j${cjobs}
+       make
        make install
 }
 
@@ -236,7 +235,7 @@ build_libjpeg () {
              -DENABLE_STATIC=OFF \
              -DWITH_TURBOJPEG=OFF \
              -G"Unix Makefiles" "$this_src"
-       make -j${cjobs}
+       make
        make install
 }
 
@@ -257,7 +256,7 @@ build_curl () {
              -DBUILD_CURL_EXE=OFF \
              -DHTTP_ONLY=ON \
              -G"Unix Makefiles" "$this_src"
-       make -j${cjobs}
+       make
        make install
 }
 
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`