Blame subr/pkg_install_make.subr

Lucio Andrés Illanes Albornoz (arab, vxp) c27bea
#
Lucio Andrés Illanes Albornoz e1d469
# set +o errexit -o noglob -o nounset is assumed.
Lucio Andrés Illanes Albornoz (arab, vxp) c27bea
#
Lucio Andrés Illanes Albornoz (arab, vxp) c27bea
Lucio Andrés Illanes Albornoz (arab, vxp) c27bea
pkg_install_make() {
Lucio Andrés Illanes Albornoz 7ab7cc
	local _libtool="" _rc=0 _subdir="";
Lucio Andrés Illanes Albornoz e1d469
	case "${PKG_LIBTOOL:-}" in
Lucio Andrés Illanes Albornoz e1d469
	"")	_libtool=""; ;;
Lucio Andrés Illanes Albornoz e1d469
	none)	_libtool=""; ;;
Lucio Andrés Illanes Albornoz e1d469
	*)	_libtool="${PKG_LIBTOOL}"; ;;
Lucio Andrés Illanes Albornoz e1d469
	esac;
Lucio Andrés Illanes Albornoz 522027
	for _subdir in ${PKG_MAKE_SUBDIRS:-:}; do
Lucio Andrés Illanes Albornoz 522027
		if [ "${_subdir}" = ":" ]; then
Lucio Andrés Illanes Albornoz 522027
			_subdir="";
Lucio Andrés Illanes Albornoz 522027
		fi;
Lucio Andrés Illanes Albornoz 7ab7cc
		if [ "${#_libtool}" -gt 0 ]; then
Lucio Andrés Illanes Albornoz 7ab7cc
			export MAKE="make LIBTOOL=${_libtool}";
Lucio Andrés Illanes Albornoz 7ab7cc
		fi;
Lucio Andrés Illanes Albornoz 7ab7cc
		rtl_run_cmd_unsplit "${PKG_MAKE}"				\
Lucio Andrés Illanes Albornoz 522027
			${PKG_MAKEFLAGS_INSTALL:-}				\
Lucio Andrés Illanes Albornoz 522027
			${PKG_MAKEFLAGS_INSTALL_EXTRA:-}			\
Lucio Andrés Illanes Albornoz 522027
			AR="${PKG_AR}" CC="${PKG_CC}" RANLIB="${PKG_RANLIB}"	\
Lucio Andrés Illanes Albornoz 522027
			"${PKG_RANLIB_INSTALL:+RANLIB=${PKG_RANLIB_INSTALL}}"	\
Lucio Andrés Illanes Albornoz 522027
			${_libtool:+"LIBTOOL=${_libtool}"}			\
Lucio Andrés Illanes Albornoz 522027
			"${PKG_MAKE_INSTALL_VNAME:-DESTDIR}=${PKG_DESTDIR}/"	\
Lucio Andrés Illanes Albornoz 522027
			${PKG_INSTALL_TARGET:-install}				\
Lucio Andrés Illanes Albornoz 7ab7cc
			${_subdir:+-C "${_subdir}"}; _rc="${?}";
Lucio Andrés Illanes Albornoz 7ab7cc
		if [ "${#_libtool}" -gt 0 ]; then
Lucio Andrés Illanes Albornoz 7ab7cc
			unset MAKE;
Lucio Andrés Illanes Albornoz 7ab7cc
		fi;
Lucio Andrés Illanes Albornoz 7ab7cc
		if [ "${_rc}" -ne 0 ]; then
Lucio Andrés Illanes Albornoz 522027
			return 1;
Lucio Andrés Illanes Albornoz 522027
		fi;
Lucio Andrés Illanes Albornoz 522027
	done;
Lucio Andrés Illanes Albornoz (arab, vxp) c27bea
};
Lucio Andrés Illanes Albornoz (arab, vxp) c27bea
Lucio Andrés Illanes Albornoz (arab, vxp) c27bea
# vim:filetype=sh