#
# Copyright (c) 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 LucĂa Andrea Illanes Albornoz <lucia@luciaillanes.de>
# set +o errexit -o noglob -o nounset is assumed.
#
pkg_install_make() {
local _pim_group_name="${1}" _pim_pkg_name="${2}" _pim_restart_at="${3}" \
_pim_ranlib="" _pim_rc=0 _pim_subdir="";
for _pim_subdir in ${PKG_MAKE_SUBDIRS:-:}; do
if [ "${PKG_RANLIB_INSTALL:+1}" = 1 ]; then
_pim_ranlib="${PKG_RANLIB_INSTALL}";
else
_pim_ranlib="${PKG_RANLIB}";
fi;
if [ "${_pim_subdir}" = ":" ]; then
_pim_subdir="";
fi;
ex_rtl_make \
"${PKG_AR}" "${PKG_CC}" "${PKG_CXX}" "${PKG_CCLD}" "${PKG_LIBTOOL}" \
"${PKG_MAKE}" "${PKG_PKG_CONFIG}" "${_pim_ranlib}" \
-- \
1 "${_pim_subdir}" \
-- \
"${PKG_MAKEFLAGS_INSTALL:-}" "${PKG_MAKEFLAGS_INSTALL_EXTRA:-}" \
"${PKG_MAKEFLAGS_INSTALL_LIST:-}" "${PKG_MAKEFLAGS_INSTALL_EXTRA_LIST:-}" \
"${PKG_MAKEFLAGS_LOADAVG:-}" "${PKG_MAKEFLAGS_PARALLELISE:-}" \
"${PKG_MAKEFLAGS_VERBOSITY:-}" \
-- \
"" "" "" "" "" "" "" "" "" \
-- \
"${PKG_MAKE_INSTALL_VNAME:-DESTDIR}=${PKG_DESTDIR}/" \
"${PKG_INSTALL_TARGET:-install}" \
;
_pim_rc="${?}";
if [ "${_pim_rc}" -ne 0 ]; then
return 1;
fi;
done;
return 0;
};
# vim:filetype=sh textwidth=0