diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2014-11-08 14:02:30 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2014-11-08 14:02:30 +0100 |
commit | 2f7dbd746eb9e4fc740d665fe9df5f7525f63eb0 (patch) | |
tree | 3338366565403fd8683d1d0dea80d155caf53f8f /scripts/build.sh | |
parent | cde0aa2a4d1728054140845b4aa0204789c101ed (diff) | |
download | weechat-2f7dbd746eb9e4fc740d665fe9df5f7525f63eb0.zip |
core: add Travis CI builds with Python 3 and without GnuTLS
Diffstat (limited to 'scripts/build.sh')
-rwxr-xr-x | scripts/build.sh | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/scripts/build.sh b/scripts/build.sh index df2dcd1c8..da68ea56f 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -21,6 +21,16 @@ # # Build WeeChat with CMake or autotools, according to environment variable # $BUILDTOOL or first script argument (if given). +# The optional variable $BUILDARGS can be set with arguments for cmake or +# configure commands. +# +# Syntax to run the script with environment variables: +# BUILDTOOL=cmake|autotools ./build.sh +# BUILDTOOL=cmake|autotools BUILDARGS="arguments" ./build.sh +# +# Syntax to run the script with arguments on command line: +# ./build.sh cmake|autotools +# ./build.sh cmake|autotools arguments # # This script is used to build WeeChat in Travis CI environment. # @@ -38,7 +48,12 @@ run () BUILDDIR="build-tmp-$$" if [ $# -ge 1 ]; then - BUILDTOOL=$1 + BUILDTOOL="$1" + shift +fi + +if [ $# -ge 1 ]; then + BUILDARGS="$*" fi if [ -z "$BUILDTOOL" ]; then @@ -52,7 +67,7 @@ run "cd $BUILDDIR" if [ "$BUILDTOOL" = "cmake" ]; then # build with CMake - run "cmake .. -DENABLE_MAN=ON -DENABLE_DOC=ON -DENABLE_TESTS=ON" + run "cmake .. -DENABLE_MAN=ON -DENABLE_DOC=ON -DENABLE_TESTS=ON ${BUILDARGS}" run "make VERBOSE=1 -j$(nproc)" run "sudo make install" run "ctest -V" @@ -61,7 +76,7 @@ fi if [ "$BUILDTOOL" = "autotools" ]; then # build with autotools run "../autogen.sh" - run "../configure --enable-man --enable-doc --enable-tests" + run "../configure --enable-man --enable-doc --enable-tests ${BUILDARGS}" run "make -j$(nproc)" run "sudo make install" run "./tests/tests -v" |