From 617764f4f4203ad5a783be01aac9afb7ec997b40 Mon Sep 17 00:00:00 2001 From: Henrik Grimler Date: Wed, 27 Feb 2019 19:50:20 +0100 Subject: [PATCH] build-package: mv termux_step_make_install to scripts/build/ --- build-package.sh | 25 ++--------------------- scripts/build/termux_step_make_install.sh | 23 +++++++++++++++++++++ 2 files changed, 25 insertions(+), 23 deletions(-) create mode 100644 scripts/build/termux_step_make_install.sh diff --git a/build-package.sh b/build-package.sh index 74939021f6..5a0360e0ea 100755 --- a/build-package.sh +++ b/build-package.sh @@ -94,29 +94,8 @@ termux_step_post_configure() { # Make package, either with ninja or make source scripts/build/termux_step_make.sh -termux_step_make_install() { - if test -f build.ninja; then - ninja -w dupbuild=warn -j $TERMUX_MAKE_PROCESSES install - elif ls ./*akefile &> /dev/null || [ ! -z "$TERMUX_PKG_EXTRA_MAKE_ARGS" ]; then - : "${TERMUX_PKG_MAKE_INSTALL_TARGET:="install"}" - # Some packages have problem with parallell install, and it does not buy much, so use -j 1. - if [ -z "$TERMUX_PKG_EXTRA_MAKE_ARGS" ]; then - make -j 1 ${TERMUX_PKG_MAKE_INSTALL_TARGET} - else - make -j 1 ${TERMUX_PKG_EXTRA_MAKE_ARGS} ${TERMUX_PKG_MAKE_INSTALL_TARGET} - fi - elif test -f Cargo.toml; then - termux_setup_rust - cargo install \ - --path . \ - --force \ - --target $CARGO_TARGET_NAME \ - --root $TERMUX_PREFIX \ - $TERMUX_PKG_EXTRA_CONFIGURE_ARGS - # https://github.com/rust-lang/cargo/issues/3316: - rm $TERMUX_PREFIX/.crates.toml - fi -} +# Make install, either with ninja, make of cargo +source scripts/build/termux_step_make_install.sh # Hook function for package scripts to override. termux_step_post_make_install() { diff --git a/scripts/build/termux_step_make_install.sh b/scripts/build/termux_step_make_install.sh new file mode 100644 index 0000000000..7d3183f147 --- /dev/null +++ b/scripts/build/termux_step_make_install.sh @@ -0,0 +1,23 @@ +termux_step_make_install() { + if test -f build.ninja; then + ninja -w dupbuild=warn -j $TERMUX_MAKE_PROCESSES install + elif ls ./*akefile &> /dev/null || [ ! -z "$TERMUX_PKG_EXTRA_MAKE_ARGS" ]; then + : "${TERMUX_PKG_MAKE_INSTALL_TARGET:="install"}" + # Some packages have problem with parallell install, and it does not buy much, so use -j 1. + if [ -z "$TERMUX_PKG_EXTRA_MAKE_ARGS" ]; then + make -j 1 ${TERMUX_PKG_MAKE_INSTALL_TARGET} + else + make -j 1 ${TERMUX_PKG_EXTRA_MAKE_ARGS} ${TERMUX_PKG_MAKE_INSTALL_TARGET} + fi + elif test -f Cargo.toml; then + termux_setup_rust + cargo install \ + --path . \ + --force \ + --target $CARGO_TARGET_NAME \ + --root $TERMUX_PREFIX \ + $TERMUX_PKG_EXTRA_CONFIGURE_ARGS + # https://github.com/rust-lang/cargo/issues/3316: + rm $TERMUX_PREFIX/.crates.toml + fi +}