From 4316f615c94976db082c7100d0ff0e33dade238b Mon Sep 17 00:00:00 2001 From: Denis Ovsienko Date: Tue, 17 Aug 2021 20:35:21 +0100 Subject: CI: Add MAKE_BIN to allow non-default makes. [skip ci] This way parallel builds are simpler on Solaris and OpenIndiana. --- build.sh | 13 +++++++------ build_matrix.sh | 8 ++++++-- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/build.sh b/build.sh index 4fb4915e..0d06cf74 100755 --- a/build.sh +++ b/build.sh @@ -10,6 +10,7 @@ : "${CRYPTO:=no}" : "${SMB:=no}" : "${TCPDUMP_TAINTED:=no}" +: "${MAKE_BIN:=make}" . ./build_common.sh # Install directory prefix @@ -71,14 +72,14 @@ else -DCMAKE_INSTALL_PREFIX="$PREFIX" .. fi fi -run_after_echo make -s clean +run_after_echo "$MAKE_BIN" -s clean if [ "$CMAKE" = no ]; then - run_after_echo make -s ${CFLAGS:+CFLAGS="$CFLAGS"} + run_after_echo "$MAKE_BIN" -s ${CFLAGS:+CFLAGS="$CFLAGS"} else # The "-s" flag is a no-op and CFLAGS is set using -DEXTRA_CFLAGS above. - run_after_echo make + run_after_echo "$MAKE_BIN" fi -run_after_echo make install +run_after_echo "$MAKE_BIN" install print_so_deps "$TCPDUMP_BIN" run_after_echo "$TCPDUMP_BIN" -h # The "-D" flag depends on HAVE_PCAP_FINDALLDEVS and it would not be difficult @@ -98,10 +99,10 @@ if [ "$CIRRUS_CI" = true ]; then "$TCPDUMP_BIN" -L fi if [ "$BUILD_LIBPCAP" = yes ]; then - run_after_echo make check + run_after_echo "$MAKE_BIN" check fi if [ "$CMAKE" = no ]; then - run_after_echo make releasetar + run_after_echo "$MAKE_BIN" releasetar fi if [ "$CIRRUS_CI" = true ]; then run_after_echo sudo \ diff --git a/build_matrix.sh b/build_matrix.sh index b16e03e5..829271ab 100755 --- a/build_matrix.sh +++ b/build_matrix.sh @@ -19,6 +19,9 @@ # not warning-free because of the OS, the compiler or whatever other factor # that the scripts can detect both in and out of CI. : "${TCPDUMP_TAINTED:=no}" +# Some OSes have native make without parallel jobs support and sometimes have +# GNU Make available as "gmake". +: "${MAKE_BIN:=make}" . ./build_common.sh print_sysinfo @@ -31,6 +34,7 @@ if [ -z "$PREFIX" ]; then fi COUNT=0 export TCPDUMP_TAINTED +export MAKE_BIN build_tcpdump() { for CMAKE in $MATRIX_CMAKE; do @@ -49,7 +53,7 @@ build_tcpdump() { if [ "$CMAKE" = yes ]; then run_after_echo rm -rf build else - run_after_echo make distclean + run_after_echo "$MAKE_BIN" distclean fi run_after_echo rm -rf "$PREFIX"/bin/tcpdump* run_after_echo git status -suall @@ -87,7 +91,7 @@ for CC in $MATRIX_CC; do echo_magenta 'Use system libpcap' >&2 purge_directory "$PREFIX" if [ -d ../libpcap ]; then - (cd ../libpcap; make distclean || echo '(Ignoring the make error.)') + (cd ../libpcap; "$MAKE_BIN" distclean || echo '(Ignoring the make error.)') fi build_tcpdump fi -- cgit v1.2.1