0
0
mirror of https://github.com/termux/termux-packages.git synced 2024-11-27 06:18:57 +00:00
termux-packages/scripts/build/termux_step_make.sh
Henrik Grimler 9e90d1b31a
tree-wide: rename TERMUX_MAKE_PROCESSES to TERMUX_PKG_MAKE_PROCESSES
Some packages have issues with parallel builds and need to set
TERMUX_MAKE_PROCESSES=1. All other build variables that package
recipes set are prefixed with TERMUX_PKG, use that for MAKE_PROCESSES
as well for consistency.

%ci:no-build
2024-06-16 11:16:22 +02:00

21 lines
556 B
Bash

termux_step_make() {
[ "$TERMUX_PKG_METAPACKAGE" = "true" ] && return
local QUIET_BUILD=
if [ "$TERMUX_QUIET_BUILD" = true ]; then
QUIET_BUILD="-s"
fi
if test -f build.ninja; then
ninja -j $TERMUX_PKG_MAKE_PROCESSES
elif ls ./*.cabal &>/dev/null; then
cabal build
elif ls ./*akefile &>/dev/null || [ ! -z "$TERMUX_PKG_EXTRA_MAKE_ARGS" ]; then
if [ -z "$TERMUX_PKG_EXTRA_MAKE_ARGS" ]; then
make -j $TERMUX_PKG_MAKE_PROCESSES $QUIET_BUILD
else
make -j $TERMUX_PKG_MAKE_PROCESSES $QUIET_BUILD ${TERMUX_PKG_EXTRA_MAKE_ARGS}
fi
fi
}