Skip to content

Commit 139a684

Browse files
committed
CI: Add MAKE_BIN to allow non-default makes. [skip ci]
Same as in tcpdump.
1 parent 319edeb commit 139a684

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

build.sh

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
: "${CMAKE:=no}"
77
: "${REMOTE:=no}"
88
: "${LIBPCAP_TAINTED:=no}"
9+
: "${MAKE_BIN:=make}"
910

1011
. ./build_common.sh
1112
# Install directory prefix
@@ -94,19 +95,19 @@ else
9495
run_after_echo cmake ${CFLAGS:+-DEXTRA_CFLAGS="$CFLAGS"} \
9596
-DCMAKE_INSTALL_PREFIX="$PREFIX" -DENABLE_REMOTE="$REMOTE" ..
9697
fi
97-
run_after_echo make -s clean
98+
run_after_echo "$MAKE_BIN" -s clean
9899
if [ "$CMAKE" = no ]; then
99-
run_after_echo make -s ${CFLAGS:+CFLAGS="$CFLAGS"}
100-
run_after_echo make -s testprogs ${CFLAGS:+CFLAGS="$CFLAGS"}
100+
run_after_echo "$MAKE_BIN" -s ${CFLAGS:+CFLAGS="$CFLAGS"}
101+
run_after_echo "$MAKE_BIN" -s testprogs ${CFLAGS:+CFLAGS="$CFLAGS"}
101102
else
102103
# The "-s" flag is a no-op and CFLAGS is set using -DEXTRA_CFLAGS above.
103-
run_after_echo make
104-
run_after_echo make testprogs
104+
run_after_echo "$MAKE_BIN"
105+
run_after_echo "$MAKE_BIN" testprogs
105106
fi
106-
run_after_echo make install
107+
run_after_echo "$MAKE_BIN" install
107108
if [ "$CMAKE" = no ]; then
108109
run_after_echo testprogs/findalldevstest
109-
run_after_echo make releasetar
110+
run_after_echo "$MAKE_BIN" releasetar
110111
else
111112
run_after_echo run/findalldevstest
112113
fi

build_matrix.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
# not warning-free because of the OS, the compiler or whatever other factor
1313
# that the scripts can detect both in and out of CI.
1414
: "${LIBPCAP_TAINTED:=no}"
15+
# Some OSes have native make without parallel jobs support and sometimes have
16+
# GNU Make available as "gmake".
17+
: "${MAKE_BIN:=make}"
1518
# It calls the build.sh script which runs one build with setup environment
1619
# variables: CC, CMAKE and REMOTE.
1720

@@ -45,7 +48,7 @@ for CC in $MATRIX_CC; do
4548
# Run one build with setup environment variables: CC, CMAKE and REMOTE
4649
run_after_echo ./build.sh
4750
echo 'Cleaning...'
48-
if [ "$CMAKE" = yes ]; then rm -rf build; else make distclean; fi
51+
if [ "$CMAKE" = yes ]; then rm -rf build; else "$MAKE_BIN" distclean; fi
4952
purge_directory "$PREFIX"
5053
run_after_echo git status -suall
5154
# Cancel changes in configure

0 commit comments

Comments
 (0)