extras: Cleaning up some scripts to work with the newly-recreated buildbot.
authorRyan C. Gordon <icculus@icculus.org>
Tue, 12 May 2020 00:32:00 -0400
changeset 1676 8ca9a80a216c
parent 1674 d3929e660372
child 1678 952b18525bcb
extras: Cleaning up some scripts to work with the newly-recreated buildbot.
extras/buildbot-emscripten.sh
extras/buildbot-raspberrypi.sh
--- a/extras/buildbot-emscripten.sh	Sat Aug 24 21:06:54 2019 -0400
+++ b/extras/buildbot-emscripten.sh	Tue May 12 00:32:00 2020 -0400
@@ -20,32 +20,6 @@
 cd ..
 PHYSFSBASE=`pwd`
 
-if [ -z "$MAKE" ]; then
-    OSTYPE=`uname -s`
-    if [ "$OSTYPE" == "Linux" ]; then
-        NCPU=`cat /proc/cpuinfo |grep vendor_id |wc -l`
-        let NCPU=$NCPU+1
-    elif [ "$OSTYPE" = "Darwin" ]; then
-        NCPU=`sysctl -n hw.ncpu`
-    elif [ "$OSTYPE" = "SunOS" ]; then
-        NCPU=`/usr/sbin/psrinfo |wc -l |sed -e 's/^ *//g;s/ *$//g'`
-    else
-        NCPU=1
-    fi
-
-    if [ -z "$NCPU" ]; then
-        NCPU=1
-    elif [ "$NCPU" = "0" ]; then
-        NCPU=1
-    fi
-
-    MAKE="make -j$NCPU"
-fi
-
-echo "\$MAKE is '$MAKE'"
-MAKECMD="$MAKE"
-unset MAKE  # prevent warnings about jobserver mode.
-
 echo "Setting up Emscripten SDK environment..."
 source "$ENVSCRIPT"
 
@@ -56,10 +30,10 @@
 cd buildbot
 
 echo "Configuring..."
-emcmake cmake -G "Unix Makefiles" -DPHYSFS_BUILD_SHARED=False -DCMAKE_BUILD_TYPE=MinSizeRel .. || exit $?
+emcmake cmake -G "Ninja" -DPHYSFS_BUILD_SHARED=False -DCMAKE_BUILD_TYPE=MinSizeRel .. || exit $?
 
 echo "Building..."
-emmake $MAKECMD || exit $?
+emcmake cmake --build . --config MinSizeRel || exit $?
 
 set -e
 rm -rf "$TARBALL" physfs-emscripten
--- a/extras/buildbot-raspberrypi.sh	Sat Aug 24 21:06:54 2019 -0400
+++ b/extras/buildbot-raspberrypi.sh	Tue May 12 00:32:00 2020 -0400
@@ -15,24 +15,7 @@
     TARBALL=physfs-raspberrypi.tar.xz
 fi
 
-OSTYPE=`uname -s`
-if [ "$OSTYPE" != "Linux" ]; then
-    # !!! FIXME
-    echo "This only works on x86 or x64-64 Linux at the moment." 1>&2
-    exit 1
-fi
-
-if [ "x$MAKE" == "x" ]; then
-    NCPU=`cat /proc/cpuinfo |grep vendor_id |wc -l`
-    let NCPU=$NCPU+1
-    MAKE="make -j$NCPU"
-fi
-
-echo "\$MAKE is '$MAKE'"
-MAKECMD="$MAKE"
-unset MAKE  # prevent warnings about jobserver mode.
-
-BUILDBOTDIR="raspberrypi-buildbot"
+BUILDBOTDIR="buildbot"
 PARENTDIR="$PWD"
 
 set -e
@@ -42,8 +25,9 @@
 mkdir -p $BUILDBOTDIR
 pushd $BUILDBOTDIR
 
+# the '-G "Ninja"' can be '-G "Unix Makefiles"' if you prefer to use GNU Make.
 SYSROOT="/opt/rpi-sysroot"
-cmake -G "Unix Makefiles" \
+cmake -G "Ninja" \
     -DCMAKE_C_COMPILER="/opt/rpi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc" \
     -DCMAKE_BUILD_TYPE=MinSizeRel \
     -DCMAKE_SYSROOT="$SYSROOT" \
@@ -55,7 +39,7 @@
     -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \
     ..
 
-$MAKECMD
+cmake --build . --config MinSizeRel
 
 rm -rf "$TARBALL" physfs-raspberrypi
 mkdir -p physfs-raspberrypi