termux-packages/scripts/build/termux_step_make.sh
Aditya Alok 39bf6e9835
feat(build scripts): add steps for haskell packages
Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>

refactor(termux_step_get_dependencies): move haskell build steps from here
2022-03-16 15:31:45 +01:00

21 lines
597 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 -w dupbuild=warn -j $TERMUX_MAKE_PROCESSES
elif ls ./*.cabal &>/dev/null; then
runhaskell Setup -j$TERMUX_MAKE_PROCESSES build
elif ls ./*akefile &>/dev/null || [ ! -z "$TERMUX_PKG_EXTRA_MAKE_ARGS" ]; then
if [ -z "$TERMUX_PKG_EXTRA_MAKE_ARGS" ]; then
make -j $TERMUX_MAKE_PROCESSES $QUIET_BUILD
else
make -j $TERMUX_MAKE_PROCESSES $QUIET_BUILD ${TERMUX_PKG_EXTRA_MAKE_ARGS}
fi
fi
}