build-system: add -quick flag for build.sh

With this flag we assume that we don't need to rebuild grantlee and googlemaps.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2019-09-05 08:22:50 -07:00
parent 373415bb52
commit 6670ea7bdb

View file

@ -28,6 +28,10 @@ while [[ $# -gt 0 ]] ; do
# force Bluetooth support off # force Bluetooth support off
BTSUPPORT="OFF" BTSUPPORT="OFF"
;; ;;
-quick)
# only build libdivecomputer and Subsurface - this assumes that all other dependencies don't need rebuilding
QUICK="1"
;;
-build-deps) -build-deps)
# in order to build the dependencies on Mac for release builds (to deal with the macosx-version-min for those # in order to build the dependencies on Mac for release builds (to deal with the macosx-version-min for those
# call this script with -build-deps # call this script with -build-deps
@ -65,13 +69,18 @@ while [[ $# -gt 0 ]] ; do
;; ;;
*) *)
echo "Unknown command line argument $arg" echo "Unknown command line argument $arg"
echo "Usage: build.sh [-no-bt] [-build-deps] [-build-with-webkit] [-mobile] [-desktop] [-both] [-create-appdir] [-release]" echo "Usage: build.sh [-no-bt] [-quick] [-build-deps] [-build-with-webkit] [-mobile] [-desktop] [-both] [-create-appdir] [-release]"
exit 1 exit 1
;; ;;
esac esac
shift shift
done done
if [ "$BUILD_DEPS" = "1" ] && [ "$QUICK" = "1" ] ; then
echo "Conflicting options; cannot request combine -build-deps and -quick"
exit 1;
fi
# Verify that the Xcode Command Line Tools are installed # Verify that the Xcode Command Line Tools are installed
if [ $PLATFORM = Darwin ] ; then if [ $PLATFORM = Darwin ] ; then
if [ -d /Developer/SDKs ] ; then if [ -d /Developer/SDKs ] ; then
@ -115,8 +124,13 @@ if [ "$BUILD_DESKTOP" = "1" ] ; then
BUILDS+=( "DesktopExecutable" ) BUILDS+=( "DesktopExecutable" )
BUILDDIRS+=( "build" ) BUILDDIRS+=( "build" )
if [ "$BUILD_WITH_WEBKIT" = "1" ] ; then if [ "$BUILD_WITH_WEBKIT" = "1" ] ; then
PRINTING="-DNO_PRINTING=OFF"
if [ "$QUICK" != "1" ] ; then
BUILDGRANTLEE=1 BUILDGRANTLEE=1
fi fi
else
PRINTING="-DNO_PRINTING=ON"
fi
fi fi
if [[ ! -d "subsurface" ]] ; then if [[ ! -d "subsurface" ]] ; then
@ -393,8 +407,6 @@ fi
if [ "$BUILDGRANTLEE" = "1" ] ; then if [ "$BUILDGRANTLEE" = "1" ] ; then
# build grantlee # build grantlee
PRINTING="-DNO_PRINTING=OFF"
cd $SRC cd $SRC
./subsurface/scripts/get-dep-lib.sh single . grantlee ./subsurface/scripts/get-dep-lib.sh single . grantlee
pushd grantlee pushd grantlee
@ -407,10 +419,9 @@ if [ "$BUILDGRANTLEE" = "1" ] ; then
make -j4 make -j4
make install make install
popd popd
else
PRINTING="-DNO_PRINTING=ON"
fi fi
if [ "$QUICK" != "1" ] ; then
# build the googlemaps map plugin # build the googlemaps map plugin
cd $SRC cd $SRC
@ -430,6 +441,7 @@ fi
make -j4 make -j4
make install make install
popd popd
fi
# finally, build Subsurface # finally, build Subsurface