mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
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:
parent
373415bb52
commit
6670ea7bdb
1 changed files with 35 additions and 23 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue