summaryrefslogtreecommitdiffhomepage
path: root/subr
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2021-09-09 19:46:47 +0200
committerLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2021-09-09 19:46:47 +0200
commit4d6e265dc350af1849b60ce2c97d839b4d156306 (patch)
treeb6303687ef5e7e6d23b044afbb4a23c7ad36279d /subr
parentcf5471e43b4fa8e603b1da0434a95bcdb3dcaada (diff)
downloadmidipix_build-4d6e265dc350af1849b60ce2c97d839b4d156306.tar.bz2
midipix_build-4d6e265dc350af1849b60ce2c97d839b4d156306.tar.xz
Don't copy etc/config.guess for binutils{,_*}.
etc/README.md: updated. midipix.env:${DEFAULT_BUILD_VARS}: adds AUTOCONF_CONFIG_GUESS. groups/010.host_deps.group:binutils_build:${PKG_PATCHES_EXTRA}: from chainport (via midipix.) patches/binutils_build-2.24.51.local.patch: from patches/binutils-2.24.51.local.patch (via midipix.) subr/pkg_configure_autotools.subr: copy etc/config.guess according to ${PKG_AUTOCONF_CONFIG_GUESS}.
Diffstat (limited to 'subr')
-rw-r--r--subr/pkg_configure_autotools.subr42
1 files changed, 27 insertions, 15 deletions
diff --git a/subr/pkg_configure_autotools.subr b/subr/pkg_configure_autotools.subr
index 4f7f76ed..15d76566 100644
--- a/subr/pkg_configure_autotools.subr
+++ b/subr/pkg_configure_autotools.subr
@@ -3,15 +3,22 @@
#
pkg_configure_autotools() {
- local _config_cache="" _fname="" _subdir_tgt="";
+ local _config_cache="" _config_guest_fname="" _fname="" _subdir_tgt="";
if [ "${PKG_CONFIGURE_TYPE:+1}" = 1 ]\
&& [ "${PKG_CONFIGURE_TYPE}" != "autotools" ]; then
return 0;
fi;
+ if [ "${PKG_AUTOCONF_CONFIG_GUESS:-midipix}" = "midipix" ]; then
+ _config_guest_fname="config.guess";
+ else
+ _config_guest_fname="";
+ fi;
+
if rtl_exists_any "${PKG_BASE_DIR}/${PKG_SUBDIR}" \
- "config.guess" "configure.ac" "configure.in" "configure";
+ ${_config_guest_fname:+"${_config_guest_fname}"} \
+ "configure.ac" "configure.in" "configure";
then rtl_export_vars PKG_CONFIG "${PKG_PKG_CONFIG:-}" PKG_CONFIG_LIBDIR "${PKG_PKG_CONFIG_LIBDIR:-}";
if [ "${PKG_FORCE_AUTORECONF:-0}" -eq 1 ]\
&& ! (cd "${PKG_BASE_DIR}/${PKG_SUBDIR}" && autoreconf -fiv); then
@@ -29,12 +36,15 @@ pkg_configure_autotools() {
"${MIDIPIX_BUILD_PWD}/etc/config.sub" \
"${_subdir_tgt}/config.sub"; then
return 1;
- elif ! rtl_fileop install -m 0700 \
- "${MIDIPIX_BUILD_PWD}/etc/config.guess" \
- "${_subdir_tgt}/config.guess"; then
- return 1;
- else
- break;
+ fi;
+ if [ "${PKG_AUTOCONF_CONFIG_GUESS:-midipix}" = "midipix" ]; then
+ if ! rtl_fileop install -m 0700 \
+ "${MIDIPIX_BUILD_PWD}/etc/config.guess"\
+ "${_subdir_tgt}/config.guess"; then
+ return 1;
+ else
+ break;
+ fi;
fi;
fi;
done;
@@ -55,13 +65,15 @@ pkg_configure_autotools() {
|| ! rtl_fileop install -m 0700 "${MIDIPIX_BUILD_PWD}/etc/config.sub" "${_fname}"; then
return 1;
fi;
- done
- for _fname in $(find "${PKG_BASE_DIR}/${PKG_SUBDIR}" -name config.guess); do
- if ! rtl_fileop mv "${_fname}" "${_fname}.orig"\
- || ! rtl_fileop install -m 0700 "${MIDIPIX_BUILD_PWD}/etc/config.guess" "${_fname}"; then
- return 1;
- fi;
- done
+ done;
+ if [ "${PKG_AUTOCONF_CONFIG_GUESS:-midipix}" = "midipix" ]; then
+ for _fname in $(find "${PKG_BASE_DIR}/${PKG_SUBDIR}" -name config.guess); do
+ if ! rtl_fileop mv "${_fname}" "${_fname}.orig"\
+ || ! rtl_fileop install -m 0700 "${MIDIPIX_BUILD_PWD}/etc/config.guess" "${_fname}"; then
+ return 1;
+ fi;
+ done;
+ fi;
if [ "${PKG_BUILD_TYPE}" != host ]; then
if ! rtl_fileop touch "${PKG_BUILD_DIR}/config.cache"; then
return 1;