From 463ce05da07a899b1211b9378e86a5c7f22a2c39 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Sat, 28 Jun 2025 17:24:14 +0300 Subject: [PATCH] ports: Allow specifying custom make targets --- ports/install.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ports/install.sh b/ports/install.sh index 3b96c22c..05642838 100755 --- a/ports/install.sh +++ b/ports/install.sh @@ -46,6 +46,9 @@ if [ ! -f "$MESON_CROSS_FILE" ] || [ "$MESON_CROSS_FILE" -ot "$BANAN_TOOLCHAIN_D sed -i "s/SYSROOT/$BANAN_SYSROOT/" "$MESON_CROSS_FILE" fi +MAKE_BUILD_TARGETS=('all') +MAKE_INSTALL_TARGETS=('install') + clean() { find . -mindepth 1 -maxdepth 1 -not -name 'patches' -not -name 'build.sh' -exec rm -rf {} + } @@ -69,11 +72,15 @@ configure() { } build() { - make -j$(nproc) || exit 1 + for target in "${MAKE_BUILD_TARGETS[@]}"; do + make -j$(nproc) $target || exit 1 + done } install() { - make install "DESTDIR=$BANAN_SYSROOT" || exit 1 + for target in "${MAKE_INSTALL_TARGETS[@]}"; do + make $target "DESTDIR=$BANAN_SYSROOT" || exit 1 + done } source $1