commit:     92523f4fa2b9f09b88f4316bd021a737d3a2447e
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 27 19:32:31 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Dec 27 20:57:07 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=92523f4f

autotools.eclass: optimize dependency generation (elide subshells)

Signed-off-by: Sam James <sam <AT> gentoo.org>

 eclass/autotools.eclass | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass
index 5e214686572a..5eab543409a5 100644
--- a/eclass/autotools.eclass
+++ b/eclass/autotools.eclass
@@ -105,7 +105,9 @@ if [[ -n ${WANT_AUTOMAKE} ]] ; then
                        # the autoreconf tool, so this requirement is correct, 
bug #401605.
                        ;;
                latest)
-                       _automake_atom="|| ( $(printf 
'>=sys-devel/automake-%s:%s ' ${_LATEST_AUTOMAKE[@]/:/ }) )"
+                       printf -v _automake_atom_tmp 
'>=sys-devel/automake-%s:%s ' ${_LATEST_AUTOMAKE[@]/:/ }
+                       _automake_atom="|| ( ${_automake_atom_tmp} )"
+                       unset _automake_atom_tmp
                        ;;
                *)
                        _automake_atom="=sys-devel/automake-${WANT_AUTOMAKE}*"
@@ -128,7 +130,9 @@ if [[ -n ${WANT_AUTOCONF} ]] ; then
                        _autoconf_atom=">=sys-devel/autoconf-2.71-r6"
                        ;;
                latest)
-                       _autoconf_atom="|| ( $(printf 
'>=sys-devel/autoconf-%s:%s ' ${_LATEST_AUTOCONF[@]/:/ }) )"
+                       printf -v _autoconf_atom_tmp 
'>=sys-devel/autoconf-%s:%s ' ${_LATEST_AUTOCONF[@]/:/ }
+                       _autoconf_atom="|| ( ${_autoconf_atom_tmp} )"
+                       unset _autoconf_atom_tmp
                        ;;
                *)
                        die "Invalid WANT_AUTOCONF value '${WANT_AUTOCONF}'"

Reply via email to