|
|
e9fa07 |
#
|
|
|
8d7a8a |
# Copyright (c) 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 LucĂa Andrea Illanes Albornoz <lucia@luciaillanes.de>
|
|
|
e9fa07 |
# set +o errexit -o noglob -o nounset is assumed.
|
|
|
e9fa07 |
#
|
|
|
e9fa07 |
|
|
|
e9fa07 |
pkg_build_clean() {
|
|
|
e9fa07 |
local _pbc_group_name="${1}" _pbc_pkg_name="${2}" _pbc_restart_at="${3}" \
|
|
|
e9fa07 |
_pbc_libtool="" _pbc_makeflags_verbosity="${PKG_MAKEFLAGS_VERBOSITY:-}" \
|
|
|
e9fa07 |
_pbc_no_autoconf="" _pbc_rc=0 _pbc_subdir="";
|
|
|
e9fa07 |
|
|
|
e9fa07 |
if ex_pkg_state_test "${PKG_NAME}" "build" "${_pbc_restart_at}"; then
|
|
|
e9fa07 |
case "${PKG_LIBTOOL:-}" in
|
|
|
e9fa07 |
"") _pbc_libtool=""; ;;
|
|
|
e9fa07 |
none) _pbc_libtool=""; ;;
|
|
|
e9fa07 |
*) _pbc_libtool="${PKG_LIBTOOL}"; ;;
|
|
|
e9fa07 |
esac;
|
|
|
e9fa07 |
[ ! -x "${PKG_CONFIGURE:-}" ] && _pbc_no_autoconf=1;
|
|
|
e9fa07 |
|
|
|
e9fa07 |
for _pbc_subdir in ${PKG_MAKE_SUBDIRS:-:}; do
|
|
|
e9fa07 |
[ "${_pbc_subdir}" = ":" ] && _pbc_subdir="";
|
|
|
e9fa07 |
[ "${#_pbc_libtool}" -gt 0 ] && export MAKE="make LIBTOOL=${_pbc_libtool}";
|
|
|
e9fa07 |
|
|
|
1cbe20 |
if [ "${PKG_MAKEFLAGS_BUILD_LIST:+1}" = 1 ]; then
|
|
|
1cbe20 |
rtl_run_cmdlineV ":" "${PKG_MAKE}" \
|
|
|
1cbe20 |
"${PKG_MAKEFLAGS_BUILD_LIST}" \
|
|
|
1cbe20 |
"${PKG_MAKEFLAGS_BUILD_EXTRA_LIST:-}" \
|
|
|
1cbe20 |
${PKG_MAKEFLAGS_PARALLELISE:-} \
|
|
|
1cbe20 |
${_pbc_libtool:+"LIBTOOL=${_pbc_libtool}"} \
|
|
|
1cbe20 |
${_pbc_makeflags_verbosity} \
|
|
|
1cbe20 |
${_pbc_subdir:+-C "${_pbc_subdir}"} \
|
|
|
1cbe20 |
clean;
|
|
|
1cbe20 |
_pbc_rc="${?}";
|
|
|
1cbe20 |
elif [ "${PKG_MAKEFLAGS_BUILD_EXTRA_LIST:+1}" = 1 ]; then
|
|
|
1cbe20 |
rtl_run_cmdlineV ":" "${PKG_MAKE}" \
|
|
|
1cbe20 |
${PKG_MAKEFLAGS_BUILD:-} \
|
|
|
1cbe20 |
"${PKG_MAKEFLAGS_BUILD_EXTRA_LIST}" \
|
|
|
1cbe20 |
${PKG_MAKEFLAGS_PARALLELISE:-} \
|
|
|
1cbe20 |
${_pbc_libtool:+"LIBTOOL=${_pbc_libtool}"} \
|
|
|
1cbe20 |
${_pbc_makeflags_verbosity} \
|
|
|
1cbe20 |
${_pbc_subdir:+-C "${_pbc_subdir}"} \
|
|
|
1cbe20 |
clean;
|
|
|
1cbe20 |
_pbc_rc="${?}";
|
|
|
1cbe20 |
else
|
|
|
1cbe20 |
rtl_run_cmdlineV ":" "${PKG_MAKE}" \
|
|
|
1cbe20 |
${PKG_MAKEFLAGS_BUILD:-} \
|
|
|
1cbe20 |
${PKG_MAKEFLAGS_BUILD_EXTRA:-} \
|
|
|
1cbe20 |
${PKG_MAKEFLAGS_PARALLELISE:-} \
|
|
|
1cbe20 |
${_pbc_libtool:+"LIBTOOL=${_pbc_libtool}"} \
|
|
|
1cbe20 |
${_pbc_makeflags_verbosity} \
|
|
|
1cbe20 |
${_pbc_subdir:+-C "${_pbc_subdir}"} \
|
|
|
1cbe20 |
clean;
|
|
|
1cbe20 |
_pbc_rc="${?}";
|
|
|
1cbe20 |
fi;
|
|
|
e9fa07 |
|
|
|
e9fa07 |
[ "${#_pbc_libtool}" -gt 0 ] && unset MAKE;
|
|
|
e9fa07 |
[ "${_pbc_rc}" -ne 0 ] && return 1;
|
|
|
e9fa07 |
done;
|
|
|
e9fa07 |
fi;
|
|
|
e9fa07 |
return 0;
|
|
|
e9fa07 |
};
|
|
|
e9fa07 |
|
|
|
64844b |
# vim:filetype=sh textwidth=0
|