|
|
938c5c |
#
|
|
|
938c5c |
# Copyright (c) 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 LucĂa Andrea Illanes Albornoz <lucia@luciaillanes.de>
|
|
|
938c5c |
# set +o errexit -o noglob -o nounset is assumed.
|
|
|
938c5c |
#
|
|
|
938c5c |
# Package {configure,make} command execution
|
|
|
938c5c |
#
|
|
|
938c5c |
|
|
|
938c5c |
#
|
|
|
938c5c |
# ex_rtl_run_configure() - run configure script
|
|
|
938c5c |
# @_ar: ar(1) command name or pathname
|
|
|
938c5c |
# @_cc: C compiler command name or pathname
|
|
|
938c5c |
# @_configure: configure script command name or pathname
|
|
|
938c5c |
# @_cxx: C++ compiler command name or pathname
|
|
|
938c5c |
# @_ld: ld(1) command name or pathname
|
|
|
938c5c |
# @_libtool: libtool(1) command name or pathname or "none"
|
|
|
938c5c |
# @_pkg_config: pkg-config(1) command name or pathname
|
|
|
938c5c |
# @_python: python command name or pathname
|
|
|
938c5c |
# @_ranlib: ranlib(1) command name or pathname
|
|
|
938c5c |
# @--: (ignored)
|
|
|
938c5c |
# @_flags: configure script flags as a whitespace-separated list
|
|
|
938c5c |
# @_flags_extra: extra configure script flags as a whitespace-separated likst
|
|
|
938c5c |
# @_flags_list: configure script flags as a :-separated list
|
|
|
938c5c |
# @_flags_extra_list: extra configure script flags as a :-separated list
|
|
|
938c5c |
# @--: (ignored)
|
|
|
938c5c |
# @_cflags: $CFLAGS
|
|
|
938c5c |
# @_cflags_extra: extra $CFLAGS
|
|
|
938c5c |
# @_cppflags: $CPPFLAGS
|
|
|
938c5c |
# @_cppflags_extra: extra $CPPFLAGS
|
|
|
938c5c |
# @_cxxflags: $CXXFLAGS
|
|
|
938c5c |
# @_cxxflags_extra: extra $CXXFLAGS
|
|
|
938c5c |
# @_ldflags: $LDFLAGS
|
|
|
938c5c |
# @_ldflags_extra: extra $LDFLAGS
|
|
|
938c5c |
# @_pkg_config_libdir: pkg-config(1) search directory
|
|
|
938c5c |
#
|
|
|
938c5c |
# Returns: zero (0) on success, non-zero (>0) on failure
|
|
|
938c5c |
#
|
|
|
938c5c |
ex_rtl_run_configure() {
|
|
|
938c5c |
local _errc_ar="${1}" _errc_cc="${2}" _errc_configure="${3}" _errc_cxx="${4}" _errc_ld="${5}" \
|
|
|
938c5c |
_errc_libtool="${6}" _errc_pkg_config="${7}" _errc_python="${8}" _errc_ranlib="${9}" \
|
|
|
938c5c |
_errc_ignored="${10}" \
|
|
|
938c5c |
_errc_flags="${11}" _errc_flags_extra="${12}" \
|
|
|
938c5c |
_errc_flags_list="${13}" _errc_flags_extra_list="${14}" \
|
|
|
938c5c |
_errc_ignored="${15}" \
|
|
|
938c5c |
_errc_cflags="${16}" _errc_cflags_extra="${17}" _errc_cppflags="${18}" \
|
|
|
938c5c |
_errc_cppflags_extra="${19}" _errc_cxxflags="${20}" _errc_cxxflags_extra="${21}" \
|
|
|
938c5c |
_errc_ldflags="${22}" _errc_ldflags_extra="${23}" _errc_pkg_config_libdir="${24}" \
|
|
|
938c5c |
_errc_rc=0;
|
|
|
938c5c |
|
|
|
938c5c |
case "${_errc_libtool:-}" in
|
|
|
938c5c |
none) _errc_libtool=""; ;;
|
|
|
938c5c |
esac;
|
|
|
938c5c |
|
|
|
938c5c |
[ "${_errc_cflags_extra:+1}" = 1 ] && _errc_cflags="${_errc_cflags:+${_errc_cflags} }${_errc_cflags_extra}";
|
|
|
938c5c |
[ "${_errc_cppflags_extra:+1}" = 1 ] && _errc_cppflags="${_errc_cppflags:+${_errc_cppflags} }${_errc_cppflags_extra}";
|
|
|
938c5c |
[ "${_errc_cxxflags_extra:+1}" = 1 ] && _errc_cxxflags="${_errc_cxxflags:+${_errc_cxxflags} }${_errc_cxxflags_extra}";
|
|
|
938c5c |
[ "${_errc_ldflags_extra:+1}" = 1 ] && _errc_ldflags="${_errc_ldflags:+${_errc_ldflags} }${_errc_ldflags_extra}";
|
|
|
938c5c |
|
|
|
938c5c |
(
|
|
|
938c5c |
if [ "${_errc_libtool:+1}" = 1 ]; then
|
|
|
938c5c |
export MAKE="make LIBTOOL=${_errc_libtool}";
|
|
|
938c5c |
fi;
|
|
|
938c5c |
|
|
|
938c5c |
[ "${_errc_ar:+1}" = 1 ] && export AR="${_errc_ar}";
|
|
|
938c5c |
[ "${_errc_cc:+1}" = 1 ] && export CC="${_errc_cc}";
|
|
|
938c5c |
[ "${_errc_cxx:+1}" = 1 ] && export CXX="${_errc_cxx}";
|
|
|
938c5c |
[ "${_errc_ld:+1}" = 1 ] && export LD="${_errc_ld}";
|
|
|
938c5c |
[ "${_errc_libtool:+1}" = 1 ] && export LIBTOOL="${_errc_libtool}";
|
|
|
938c5c |
[ "${_errc_pkg_config:+1}" = 1 ] && export PKG_CONFIG="${_errc_pkg_config}";
|
|
|
938c5c |
[ "${_errc_python:+1}" = 1 ] && export PYTHON="${_errc_python}";
|
|
|
938c5c |
[ "${_errc_ranlib:+1}" = 1 ] && export RANLIB="${_errc_ranlib}";
|
|
|
938c5c |
|
|
|
938c5c |
[ "${_errc_cflags:+1}" = 1 ] && export CFLAGS="${_errc_cflags}";
|
|
|
938c5c |
[ "${_errc_cppflags:+1}" = 1 ] && export CPPFLAGS="${_errc_cppflags}";
|
|
|
938c5c |
[ "${_errc_cxxflags:+1}" = 1 ] && export CXXFLAGS="${_errc_cxxflags}";
|
|
|
938c5c |
[ "${_errc_ldflags:+1}" = 1 ] && export LDFLAGS="${_errc_ldflags}";
|
|
|
938c5c |
[ "${_errc_pkg_config_libdir:+1}" = 1 ] && export PKG_CONFIG_LIBDIR="${_errc_pkg_config_libdir}";
|
|
|
938c5c |
|
|
|
938c5c |
if [ "${_errc_flags_list:+1}" = 1 ]; then
|
|
|
938c5c |
rtl_run_cmdlineV ":" "${_errc_configure}" \
|
|
|
938c5c |
"${_errc_flags_list}" \
|
|
|
938c5c |
"${_errc_flags_extra_list:-}" \
|
|
|
938c5c |
;
|
|
|
938c5c |
exit "${?}";
|
|
|
938c5c |
elif [ "${_errc_flags_extra_list:+1}" = 1 ]; then
|
|
|
938c5c |
rtl_run_cmdlineV ":" "${_errc_configure}" \
|
|
|
938c5c |
${_errc_flags:-} \
|
|
|
938c5c |
"${_errc_flags_extra_list:-}" \
|
|
|
938c5c |
;
|
|
|
938c5c |
exit "${?}";
|
|
|
938c5c |
else
|
|
|
938c5c |
rtl_run_cmdlineV ":" "${_errc_configure}" \
|
|
|
938c5c |
${_errc_flags:-} \
|
|
|
938c5c |
${_errc_flags_extra:-} \
|
|
|
938c5c |
;
|
|
|
938c5c |
exit "${?}";
|
|
|
938c5c |
fi;
|
|
|
938c5c |
);
|
|
|
938c5c |
_errc_rc="${?}";
|
|
|
938c5c |
|
|
|
938c5c |
return "${_errc_rc}";
|
|
|
938c5c |
};
|
|
|
938c5c |
|
|
|
938c5c |
#
|
|
|
938c5c |
# ex_rtl_run_configure_cmake() - run configure script
|
|
|
938c5c |
# @_ar: ar(1) command name or pathname
|
|
|
938c5c |
# @_cc: C compiler command name or pathname
|
|
|
938c5c |
# @_ccache: ccache(1) command name or pathname or ""
|
|
|
938c5c |
# @_cmake: CMake command name or pathname
|
|
|
938c5c |
# @_cxx: C++ compiler command name or pathname
|
|
|
938c5c |
# @_ld: ld(1) command name or pathname
|
|
|
938c5c |
# @_pkg_config: pkg-config(1) command name or pathname
|
|
|
938c5c |
# @_python: python command name or pathname
|
|
|
938c5c |
# @_ranlib: ranlib(1) command name or pathname
|
|
|
938c5c |
# @--: (ignored)
|
|
|
938c5c |
# @_build_type: CMake build type (host, cross, native)
|
|
|
938c5c |
# @_cmake_args: additional CMake arguments as a whitespace-separated list
|
|
|
938c5c |
# @_cmake_args_extra: additional CMake extra arguments as a whitespace-separated likst
|
|
|
938c5c |
# @_prefix: build prefix pathname
|
|
|
938c5c |
# @_subdir: CMake build directory pathname
|
|
|
938c5c |
# @_system_name: CMake system name
|
|
|
938c5c |
# @_system_processor: CMake system processor
|
|
|
938c5c |
# @--: (ignored)
|
|
|
938c5c |
# @_cflags: $CFLAGS
|
|
|
938c5c |
# @_cflags_extra: extra $CFLAGS
|
|
|
938c5c |
# @_cppflags: $CPPFLAGS
|
|
|
938c5c |
# @_cppflags_extra: extra $CPPFLAGS
|
|
|
938c5c |
# @_cxxflags: $CXXFLAGS
|
|
|
938c5c |
# @_cxxflags_extra: extra $CXXFLAGS
|
|
|
938c5c |
# @_ldflags: $LDFLAGS
|
|
|
938c5c |
# @_ldflags_extra: extra $LDFLAGS
|
|
|
938c5c |
# @_pkg_config_libdir: pkg-config(1) search directory
|
|
|
938c5c |
#
|
|
|
938c5c |
# Returns: zero (0) on success, non-zero (>0) on failure
|
|
|
938c5c |
#
|
|
|
938c5c |
ex_rtl_run_configure_cmake() {
|
|
|
938c5c |
local _errcc_ar="${1}" _errcc_cc="${2}" _errcc_ccache="${3}" _errcc_cmake="${4}" \
|
|
|
938c5c |
_errcc_cxx="${5}" _errcc_ld="${6}" _errcc_pkg_config="${7}" _errcc_python="${8}" \
|
|
|
938c5c |
_errcc_ranlib="${9}" \
|
|
|
938c5c |
_errcc_ignored="${10}" \
|
|
|
938c5c |
_errcc_build_type="${11}" \
|
|
|
938c5c |
_errcc_cmake_args="${12}" _errcc_cmake_args_extra="${13}" \
|
|
|
938c5c |
_errcc_prefix="${14}" _errcc_subdir="${15}" \
|
|
|
938c5c |
_errcc_system_name="${16}" _errcc_system_processor="${17}" \
|
|
|
938c5c |
_errcc_ignored="${18}" \
|
|
|
938c5c |
_errcc_cflags="${19}" _errcc_cflags_extra="${20}" _errcc_cppflags="${21}" \
|
|
|
938c5c |
_errcc_cppflags_extra="${22}" _errcc_cxxflags="${23}" _errcc_cxxflags_extra="${24}" \
|
|
|
938c5c |
_errcc_ldflags="${25}" _errcc_ldflags_extra="${26}" _errcc_pkg_config_libdir="${27}" \
|
|
|
938c5c |
_errcc_cmd_name="" _errcc_cmake_args_auto="" _errcc_rc=0 _errcc_vname="" _errcc_vval=""
|
|
|
938c5c |
|
|
|
938c5c |
[ "${_errcc_cflags_extra:+1}" = 1 ] && _errcc_cflags="${_errcc_cflags:+${_errcc_cflags} }${_errcc_cflags_extra}";
|
|
|
938c5c |
[ "${_errcc_cppflags_extra:+1}" = 1 ] && _errcc_cppflags="${_errcc_cppflags:+${_errcc_cppflags} }${_errcc_cppflags_extra}";
|
|
|
938c5c |
[ "${_errcc_cxxflags_extra:+1}" = 1 ] && _errcc_cxxflags="${_errcc_cxxflags:+${_errcc_cxxflags} }${_errcc_cxxflags_extra}";
|
|
|
938c5c |
[ "${_errcc_ldflags_extra:+1}" = 1 ] && _errcc_ldflags="${_errcc_ldflags:+${_errcc_ldflags} }${_errcc_ldflags_extra}";
|
|
|
938c5c |
|
|
|
938c5c |
(
|
|
|
938c5c |
[ "${_errcc_pkg_config:+1}" = 1 ] && export PKG_CONFIG="${_errcc_pkg_config}";
|
|
|
938c5c |
[ "${_errcc_pkg_config_libdir:+1}" = 1 ] && export PKG_CONFIG_LIBDIR="${_errcc_pkg_config_libdir}";
|
|
|
938c5c |
[ "${_errcc_python:+1}" = 1 ] && export PYTHON="${_errcc_python}";
|
|
|
938c5c |
|
|
|
938c5c |
for _errcc_vname in ar cc cxx ld pkg_config ranlib; do
|
|
|
938c5c |
case "${_errcc_vname}" in
|
|
|
938c5c |
cc|cxx)
|
|
|
938c5c |
_errcc_vname="_errcc_${_errcc_vname}";
|
|
|
938c5c |
if [ "${_errcc_ccache:+1}" = 1 ]; then
|
|
|
938c5c |
eval ${_errcc_vname}="\${${_errcc_vname}#${_errcc_ccache} }";
|
|
|
938c5c |
fi;
|
|
|
938c5c |
;;
|
|
|
938c5c |
|
|
|
938c5c |
*)
|
|
|
938c5c |
_errcc_vname="_errcc_${_errcc_vname}";
|
|
|
938c5c |
;;
|
|
|
938c5c |
esac;
|
|
|
938c5c |
|
|
|
938c5c |
if eval [ '"${'"${_errcc_vname}"':+1}"' = 1 ]\
|
|
|
938c5c |
&& eval [ '"${'"${_errcc_vname}"'#/}"' = '"${'"${_errcc_vname}"'}"' ]; then
|
|
|
938c5c |
eval _errcc_cmd_name="\${${_errcc_vname}% *}";
|
|
|
938c5c |
eval _errcc_vval="\${${_errcc_vname}#* }";
|
|
|
938c5c |
eval ${_errcc_vname}='$(which "${_errcc_cmd_name}")' || return 1;
|
|
|
938c5c |
fi;
|
|
|
938c5c |
done;
|
|
|
938c5c |
|
|
|
938c5c |
rtl_lconcat \$_errcc_cmake_args_auto "-DCMAKE_AR=${_errcc_ar}" ":";
|
|
|
938c5c |
rtl_lconcat \$_errcc_cmake_args_auto "-DCMAKE_BUILD_TYPE=${_errcc_build_type}" ":";
|
|
|
938c5c |
rtl_lconcat \$_errcc_cmake_args_auto "-DCMAKE_C_COMPILER=${_errcc_cc}" ":";
|
|
|
938c5c |
if [ "${_errcc_ccache:+1}" = 1 ]; then
|
|
|
938c5c |
rtl_lconcat \$_errcc_cmake_args_auto "-DCMAKE_C_COMPILER_LAUNCHER=${_errcc_ccache}" ":";
|
|
|
938c5c |
fi;
|
|
|
938c5c |
rtl_lconcat \$_errcc_cmake_args_auto "-DCMAKE_C_FLAGS=${_errcc_cflags}" ":";
|
|
|
938c5c |
rtl_lconcat \$_errcc_cmake_args_auto "-DCMAKE_CPP_FLAGS=${_errcc_cppflags}" ":";
|
|
|
938c5c |
rtl_lconcat \$_errcc_cmake_args_auto "-DCMAKE_CXX_COMPILER=${_errcc_cxx}" ":";
|
|
|
938c5c |
if [ "${_errcc_ccache:+1}" = 1 ]; then
|
|
|
938c5c |
rtl_lconcat \$_errcc_cmake_args_auto "-DCMAKE_CXX_COMPILER_LAUNCHER=${_errcc_ccache}" ":";
|
|
|
938c5c |
fi;
|
|
|
938c5c |
rtl_lconcat \$_errcc_cmake_args_auto "-DCMAKE_CXX_FLAGS=${_errcc_cxxflags}" ":";
|
|
|
938c5c |
rtl_lconcat \$_errcc_cmake_args_auto "-DCMAKE_EXE_LINKER_FLAGS=${_errcc_ldflags}" ":";
|
|
|
938c5c |
rtl_lconcat \$_errcc_cmake_args_auto "-DCMAKE_FIND_ROOT_PATH=${_errcc_prefix}" ":";
|
|
|
938c5c |
rtl_lconcat \$_errcc_cmake_args_auto "-DCMAKE_INSTALL_PREFIX=" ":";
|
|
|
938c5c |
rtl_lconcat \$_errcc_cmake_args_auto "-DCMAKE_LINKER=${_errcc_ld}" ":";
|
|
|
938c5c |
rtl_lconcat \$_errcc_cmake_args_auto "-DCMAKE_MODULE_LINKER_FLAGS=${_errcc_ldflags}" ":";
|
|
|
938c5c |
rtl_lconcat \$_errcc_cmake_args_auto "-DCMAKE_RANLIB=${_errcc_ranlib}" ":";
|
|
|
938c5c |
rtl_lconcat \$_errcc_cmake_args_auto "-DCMAKE_SHARED_LINKER_FLAGS=${_errcc_ldflags}" ":";
|
|
|
938c5c |
rtl_lconcat \$_errcc_cmake_args_auto "-DCMAKE_SYSTEM_PROCESSOR=${_errcc_system_processor}" ":";
|
|
|
938c5c |
rtl_lconcat \$_errcc_cmake_args_auto "-DPKG_CONFIG_EXECUTABLE=${_errcc_pkg_config}" ":";
|
|
|
938c5c |
|
|
|
938c5c |
case "${_errcc_build_type}" in
|
|
|
938c5c |
native)
|
|
|
938c5c |
rtl_lconcat \$_errcc_cmake_args_auto "-DCMAKE_SYSROOT=${_errcc_prefix}" ":";
|
|
|
938c5c |
rtl_lconcat \$_errcc_cmake_args_auto "-DCMAKE_SYSTEM_NAME=${_errcc_system_name}" ":";
|
|
|
938c5c |
;;
|
|
|
938c5c |
esac;
|
|
|
938c5c |
|
|
|
938c5c |
rtl_run_cmdlineV ":" "${_errcc_cmake}" \
|
|
|
938c5c |
"${_errcc_cmake_args_auto}" \
|
|
|
938c5c |
${_errcc_cmake_args:-} \
|
|
|
938c5c |
${_errcc_cmake_args_extra:-} \
|
|
|
938c5c |
"${_errcc_subdir}";
|
|
|
938c5c |
exit "${?}";
|
|
|
938c5c |
);
|
|
|
938c5c |
_errcc_rc="${?}";
|
|
|
938c5c |
|
|
|
938c5c |
return "${_errcc_rc}";
|
|
|
938c5c |
};
|
|
|
938c5c |
|
|
|
938c5c |
#
|
|
|
938c5c |
# ex_rtl_run_make() - run make(1)
|
|
|
938c5c |
# @_ar: ar(1) command name or pathname
|
|
|
938c5c |
# @_cc: C compiler command name or pathname
|
|
|
938c5c |
# @_cxx: C++ compiler command name or pathname
|
|
|
938c5c |
# @_ld: ld(1) command name or pathname
|
|
|
938c5c |
# @_libtool: libtool(1) command name or pathname or "none"
|
|
|
938c5c |
# @_make: make(1) command name or pathname
|
|
|
938c5c |
# @_pkg_config: pkg-config(1) command name or pathname
|
|
|
938c5c |
# @_ranlib: ranlib(1) command name or pathname
|
|
|
938c5c |
# @--: (ignored)
|
|
|
938c5c |
# @_set_ccfl: 1 if CC=... is to be passed to make(1), 0 if CC=... is not to be passed to make(1)
|
|
|
938c5c |
# @_subdir: make(1) -C argument
|
|
|
938c5c |
# @--: (ignored)
|
|
|
938c5c |
# @_makeflags: make(1) flags as a whitespace-separated list
|
|
|
938c5c |
# @_makeflags_extra: extra make(1) flags as a whitespace-separated likst
|
|
|
938c5c |
# @_makeflags_list: make(1) flags as a :-separated list
|
|
|
938c5c |
# @_makeflags_extra_list: extra make(1) flags as a :-separated list
|
|
|
938c5c |
# @_makeflags_loadavg: make(1) -l load argument
|
|
|
938c5c |
# @_makeflags_parallelise: make(1) -j jobs argument
|
|
|
938c5c |
# @_makeflags_verbosity: make(1) Makefile verbosity arguments or "none"
|
|
|
938c5c |
# @--: (ignored)
|
|
|
938c5c |
# @_cflags: $CFLAGS
|
|
|
938c5c |
# @_cflags_extra: extra $CFLAGS
|
|
|
938c5c |
# @_cppflags: $CPPFLAGS
|
|
|
938c5c |
# @_cppflags_extra: extra $CPPFLAGS
|
|
|
938c5c |
# @_cxxflags: $CXXFLAGS
|
|
|
938c5c |
# @_cxxflags_extra: extra $CXXFLAGS
|
|
|
938c5c |
# @_ldflags: $LDFLAGS
|
|
|
938c5c |
# @_ldflags_extra: extra $LDFLAGS
|
|
|
938c5c |
# @_pkg_config_libdir: pkg-config(1) search directory
|
|
|
938c5c |
# @--: (ignored)
|
|
|
938c5c |
# @_destdir_spec: DESTDIR=... specification
|
|
|
938c5c |
# @_target: make(1) target
|
|
|
938c5c |
#
|
|
|
938c5c |
# Returns: zero (0) on success, non-zero (>0) on failure
|
|
|
938c5c |
#
|
|
|
938c5c |
ex_rtl_run_make() {
|
|
|
938c5c |
local _errm_ar="${1}" _errm_cc="${2}" _errm_cxx="${3}" _errm_ld="${4}" \
|
|
|
938c5c |
_errm_libtool="${5}" _errm_make="${6}" _errm_pkg_config="${7}" _errm_ranlib="${8}" \
|
|
|
938c5c |
_errm_ignored="${9}" \
|
|
|
938c5c |
_errm_set_ccfl="${10}" _errm_subdir="${11}" \
|
|
|
938c5c |
_errm_ignored="${12}" \
|
|
|
938c5c |
_errm_makeflags="${13}" _errm_makeflags_extra="${14}" _errm_makeflags_list="${15}" \
|
|
|
938c5c |
_errm_makeflags_extra_list="${16}" _errm_makeflags_loadavg="${17}" \
|
|
|
938c5c |
_errm_makeflags_parallelise="${18}" _errm_makeflags_verbosity="${19}" \
|
|
|
938c5c |
_errm_ignored="${20}" \
|
|
|
938c5c |
_errm_cflags="${21}" _errm_cflags_extra="${22}" _errm_cppflags="${23}" \
|
|
|
938c5c |
_errm_cppflags_extra="${24}" _errm_cxxflags="${25}" _errm_cxxflags_extra="${26}" \
|
|
|
938c5c |
_errm_ldflags="${27}" _errm_ldflags_extra="${28}" _errm_pkg_config_libdir="${29}" \
|
|
|
938c5c |
_errm_ignored="${30}" \
|
|
|
938c5c |
_errm_destdir_spec="${31}" _errm_target="${32}" \
|
|
|
938c5c |
_errm_rc=0;
|
|
|
938c5c |
|
|
|
938c5c |
case "${_errm_makeflags_loadavg:-}" in
|
|
|
938c5c |
none) _errm_makeflags_loadavg=""; ;;
|
|
|
938c5c |
esac;
|
|
|
938c5c |
|
|
|
938c5c |
case "${_errm_libtool:-}" in
|
|
|
938c5c |
none) _errm_libtool=""; ;;
|
|
|
938c5c |
esac;
|
|
|
938c5c |
|
|
|
938c5c |
case "${_errm_makeflags_verbosity}" in
|
|
|
938c5c |
none) _errm_makeflags_verbosity=""; ;;
|
|
|
938c5c |
esac;
|
|
|
938c5c |
|
|
|
938c5c |
case "${_errm_set_ccfl}" in
|
|
|
938c5c |
1) _errm_set_ccfl="1"; ;;
|
|
|
938c5c |
*) _errm_set_ccfl=""; ;;
|
|
|
938c5c |
esac;
|
|
|
938c5c |
|
|
|
938c5c |
(
|
|
|
938c5c |
if [ "${_errm_libtool:+1}" = 1 ]; then
|
|
|
938c5c |
export MAKE="make LIBTOOL=${_errm_libtool}";
|
|
|
938c5c |
fi;
|
|
|
938c5c |
|
|
|
938c5c |
if [ "${_errm_makeflags_list:+1}" = 1 ]; then
|
|
|
938c5c |
rtl_run_cmdlineV ":" "${_errm_make}" \
|
|
|
938c5c |
AR="${_errm_ar}" \
|
|
|
938c5c |
${_errm_set_ccfl:+CC="${_errm_cc}"} \
|
|
|
938c5c |
${_errm_set_ccfl:+CXX="${_errm_cxx}"} \
|
|
|
938c5c |
LD="${_errm_ld}" \
|
|
|
938c5c |
${_errm_libtool:+LIBTOOL="${_errm_libtool}"} \
|
|
|
938c5c |
${_errm_pkg_config:+PKG_CONFIG="${_errm_pkg_config}"} \
|
|
|
938c5c |
RANLIB="${_errm_ranlib}" \
|
|
|
938c5c |
\
|
|
|
938c5c |
"${_errm_makeflags_list}" \
|
|
|
938c5c |
"${_errm_makeflags_extra_list:-}" \
|
|
|
938c5c |
${_errm_makeflags_loadavg:-} \
|
|
|
938c5c |
${_errm_makeflags_parallelise:-} \
|
|
|
938c5c |
${_errm_makeflags_verbosity} \
|
|
|
938c5c |
\
|
|
|
938c5c |
${_errm_cflags:+CFLAGS="${_errm_cflags}"} \
|
|
|
938c5c |
${_errm_cflags_extra:+CFLAGS+="${_errm_cflags_extra}"} \
|
|
|
938c5c |
${_errm_cppflags:+CPPFLAGS="${_errm_cppflags}"} \
|
|
|
938c5c |
${_errm_cppflags_extra:+CPPFLAGS+="${_errm_cppflags_extra}"} \
|
|
|
938c5c |
${_errm_cxxflags:+CXXFLAGS="${_errm_cxxflags}"} \
|
|
|
938c5c |
${_errm_cxxflags_extra:+CXXFLAGS+="${_errm_cxxflags_extra}"} \
|
|
|
938c5c |
${_errm_ldflags:+LDFLAGS="${_errm_ldflags}"} \
|
|
|
938c5c |
${_errm_ldflags_extra:+LDFLAGS+="${_errm_ldflags_extra}"} \
|
|
|
938c5c |
${_errm_pkg_config_libdir:+PKG_CONFIG_LIBDIR="${_errm_pkg_config_libdir}"} \
|
|
|
938c5c |
\
|
|
|
938c5c |
${_errm_subdir:+-C "${_errm_subdir}"} \
|
|
|
938c5c |
${_errm_destdir_spec:+"${_errm_destdir_spec}"} \
|
|
|
938c5c |
${_errm_target:+"${_errm_target}"} \
|
|
|
938c5c |
;
|
|
|
938c5c |
exit "${?}";
|
|
|
938c5c |
elif [ "${_errm_makeflags_extra_list:+1}" = 1 ]; then
|
|
|
938c5c |
rtl_run_cmdlineV ":" "${_errm_make}" \
|
|
|
938c5c |
AR="${_errm_ar}" \
|
|
|
938c5c |
${_errm_set_ccfl:+CC="${_errm_cc}"} \
|
|
|
938c5c |
${_errm_set_ccfl:+CXX="${_errm_cxx}"} \
|
|
|
938c5c |
LD="${_errm_ld}" \
|
|
|
938c5c |
${_errm_libtool:+LIBTOOL="${_errm_libtool}"} \
|
|
|
938c5c |
${_errm_pkg_config:+PKG_CONFIG="${_errm_pkg_config}"} \
|
|
|
938c5c |
RANLIB="${_errm_ranlib}" \
|
|
|
938c5c |
\
|
|
|
938c5c |
${_errm_makeflags:-} \
|
|
|
938c5c |
"${_errm_makeflags_extra_list}" \
|
|
|
938c5c |
${_errm_makeflags_loadavg:-} \
|
|
|
938c5c |
${_errm_makeflags_parallelise:-} \
|
|
|
938c5c |
${_errm_makeflags_verbosity} \
|
|
|
938c5c |
\
|
|
|
938c5c |
${_errm_cflags:+CFLAGS="${_errm_cflags}"} \
|
|
|
938c5c |
${_errm_cflags_extra:+CFLAGS+="${_errm_cflags_extra}"} \
|
|
|
938c5c |
${_errm_cppflags:+CPPFLAGS="${_errm_cppflags}"} \
|
|
|
938c5c |
${_errm_cppflags_extra:+CPPFLAGS+="${_errm_cppflags_extra}"} \
|
|
|
938c5c |
${_errm_cxxflags:+CXXFLAGS="${_errm_cxxflags}"} \
|
|
|
938c5c |
${_errm_cxxflags_extra:+CXXFLAGS+="${_errm_cxxflags_extra}"} \
|
|
|
938c5c |
${_errm_ldflags:+LDFLAGS="${_errm_ldflags}"} \
|
|
|
938c5c |
${_errm_ldflags_extra:+LDFLAGS+="${_errm_ldflags_extra}"} \
|
|
|
938c5c |
${_errm_pkg_config_libdir:+PKG_CONFIG_LIBDIR="${_errm_pkg_config_libdir}"} \
|
|
|
938c5c |
\
|
|
|
938c5c |
${_errm_subdir:+-C "${_errm_subdir}"} \
|
|
|
938c5c |
${_errm_destdir_spec:+"${_errm_destdir_spec}"} \
|
|
|
938c5c |
${_errm_target:+"${_errm_target}"} \
|
|
|
938c5c |
;
|
|
|
938c5c |
exit "${?}";
|
|
|
938c5c |
else
|
|
|
938c5c |
rtl_run_cmdlineV ":" "${_errm_make}" \
|
|
|
938c5c |
AR="${_errm_ar}" \
|
|
|
938c5c |
${_errm_set_ccfl:+CC="${_errm_cc}"} \
|
|
|
938c5c |
${_errm_set_ccfl:+CXX="${_errm_cxx}"} \
|
|
|
938c5c |
LD="${_errm_ld}" \
|
|
|
938c5c |
${_errm_libtool:+LIBTOOL="${_errm_libtool}"} \
|
|
|
938c5c |
${_errm_pkg_config:+PKG_CONFIG="${_errm_pkg_config}"} \
|
|
|
938c5c |
RANLIB="${_errm_ranlib}" \
|
|
|
938c5c |
\
|
|
|
938c5c |
${_errm_makeflags:-} \
|
|
|
938c5c |
${_errm_makeflags_extra:-} \
|
|
|
938c5c |
${_errm_makeflags_loadavg:-} \
|
|
|
938c5c |
${_errm_makeflags_parallelise:-} \
|
|
|
938c5c |
${_errm_makeflags_verbosity} \
|
|
|
938c5c |
\
|
|
|
938c5c |
${_errm_cflags:+CFLAGS="${_errm_cflags}"} \
|
|
|
938c5c |
${_errm_cflags_extra:+CFLAGS+="${_errm_cflags_extra}"} \
|
|
|
938c5c |
${_errm_cppflags:+CPPFLAGS="${_errm_cppflags}"} \
|
|
|
938c5c |
${_errm_cppflags_extra:+CPPFLAGS+="${_errm_cppflags_extra}"} \
|
|
|
938c5c |
${_errm_cxxflags:+CXXFLAGS="${_errm_cxxflags}"} \
|
|
|
938c5c |
${_errm_cxxflags_extra:+CXXFLAGS+="${_errm_cxxflags_extra}"} \
|
|
|
938c5c |
${_errm_ldflags:+LDFLAGS="${_errm_ldflags}"} \
|
|
|
938c5c |
${_errm_ldflags_extra:+LDFLAGS+="${_errm_ldflags_extra}"} \
|
|
|
938c5c |
${_errm_pkg_config_libdir:+PKG_CONFIG_LIBDIR="${_errm_pkg_config_libdir}"} \
|
|
|
938c5c |
\
|
|
|
938c5c |
${_errm_subdir:+-C "${_errm_subdir}"} \
|
|
|
938c5c |
${_errm_destdir_spec:+"${_errm_destdir_spec}"} \
|
|
|
938c5c |
${_errm_target:+"${_errm_target}"} \
|
|
|
938c5c |
;
|
|
|
938c5c |
exit "${?}";
|
|
|
938c5c |
fi;
|
|
|
938c5c |
);
|
|
|
938c5c |
_errm_rc="${?}";
|
|
|
938c5c |
|
|
|
938c5c |
return "${_errm_rc}";
|
|
|
938c5c |
};
|
|
|
938c5c |
|
|
|
938c5c |
# vim:filetype=sh textwidth=0
|