Re: [PATCH] tests/testsuite.at: Don't use $as_echo
Eric Blake <[email protected]>
| Newsgroups | gmane.comp.gnu.libtool.patches |
|---|---|
| Organization | Red Hat, Inc. |
| Message-ID | <[email protected]> |
On 3/13/20 4:27 PM, Zack Weinberg wrote:
> tests/testsuite.at was using the undocumented internal shell variable
> $as_echo to set its own variable $ECHO. M4sh stopped setting this
> variable in a patch committed to autoconf development trunk in January
> of 2013, which was mostly harmless since there was a fallback setting
> for $ECHO. As of March 2020, however, merely mentioning $as_echo in
> an m4sh input file will trigger a -Wobsolete warning.
>
> The fix is to promote the fallback setting to be the default setting
> and not reference $as_echo anymore. This is safe for the same reason
> it was safe for autoconf to stop setting $as_echo -- 'printf %s\n' is a
> reliable way to do echoing in all of the shells that are worth worrying
> about anymore.
> ---
> tests/testsuite.at | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
ACK.
>
> diff --git a/tests/testsuite.at b/tests/testsuite.at
> index d561c2a4..9e33c75a 100644
> --- a/tests/testsuite.at
> +++ b/tests/testsuite.at
> @@ -29,8 +29,7 @@ m4_divert_push([PREPARE_TESTS])dnl
> : ${AUTOCONF=autoconf}
> : ${AUTOMAKE=automake}
> : ${AUTORECONF=autoreconf}
> -test set = "${ECHO+set}" || ECHO=${as_echo-'printf %s\n'}
> -: ${ECHO=$as_echo}
> +: ${ECHO='printf %s\n'}
> for tool in ACLOCAL AUTOHEADER AUTOCONF AUTOMAKE AUTORECONF; do
> if eval \$$tool --version >/dev/null 2>&1; then :; else eval $tool=no; fi
> done
>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org