Skip to content

Commit 4316f61

Browse files
committed
CI: Add MAKE_BIN to allow non-default makes. [skip ci]
This way parallel builds are simpler on Solaris and OpenIndiana.
1 parent 4b3055b commit 4316f61

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

build.sh

+7-6
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
: "${CRYPTO:=no}"
1111
: "${SMB:=no}"
1212
: "${TCPDUMP_TAINTED:=no}"
13+
: "${MAKE_BIN:=make}"
1314

1415
. ./build_common.sh
1516
# Install directory prefix
@@ -71,14 +72,14 @@ else
7172
-DCMAKE_INSTALL_PREFIX="$PREFIX" ..
7273
fi
7374
fi
74-
run_after_echo make -s clean
75+
run_after_echo "$MAKE_BIN" -s clean
7576
if [ "$CMAKE" = no ]; then
76-
run_after_echo make -s ${CFLAGS:+CFLAGS="$CFLAGS"}
77+
run_after_echo "$MAKE_BIN" -s ${CFLAGS:+CFLAGS="$CFLAGS"}
7778
else
7879
# The "-s" flag is a no-op and CFLAGS is set using -DEXTRA_CFLAGS above.
79-
run_after_echo make
80+
run_after_echo "$MAKE_BIN"
8081
fi
81-
run_after_echo make install
82+
run_after_echo "$MAKE_BIN" install
8283
print_so_deps "$TCPDUMP_BIN"
8384
run_after_echo "$TCPDUMP_BIN" -h
8485
# The "-D" flag depends on HAVE_PCAP_FINDALLDEVS and it would not be difficult
@@ -98,10 +99,10 @@ if [ "$CIRRUS_CI" = true ]; then
9899
"$TCPDUMP_BIN" -L
99100
fi
100101
if [ "$BUILD_LIBPCAP" = yes ]; then
101-
run_after_echo make check
102+
run_after_echo "$MAKE_BIN" check
102103
fi
103104
if [ "$CMAKE" = no ]; then
104-
run_after_echo make releasetar
105+
run_after_echo "$MAKE_BIN" releasetar
105106
fi
106107
if [ "$CIRRUS_CI" = true ]; then
107108
run_after_echo sudo \

build_matrix.sh

+6-2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
# not warning-free because of the OS, the compiler or whatever other factor
2020
# that the scripts can detect both in and out of CI.
2121
: "${TCPDUMP_TAINTED:=no}"
22+
# Some OSes have native make without parallel jobs support and sometimes have
23+
# GNU Make available as "gmake".
24+
: "${MAKE_BIN:=make}"
2225

2326
. ./build_common.sh
2427
print_sysinfo
@@ -31,6 +34,7 @@ if [ -z "$PREFIX" ]; then
3134
fi
3235
COUNT=0
3336
export TCPDUMP_TAINTED
37+
export MAKE_BIN
3438

3539
build_tcpdump() {
3640
for CMAKE in $MATRIX_CMAKE; do
@@ -49,7 +53,7 @@ build_tcpdump() {
4953
if [ "$CMAKE" = yes ]; then
5054
run_after_echo rm -rf build
5155
else
52-
run_after_echo make distclean
56+
run_after_echo "$MAKE_BIN" distclean
5357
fi
5458
run_after_echo rm -rf "$PREFIX"/bin/tcpdump*
5559
run_after_echo git status -suall
@@ -87,7 +91,7 @@ for CC in $MATRIX_CC; do
8791
echo_magenta 'Use system libpcap' >&2
8892
purge_directory "$PREFIX"
8993
if [ -d ../libpcap ]; then
90-
(cd ../libpcap; make distclean || echo '(Ignoring the make error.)')
94+
(cd ../libpcap; "$MAKE_BIN" distclean || echo '(Ignoring the make error.)')
9195
fi
9296
build_tcpdump
9397
fi

0 commit comments

Comments
 (0)