Blame subr.ex/ex_pkg_run.subr

b70ff5
#
b70ff5
# Copyright (c) 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 LucĂ­a Andrea Illanes Albornoz <lucia@luciaillanes.de>
b70ff5
# set +o errexit -o noglob -o nounset is assumed.
b70ff5
#
b70ff5
# Package {configure,make} command execution
b70ff5
#
b70ff5
b70ff5
#
b70ff5
# ex_pkg_run_configure() - run configure script
b70ff5
# @_ar:				ar(1) command name or pathname
b70ff5
# @_cc:				C compiler command name or pathname
b70ff5
# @_configure:			configure script command name or pathname
b70ff5
# @_cxx:			C++ compiler command name or pathname
b70ff5
# @_ld:				ld(1) command name or pathname
b70ff5
# @_libtool:			libtool(1) command name or pathname or "none"
b70ff5
# @_pkg_config:			pkg-config(1) command name or pathname
b70ff5
# @_python:			python command name or pathname
b70ff5
# @_ranlib:			ranlib(1) command name or pathname
b70ff5
# @--:				(ignored)
b70ff5
# @_flags:			configure script flags as a whitespace-separated list
b70ff5
# @_flags_extra:		extra configure script flags as a whitespace-separated likst
b70ff5
# @_flags_list:			configure script flags as a :-separated list
b70ff5
# @_flags_extra_list:		extra configure script flags as a :-separated list
b70ff5
# @--:				(ignored)
b70ff5
# @_cflags:			$CFLAGS
b70ff5
# @_cflags_extra:		extra $CFLAGS
b70ff5
# @_cppflags:			$CPPFLAGS
b70ff5
# @_cppflags_extra:		extra $CPPFLAGS
b70ff5
# @_cxxflags:			$CXXFLAGS
b70ff5
# @_cxxflags_extra:		extra $CXXFLAGS
b70ff5
# @_ldflags:			$LDFLAGS
b70ff5
# @_ldflags_extra:		extra $LDFLAGS
b70ff5
# @_pkg_config_libdir:		pkg-config(1) search directory
b70ff5
#
b70ff5
# Returns:			zero (0) on success, non-zero (>0) on failure
b70ff5
#
b70ff5
ex_pkg_run_configure() {
b70ff5
	local	_eprc_ar="${1}" _eprc_cc="${2}" _eprc_configure="${3}" _eprc_cxx="${4}" _eprc_ld="${5}"	\
b70ff5
		_eprc_libtool="${6}" _eprc_pkg_config="${7}" _eprc_python="${8}" _eprc_ranlib="${9}"	\
b70ff5
		_eprc_ignored="${10}"									\
b70ff5
		_eprc_flags="${11}" _eprc_flags_extra="${12}"						\
b70ff5
		_eprc_flags_list="${13}" _eprc_flags_extra_list="${14}"					\
b70ff5
		_eprc_ignored="${15}"									\
b70ff5
		_eprc_cflags="${16}" _eprc_cflags_extra="${17}" _eprc_cppflags="${18}"			\
b70ff5
		_eprc_cppflags_extra="${19}" _eprc_cxxflags="${20}" _eprc_cxxflags_extra="${21}"	\
b70ff5
		_eprc_ldflags="${22}" _eprc_ldflags_extra="${23}" _eprc_pkg_config_libdir="${24}"	\
b70ff5
		_eprc_rc=0;
b70ff5
b70ff5
	case "${_eprc_libtool:-}" in
b70ff5
	none) _eprc_libtool=""; ;;
b70ff5
	esac;
b70ff5
b70ff5
	[ "${_eprc_cflags_extra:+1}" = 1 ] && _eprc_cflags="${_eprc_cflags:+${_eprc_cflags} }${_eprc_cflags_extra}";
b70ff5
	[ "${_eprc_cppflags_extra:+1}" = 1 ] && _eprc_cppflags="${_eprc_cppflags:+${_eprc_cppflags} }${_eprc_cppflags_extra}";
b70ff5
	[ "${_eprc_cxxflags_extra:+1}" = 1 ] && _eprc_cxxflags="${_eprc_cxxflags:+${_eprc_cxxflags} }${_eprc_cxxflags_extra}";
b70ff5
	[ "${_eprc_ldflags_extra:+1}" = 1 ] && _eprc_ldflags="${_eprc_ldflags:+${_eprc_ldflags} }${_eprc_ldflags_extra}";
b70ff5
b70ff5
(
b70ff5
	if [ "${_eprc_libtool:+1}" = 1 ]; then
b70ff5
		export MAKE="make LIBTOOL=${_eprc_libtool}";
b70ff5
	fi;
b70ff5
b70ff5
	[ "${_eprc_ar:+1}" = 1 ] && export AR="${_eprc_ar}";
b70ff5
	[ "${_eprc_cc:+1}" = 1 ] && export CC="${_eprc_cc}";
b70ff5
	[ "${_eprc_cxx:+1}" = 1 ] && export CXX="${_eprc_cxx}";
b70ff5
	[ "${_eprc_ld:+1}" = 1 ] && export LD="${_eprc_ld}";
b70ff5
	[ "${_eprc_libtool:+1}" = 1 ] && export LIBTOOL="${_eprc_libtool}";
b70ff5
	[ "${_eprc_pkg_config:+1}" = 1 ] && export PKG_CONFIG="${_eprc_pkg_config}";
b70ff5
	[ "${_eprc_python:+1}" = 1 ] && export PYTHON="${_eprc_python}";
b70ff5
	[ "${_eprc_ranlib:+1}" = 1 ] && export RANLIB="${_eprc_ranlib}";
b70ff5
b70ff5
	[ "${_eprc_cflags:+1}" = 1 ] && export CFLAGS="${_eprc_cflags}";
b70ff5
	[ "${_eprc_cppflags:+1}" = 1 ] && export CPPFLAGS="${_eprc_cppflags}";
b70ff5
	[ "${_eprc_cxxflags:+1}" = 1 ] && export CXXFLAGS="${_eprc_cxxflags}";
b70ff5
	[ "${_eprc_ldflags:+1}" = 1 ] && export LDFLAGS="${_eprc_ldflags}";
b70ff5
	[ "${_eprc_pkg_config_libdir:+1}" = 1 ] && export PKG_CONFIG_LIBDIR="${_eprc_pkg_config_libdir}";
b70ff5
b70ff5
	if [ "${_eprc_flags_list:+1}" = 1 ]; then
b70ff5
		rtl_run_cmdlineV ":" "${_eprc_configure}"	\
b70ff5
			"${_eprc_flags_list}"			\
b70ff5
			"${_eprc_flags_extra_list:-}"		\
b70ff5
			;
b70ff5
		exit "${?}";
b70ff5
	elif [ "${_eprc_flags_extra_list:+1}" = 1 ]; then
b70ff5
		rtl_run_cmdlineV ":" "${_eprc_configure}"	\
b70ff5
			${_eprc_flags:-}			\
b70ff5
			"${_eprc_flags_extra_list:-}"		\
b70ff5
			;
b70ff5
		exit "${?}";
b70ff5
	else
b70ff5
		rtl_run_cmdlineV ":" "${_eprc_configure}"	\
b70ff5
			${_eprc_flags:-}			\
b70ff5
			${_eprc_flags_extra:-}			\
b70ff5
			;
b70ff5
		exit "${?}";
b70ff5
	fi;
b70ff5
);
b70ff5
	_eprc_rc="${?}";
b70ff5
b70ff5
	return "${_eprc_rc}";
b70ff5
};
b70ff5
b70ff5
#
b70ff5
# ex_pkg_run_configure_cmake() - run configure script
b70ff5
# @_ar:				ar(1) command name or pathname
b70ff5
# @_cc:				C compiler command name or pathname
b70ff5
# @_ccache:			ccache(1) command name or pathname or ""
b70ff5
# @_cmake:			CMake command name or pathname
b70ff5
# @_cxx:			C++ compiler command name or pathname
b70ff5
# @_ld:				ld(1) command name or pathname
b70ff5
# @_pkg_config:			pkg-config(1) command name or pathname
b70ff5
# @_python:			python command name or pathname
b70ff5
# @_ranlib:			ranlib(1) command name or pathname
b70ff5
# @--:				(ignored)
b70ff5
# @_build_type:			CMake build type (host, cross, native)
b70ff5
# @_cmake_args:			additional CMake arguments as a whitespace-separated list
b70ff5
# @_cmake_args_extra:		additional CMake extra arguments as a whitespace-separated likst
b70ff5
# @_prefix:			build prefix pathname
b70ff5
# @_subdir:			CMake build directory pathname
b70ff5
# @_system_name:		CMake system name
b70ff5
# @_system_processor:		CMake system processor
b70ff5
# @--:				(ignored)
b70ff5
# @_cflags:			$CFLAGS
b70ff5
# @_cflags_extra:		extra $CFLAGS
b70ff5
# @_cppflags:			$CPPFLAGS
b70ff5
# @_cppflags_extra:		extra $CPPFLAGS
b70ff5
# @_cxxflags:			$CXXFLAGS
b70ff5
# @_cxxflags_extra:		extra $CXXFLAGS
b70ff5
# @_ldflags:			$LDFLAGS
b70ff5
# @_ldflags_extra:		extra $LDFLAGS
b70ff5
# @_pkg_config_libdir:		pkg-config(1) search directory
b70ff5
#
b70ff5
# Returns:			zero (0) on success, non-zero (>0) on failure
b70ff5
#
b70ff5
ex_pkg_run_configure_cmake() {
b70ff5
	local	_eprcc_ar="${1}" _eprcc_cc="${2}" _eprcc_ccache="${3}" _eprcc_cmake="${4}"		\
b70ff5
		_eprcc_cxx="${5}" _eprcc_ld="${6}" _eprcc_pkg_config="${7}" _eprcc_python="${8}"	\
b70ff5
		_eprcc_ranlib="${9}"									\
b70ff5
		_eprcc_ignored="${10}"									\
b70ff5
		_eprcc_build_type="${11}"								\
b70ff5
		_eprcc_cmake_args="${12}" _eprcc_cmake_args_extra="${13}"				\
b70ff5
		_eprcc_prefix="${14}" _eprcc_subdir="${15}"						\
b70ff5
		_eprcc_system_name="${16}" _eprcc_system_processor="${17}"				\
b70ff5
		_eprcc_ignored="${18}"									\
b70ff5
		_eprcc_cflags="${19}" _eprcc_cflags_extra="${20}" _eprcc_cppflags="${21}"		\
b70ff5
		_eprcc_cppflags_extra="${22}" _eprcc_cxxflags="${23}" _eprcc_cxxflags_extra="${24}"	\
b70ff5
		_eprcc_ldflags="${25}" _eprcc_ldflags_extra="${26}" _eprcc_pkg_config_libdir="${27}"	\
b70ff5
		_eprcc_cmd_name="" _eprcc_cmake_args_auto="" _eprcc_rc=0 _eprcc_vname="" _eprcc_vval=""
b70ff5
b70ff5
	[ "${_eprcc_cflags_extra:+1}" = 1 ] && _eprcc_cflags="${_eprcc_cflags:+${_eprcc_cflags} }${_eprcc_cflags_extra}";
b70ff5
	[ "${_eprcc_cppflags_extra:+1}" = 1 ] && _eprcc_cppflags="${_eprcc_cppflags:+${_eprcc_cppflags} }${_eprcc_cppflags_extra}";
b70ff5
	[ "${_eprcc_cxxflags_extra:+1}" = 1 ] && _eprcc_cxxflags="${_eprcc_cxxflags:+${_eprcc_cxxflags} }${_eprcc_cxxflags_extra}";
b70ff5
	[ "${_eprcc_ldflags_extra:+1}" = 1 ] && _eprcc_ldflags="${_eprcc_ldflags:+${_eprcc_ldflags} }${_eprcc_ldflags_extra}";
b70ff5
b70ff5
(
b70ff5
	[ "${_eprcc_pkg_config:+1}" = 1 ] && export PKG_CONFIG="${_eprcc_pkg_config}";
b70ff5
	[ "${_eprcc_pkg_config_libdir:+1}" = 1 ] && export PKG_CONFIG_LIBDIR="${_eprcc_pkg_config_libdir}";
b70ff5
	[ "${_eprcc_python:+1}" = 1 ] && export PYTHON="${_eprcc_python}";
b70ff5
b70ff5
	for _eprcc_vname in ar cc cxx ld pkg_config ranlib; do
b70ff5
		case "${_eprcc_vname}" in
b70ff5
		cc|cxx)
b70ff5
			_eprcc_vname="_eprcc_${_eprcc_vname}";
b70ff5
			if [ "${_eprcc_ccache:+1}" = 1 ]; then
b70ff5
				eval ${_eprcc_vname}="\${${_eprcc_vname}#${_eprcc_ccache} }";
b70ff5
			fi;
b70ff5
			;;
b70ff5
b70ff5
		*)
b70ff5
			_eprcc_vname="_eprcc_${_eprcc_vname}";
b70ff5
			;;
b70ff5
		esac;
b70ff5
b70ff5
		if eval [ '"${'"${_eprcc_vname}"':+1}"' = 1 ]\
b70ff5
		&& eval [ '"${'"${_eprcc_vname}"'#/}"' = '"${'"${_eprcc_vname}"'}"' ]; then
b70ff5
			eval _eprcc_cmd_name="\${${_eprcc_vname}% *}";
b70ff5
			eval _eprcc_vval="\${${_eprcc_vname}#* }";
b70ff5
			eval ${_eprcc_vname}='$(which "${_eprcc_cmd_name}")' || return 1;
b70ff5
		fi;
b70ff5
	done;
b70ff5
b70ff5
	rtl_lconcat \$_eprcc_cmake_args_auto "-DCMAKE_AR=${_eprcc_ar}" ":";
b70ff5
	rtl_lconcat \$_eprcc_cmake_args_auto "-DCMAKE_BUILD_TYPE=${_eprcc_build_type}" ":";
b70ff5
	rtl_lconcat \$_eprcc_cmake_args_auto "-DCMAKE_C_COMPILER=${_eprcc_cc}" ":";
b70ff5
	if [ "${_eprcc_ccache:+1}" = 1 ]; then
b70ff5
		rtl_lconcat \$_eprcc_cmake_args_auto "-DCMAKE_C_COMPILER_LAUNCHER=${_eprcc_ccache}" ":";
b70ff5
	fi;
b70ff5
	rtl_lconcat \$_eprcc_cmake_args_auto "-DCMAKE_C_FLAGS=${_eprcc_cflags}" ":";
b70ff5
	rtl_lconcat \$_eprcc_cmake_args_auto "-DCMAKE_CPP_FLAGS=${_eprcc_cppflags}" ":";
b70ff5
	rtl_lconcat \$_eprcc_cmake_args_auto "-DCMAKE_CXX_COMPILER=${_eprcc_cxx}" ":";
b70ff5
	if [ "${_eprcc_ccache:+1}" = 1 ]; then
b70ff5
		rtl_lconcat \$_eprcc_cmake_args_auto "-DCMAKE_CXX_COMPILER_LAUNCHER=${_eprcc_ccache}" ":";
b70ff5
	fi;
b70ff5
	rtl_lconcat \$_eprcc_cmake_args_auto "-DCMAKE_CXX_FLAGS=${_eprcc_cxxflags}" ":";
b70ff5
	rtl_lconcat \$_eprcc_cmake_args_auto "-DCMAKE_EXE_LINKER_FLAGS=${_eprcc_ldflags}" ":";
b70ff5
	rtl_lconcat \$_eprcc_cmake_args_auto "-DCMAKE_FIND_ROOT_PATH=${_eprcc_prefix}" ":";
b70ff5
	rtl_lconcat \$_eprcc_cmake_args_auto "-DCMAKE_INSTALL_PREFIX=" ":";
b70ff5
	rtl_lconcat \$_eprcc_cmake_args_auto "-DCMAKE_LINKER=${_eprcc_ld}" ":";
b70ff5
	rtl_lconcat \$_eprcc_cmake_args_auto "-DCMAKE_MODULE_LINKER_FLAGS=${_eprcc_ldflags}" ":";
b70ff5
	rtl_lconcat \$_eprcc_cmake_args_auto "-DCMAKE_RANLIB=${_eprcc_ranlib}" ":";
b70ff5
	rtl_lconcat \$_eprcc_cmake_args_auto "-DCMAKE_SHARED_LINKER_FLAGS=${_eprcc_ldflags}" ":";
b70ff5
	rtl_lconcat \$_eprcc_cmake_args_auto "-DCMAKE_SYSTEM_PROCESSOR=${_eprcc_system_processor}" ":";
b70ff5
	rtl_lconcat \$_eprcc_cmake_args_auto "-DPKG_CONFIG_EXECUTABLE=${_eprcc_pkg_config}" ":";
b70ff5
b70ff5
	case "${_eprcc_build_type}" in
b70ff5
	native)
b70ff5
		rtl_lconcat \$_eprcc_cmake_args_auto "-DCMAKE_SYSROOT=${_eprcc_prefix}" ":";
b70ff5
		rtl_lconcat \$_eprcc_cmake_args_auto "-DCMAKE_SYSTEM_NAME=${_eprcc_system_name}" ":";
b70ff5
		;;
b70ff5
	esac;
b70ff5
b70ff5
	rtl_run_cmdlineV ":" "${_eprcc_cmake}"	\
b70ff5
		"${_eprcc_cmake_args_auto}"	\
b70ff5
		${_eprcc_cmake_args:-}		\
b70ff5
		${_eprcc_cmake_args_extra:-}	\
b70ff5
		"${_eprcc_subdir}";
b70ff5
	exit "${?}";
b70ff5
);
b70ff5
	_eprcc_rc="${?}";
b70ff5
b70ff5
	return "${_eprcc_rc}";
b70ff5
};
b70ff5
b70ff5
#
b70ff5
# ex_pkg_run_make() - run make(1)
b70ff5
# @_ar:				ar(1) command name or pathname
b70ff5
# @_cc:				C compiler command name or pathname
b70ff5
# @_cxx:			C++ compiler command name or pathname
b70ff5
# @_ld:				ld(1) command name or pathname
b70ff5
# @_libtool:			libtool(1) command name or pathname or "none"
b70ff5
# @_make:			make(1) command name or pathname
b70ff5
# @_pkg_config:			pkg-config(1) command name or pathname
b70ff5
# @_ranlib:			ranlib(1) command name or pathname
b70ff5
# @--:				(ignored)
b70ff5
# @_set_ccfl:			1 if CC=... is to be passed to make(1), 0 if CC=... is not to be passed to make(1)
b70ff5
# @_subdir:			make(1) -C argument
b70ff5
# @--:				(ignored)
b70ff5
# @_makeflags:			make(1) flags as a whitespace-separated list
b70ff5
# @_makeflags_extra:		extra make(1) flags as a whitespace-separated likst
b70ff5
# @_makeflags_list:		make(1) flags as a :-separated list
b70ff5
# @_makeflags_extra_list:	extra make(1) flags as a :-separated list
b70ff5
# @_makeflags_loadavg:		make(1) -l load argument
b70ff5
# @_makeflags_parallelise:	make(1) -j jobs argument
b70ff5
# @_makeflags_verbosity:	make(1) Makefile verbosity arguments or "none"
b70ff5
# @--:				(ignored)
b70ff5
# @_cflags:			$CFLAGS
b70ff5
# @_cflags_extra:		extra $CFLAGS
b70ff5
# @_cppflags:			$CPPFLAGS
b70ff5
# @_cppflags_extra:		extra $CPPFLAGS
b70ff5
# @_cxxflags:			$CXXFLAGS
b70ff5
# @_cxxflags_extra:		extra $CXXFLAGS
b70ff5
# @_ldflags:			$LDFLAGS
b70ff5
# @_ldflags_extra:		extra $LDFLAGS
b70ff5
# @_pkg_config_libdir:		pkg-config(1) search directory
b70ff5
# @--:				(ignored)
b70ff5
# @_destdir_spec:		DESTDIR=... specification
b70ff5
# @_target:			make(1) target
b70ff5
#
b70ff5
# Returns:			zero (0) on success, non-zero (>0) on failure
b70ff5
#
b70ff5
ex_pkg_run_make() {
b70ff5
	local	_eprm_ar="${1}" _eprm_cc="${2}" _eprm_cxx="${3}" _eprm_ld="${4}"			\
b70ff5
		_eprm_libtool="${5}" _eprm_make="${6}" _eprm_pkg_config="${7}" _eprm_ranlib="${8}"	\
b70ff5
		_eprm_ignored="${9}"									\
b70ff5
		_eprm_set_ccfl="${10}" _eprm_subdir="${11}"						\
b70ff5
		_eprm_ignored="${12}"									\
b70ff5
		_eprm_makeflags="${13}" _eprm_makeflags_extra="${14}" _eprm_makeflags_list="${15}"	\
b70ff5
		_eprm_makeflags_extra_list="${16}" _eprm_makeflags_loadavg="${17}"			\
b70ff5
		_eprm_makeflags_parallelise="${18}" _eprm_makeflags_verbosity="${19}"			\
b70ff5
		_eprm_ignored="${20}"									\
b70ff5
		_eprm_cflags="${21}" _eprm_cflags_extra="${22}" _eprm_cppflags="${23}"			\
b70ff5
		_eprm_cppflags_extra="${24}" _eprm_cxxflags="${25}" _eprm_cxxflags_extra="${26}"	\
b70ff5
		_eprm_ldflags="${27}" _eprm_ldflags_extra="${28}" _eprm_pkg_config_libdir="${29}"	\
b70ff5
		_eprm_ignored="${30}"									\
b70ff5
		_eprm_destdir_spec="${31}" _eprm_target="${32}"						\
b70ff5
		_eprm_rc=0;
b70ff5
b70ff5
	case "${_eprm_makeflags_loadavg:-}" in
b70ff5
	none) _eprm_makeflags_loadavg=""; ;;
b70ff5
	esac;
b70ff5
b70ff5
	case "${_eprm_libtool:-}" in
b70ff5
	none) _eprm_libtool=""; ;;
b70ff5
	esac;
b70ff5
b70ff5
	case "${_eprm_makeflags_verbosity}" in
b70ff5
	none) _eprm_makeflags_verbosity=""; ;;
b70ff5
	esac;
b70ff5
b70ff5
	case "${_eprm_set_ccfl}" in
b70ff5
	1) _eprm_set_ccfl="1"; ;;
b70ff5
	*) _eprm_set_ccfl=""; ;;
b70ff5
	esac;
b70ff5
b70ff5
(
b70ff5
	if [ "${_eprm_libtool:+1}" = 1 ]; then
b70ff5
		export MAKE="make LIBTOOL=${_eprm_libtool}";
b70ff5
	fi;
b70ff5
b70ff5
	if [ "${_eprm_makeflags_list:+1}" = 1 ]; then
b70ff5
		rtl_run_cmdlineV ":" "${_eprm_make}"							\
b70ff5
			AR="${_eprm_ar}"								\
b70ff5
			${_eprm_set_ccfl:+CC="${_eprm_cc}"}						\
b70ff5
			${_eprm_set_ccfl:+CXX="${_eprm_cxx}"}						\
b70ff5
			LD="${_eprm_ld}"								\
b70ff5
			${_eprm_libtool:+LIBTOOL="${_eprm_libtool}"}					\
b70ff5
			${_eprm_pkg_config:+PKG_CONFIG="${_eprm_pkg_config}"}				\
b70ff5
			RANLIB="${_eprm_ranlib}"							\
b70ff5
													\
b70ff5
			"${_eprm_makeflags_list}"							\
b70ff5
			"${_eprm_makeflags_extra_list:-}"						\
b70ff5
			${_eprm_makeflags_loadavg:-}							\
b70ff5
			${_eprm_makeflags_parallelise:-}						\
b70ff5
			${_eprm_makeflags_verbosity}							\
b70ff5
													\
b70ff5
			${_eprm_cflags:+CFLAGS="${_eprm_cflags}"}					\
b70ff5
			${_eprm_cflags_extra:+CFLAGS+="${_eprm_cflags_extra}"}				\
b70ff5
			${_eprm_cppflags:+CPPFLAGS="${_eprm_cppflags}"}					\
b70ff5
			${_eprm_cppflags_extra:+CPPFLAGS+="${_eprm_cppflags_extra}"}			\
b70ff5
			${_eprm_cxxflags:+CXXFLAGS="${_eprm_cxxflags}"}					\
b70ff5
			${_eprm_cxxflags_extra:+CXXFLAGS+="${_eprm_cxxflags_extra}"}			\
b70ff5
			${_eprm_ldflags:+LDFLAGS="${_eprm_ldflags}"}					\
b70ff5
			${_eprm_ldflags_extra:+LDFLAGS+="${_eprm_ldflags_extra}"}			\
b70ff5
			${_eprm_pkg_config_libdir:+PKG_CONFIG_LIBDIR="${_eprm_pkg_config_libdir}"}	\
b70ff5
													\
b70ff5
			${_eprm_subdir:+-C "${_eprm_subdir}"}						\
b70ff5
			${_eprm_destdir_spec:+"${_eprm_destdir_spec}"}					\
b70ff5
			${_eprm_target:+"${_eprm_target}"}						\
b70ff5
			;
b70ff5
		exit "${?}";
b70ff5
	elif [ "${_eprm_makeflags_extra_list:+1}" = 1 ]; then
b70ff5
		rtl_run_cmdlineV ":" "${_eprm_make}"							\
b70ff5
			AR="${_eprm_ar}"								\
b70ff5
			${_eprm_set_ccfl:+CC="${_eprm_cc}"}						\
b70ff5
			${_eprm_set_ccfl:+CXX="${_eprm_cxx}"}						\
b70ff5
			LD="${_eprm_ld}"								\
b70ff5
			${_eprm_libtool:+LIBTOOL="${_eprm_libtool}"}					\
b70ff5
			${_eprm_pkg_config:+PKG_CONFIG="${_eprm_pkg_config}"}				\
b70ff5
			RANLIB="${_eprm_ranlib}"							\
b70ff5
													\
b70ff5
			${_eprm_makeflags:-}								\
b70ff5
			"${_eprm_makeflags_extra_list}"							\
b70ff5
			${_eprm_makeflags_loadavg:-}							\
b70ff5
			${_eprm_makeflags_parallelise:-}						\
b70ff5
			${_eprm_makeflags_verbosity}							\
b70ff5
													\
b70ff5
			${_eprm_cflags:+CFLAGS="${_eprm_cflags}"}					\
b70ff5
			${_eprm_cflags_extra:+CFLAGS+="${_eprm_cflags_extra}"}				\
b70ff5
			${_eprm_cppflags:+CPPFLAGS="${_eprm_cppflags}"}					\
b70ff5
			${_eprm_cppflags_extra:+CPPFLAGS+="${_eprm_cppflags_extra}"}			\
b70ff5
			${_eprm_cxxflags:+CXXFLAGS="${_eprm_cxxflags}"}					\
b70ff5
			${_eprm_cxxflags_extra:+CXXFLAGS+="${_eprm_cxxflags_extra}"}			\
b70ff5
			${_eprm_ldflags:+LDFLAGS="${_eprm_ldflags}"}					\
b70ff5
			${_eprm_ldflags_extra:+LDFLAGS+="${_eprm_ldflags_extra}"}			\
b70ff5
			${_eprm_pkg_config_libdir:+PKG_CONFIG_LIBDIR="${_eprm_pkg_config_libdir}"}	\
b70ff5
													\
b70ff5
			${_eprm_subdir:+-C "${_eprm_subdir}"}						\
b70ff5
			${_eprm_destdir_spec:+"${_eprm_destdir_spec}"}					\
b70ff5
			${_eprm_target:+"${_eprm_target}"}						\
b70ff5
			;
b70ff5
		exit "${?}";
b70ff5
	else
b70ff5
		rtl_run_cmdlineV ":" "${_eprm_make}"							\
b70ff5
			AR="${_eprm_ar}"								\
b70ff5
			${_eprm_set_ccfl:+CC="${_eprm_cc}"}						\
b70ff5
			${_eprm_set_ccfl:+CXX="${_eprm_cxx}"}						\
b70ff5
			LD="${_eprm_ld}"								\
b70ff5
			${_eprm_libtool:+LIBTOOL="${_eprm_libtool}"}					\
b70ff5
			${_eprm_pkg_config:+PKG_CONFIG="${_eprm_pkg_config}"}				\
b70ff5
			RANLIB="${_eprm_ranlib}"							\
b70ff5
													\
b70ff5
			${_eprm_makeflags:-}								\
b70ff5
			${_eprm_makeflags_extra:-}							\
b70ff5
			${_eprm_makeflags_loadavg:-}							\
b70ff5
			${_eprm_makeflags_parallelise:-}						\
b70ff5
			${_eprm_makeflags_verbosity}							\
b70ff5
													\
b70ff5
			${_eprm_cflags:+CFLAGS="${_eprm_cflags}"}					\
b70ff5
			${_eprm_cflags_extra:+CFLAGS+="${_eprm_cflags_extra}"}				\
b70ff5
			${_eprm_cppflags:+CPPFLAGS="${_eprm_cppflags}"}					\
b70ff5
			${_eprm_cppflags_extra:+CPPFLAGS+="${_eprm_cppflags_extra}"}			\
b70ff5
			${_eprm_cxxflags:+CXXFLAGS="${_eprm_cxxflags}"}					\
b70ff5
			${_eprm_cxxflags_extra:+CXXFLAGS+="${_eprm_cxxflags_extra}"}			\
b70ff5
			${_eprm_ldflags:+LDFLAGS="${_eprm_ldflags}"}					\
b70ff5
			${_eprm_ldflags_extra:+LDFLAGS+="${_eprm_ldflags_extra}"}			\
b70ff5
			${_eprm_pkg_config_libdir:+PKG_CONFIG_LIBDIR="${_eprm_pkg_config_libdir}"}	\
b70ff5
													\
b70ff5
			${_eprm_subdir:+-C "${_eprm_subdir}"}						\
b70ff5
			${_eprm_destdir_spec:+"${_eprm_destdir_spec}"}					\
b70ff5
			${_eprm_target:+"${_eprm_target}"}						\
b70ff5
			;
b70ff5
		exit "${?}";
b70ff5
	fi;
b70ff5
);
b70ff5
	_eprm_rc="${?}";
b70ff5
b70ff5
	return "${_eprm_rc}";
b70ff5
};
b70ff5
b70ff5
# vim:filetype=sh textwidth=0