add support for on-device bootstrapping of "make"

This commit is contained in:
Leonid Pliushch 2019-08-11 15:27:01 +03:00
parent e8ccf506a0
commit 33f341c259
2 changed files with 18 additions and 1 deletions

View File

@ -17,3 +17,20 @@ termux_step_pre_configure() {
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" ac_cv_func_pselect=no"
fi
}
termux_step_make() {
# Allow to bootstrap make if building on device without make installed.
if [ -n "$TERMUX_ON_DEVICE_BUILD" ] && [ -z "$(command -v make)" ]; then
./build.sh
else
make -j $TERMUX_MAKE_PROCESSES $QUIET_BUILD
fi
}
termux_step_make_install() {
if [ -n "$TERMUX_ON_DEVICE_BUILD" ] && [ -z "$(command -v make)" ]; then
./make -j 1 install
else
make -j 1 install
fi
}

View File

@ -24,7 +24,7 @@ PACKAGES+=" golang"
PACKAGES+=" gperf"
PACKAGES+=" libtool"
PACKAGES+=" m4"
PACKAGES+=" make" # Used for all Makefile projects and to build itself.
PACKAGES+=" make" # Used for all Makefile-based projects.
PACKAGES+=" ninja" # Used by default to build all CMake projects.
PACKAGES+=" perl"
PACKAGES+=" pkg-config"