summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2019-09-05 08:22:50 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-09-05 17:54:09 -0700
commit6670ea7bdb580db5630ce4176334801ef6c811d4 (patch)
treeeaf8db9d21db2afd310447a6c5902889ee436453 /scripts
parent373415bb52c50316f07f3f95a8c736d8ab94b425 (diff)
downloadsubsurface-6670ea7bdb580db5630ce4176334801ef6c811d4.tar.gz
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>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build.sh58
1 files changed, 35 insertions, 23 deletions
diff --git a/scripts/build.sh b/scripts/build.sh
index 64daf52b3..84a72481c 100755
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -28,6 +28,10 @@ while [[ $# -gt 0 ]] ; do
# force Bluetooth support off
BTSUPPORT="OFF"
;;
+ -quick)
+ # only build libdivecomputer and Subsurface - this assumes that all other dependencies don't need rebuilding
+ QUICK="1"
+ ;;
-build-deps)
# 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
@@ -65,13 +69,18 @@ while [[ $# -gt 0 ]] ; do
;;
*)
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
;;
esac
shift
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
if [ $PLATFORM = Darwin ] ; then
if [ -d /Developer/SDKs ] ; then
@@ -115,7 +124,12 @@ if [ "$BUILD_DESKTOP" = "1" ] ; then
BUILDS+=( "DesktopExecutable" )
BUILDDIRS+=( "build" )
if [ "$BUILD_WITH_WEBKIT" = "1" ] ; then
- BUILDGRANTLEE=1
+ PRINTING="-DNO_PRINTING=OFF"
+ if [ "$QUICK" != "1" ] ; then
+ BUILDGRANTLEE=1
+ fi
+ else
+ PRINTING="-DNO_PRINTING=ON"
fi
fi
@@ -393,8 +407,6 @@ fi
if [ "$BUILDGRANTLEE" = "1" ] ; then
# build grantlee
- PRINTING="-DNO_PRINTING=OFF"
-
cd $SRC
./subsurface/scripts/get-dep-lib.sh single . grantlee
pushd grantlee
@@ -407,29 +419,29 @@ if [ "$BUILDGRANTLEE" = "1" ] ; then
make -j4
make install
popd
-else
- PRINTING="-DNO_PRINTING=ON"
fi
-# build the googlemaps map plugin
+if [ "$QUICK" != "1" ] ; then
+ # build the googlemaps map plugin
-cd $SRC
-./subsurface/scripts/get-dep-lib.sh single . googlemaps
-pushd googlemaps
-mkdir -p build
-mkdir -p J10build
-cd build
-$QMAKE "INCLUDEPATH=$INSTALL_ROOT/include" ../googlemaps.pro
-# on Travis the compiler doesn't support c++1z, yet qmake adds that flag;
-# since things compile fine with c++11, let's just hack that away
-# similarly, don't use -Wdata-time
-if [ "$TRAVIS" = "true" ] ; then
- mv Makefile Makefile.bak
- cat Makefile.bak | sed -e 's/std=c++1z/std=c++11/g ; s/-Wdate-time//' > Makefile
+ cd $SRC
+ ./subsurface/scripts/get-dep-lib.sh single . googlemaps
+ pushd googlemaps
+ mkdir -p build
+ mkdir -p J10build
+ cd build
+ $QMAKE "INCLUDEPATH=$INSTALL_ROOT/include" ../googlemaps.pro
+ # on Travis the compiler doesn't support c++1z, yet qmake adds that flag;
+ # since things compile fine with c++11, let's just hack that away
+ # similarly, don't use -Wdata-time
+ if [ "$TRAVIS" = "true" ] ; then
+ mv Makefile Makefile.bak
+ cat Makefile.bak | sed -e 's/std=c++1z/std=c++11/g ; s/-Wdate-time//' > Makefile
+ fi
+ make -j4
+ make install
+ popd
fi
-make -j4
-make install
-popd
# finally, build Subsurface