Skip to content

Commit

Permalink
CI: Add MAKE_BIN to allow non-default makes. [skip ci]
Browse files Browse the repository at this point in the history
Same as in tcpdump.
  • Loading branch information
infrastation committed Aug 17, 2021
1 parent 319edeb commit 139a684
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
15 changes: 8 additions & 7 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
: "${CMAKE:=no}"
: "${REMOTE:=no}"
: "${LIBPCAP_TAINTED:=no}"
: "${MAKE_BIN:=make}"

. ./build_common.sh
# Install directory prefix
Expand Down Expand Up @@ -94,19 +95,19 @@ else
run_after_echo cmake ${CFLAGS:+-DEXTRA_CFLAGS="$CFLAGS"} \
-DCMAKE_INSTALL_PREFIX="$PREFIX" -DENABLE_REMOTE="$REMOTE" ..
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 -s testprogs ${CFLAGS:+CFLAGS="$CFLAGS"}
run_after_echo "$MAKE_BIN" -s ${CFLAGS:+CFLAGS="$CFLAGS"}
run_after_echo "$MAKE_BIN" -s testprogs ${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 testprogs
run_after_echo "$MAKE_BIN"
run_after_echo "$MAKE_BIN" testprogs
fi
run_after_echo make install
run_after_echo "$MAKE_BIN" install
if [ "$CMAKE" = no ]; then
run_after_echo testprogs/findalldevstest
run_after_echo make releasetar
run_after_echo "$MAKE_BIN" releasetar
else
run_after_echo run/findalldevstest
fi
Expand Down
5 changes: 4 additions & 1 deletion build_matrix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,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.
: "${LIBPCAP_TAINTED:=no}"
# Some OSes have native make without parallel jobs support and sometimes have
# GNU Make available as "gmake".
: "${MAKE_BIN:=make}"
# It calls the build.sh script which runs one build with setup environment
# variables: CC, CMAKE and REMOTE.

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

0 comments on commit 139a684

Please sign in to comment.