From 1daf787fb2bcc1133b95ad25a39c6b90ecfa8d06 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Tue, 12 May 2020 00:32:00 -0400 Subject: [PATCH] extras: Cleaning up some scripts to work with the newly-recreated buildbot. --- extras/buildbot-emscripten.sh | 30 ++---------------------------- extras/buildbot-raspberrypi.sh | 24 ++++-------------------- 2 files changed, 6 insertions(+), 48 deletions(-) diff --git a/extras/buildbot-emscripten.sh b/extras/buildbot-emscripten.sh index 79f20a3e..e5b7dd6f 100755 --- a/extras/buildbot-emscripten.sh +++ b/extras/buildbot-emscripten.sh @@ -20,32 +20,6 @@ cd `dirname "$0"` 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 @@ mkdir buildbot 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 diff --git a/extras/buildbot-raspberrypi.sh b/extras/buildbot-raspberrypi.sh index 61064d62..59688945 100755 --- a/extras/buildbot-raspberrypi.sh +++ b/extras/buildbot-raspberrypi.sh @@ -15,24 +15,7 @@ if [ -z $1 ]; then 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 @@ rm -rf $BUILDBOTDIR 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 @@ cmake -G "Unix Makefiles" \ -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \ .. -$MAKECMD +cmake --build . --config MinSizeRel rm -rf "$TARBALL" physfs-raspberrypi mkdir -p physfs-raspberrypi