From a0283899e7e8a1db793d082537850dd43143268a Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Fri, 7 Nov 2008 09:03:35 +0100 Subject: Implement $ECHO with print -r, printf or cat in a shell function. * configure.ac: Bump Autoconf requirement. * libltdl/config/general.m4sh: Use $as_echo as default $ECHO. * tests/testsuite.at: Use $as_echo as default $ECHO. * libltdl/m4/libtool.m4 (LT_INIT): Add _LT_SHELL_INIT to work around Autoconf <2.64 bug. (_LT_OUTPUT_LIBTOOL_COMMANDS_INIT): Add func_fallback_echo. Eliminate lt_ECHO requoting. (_LT_SHELL_INIT): Use a public M4sh diversion. (_LT_PROG_ECHO_BACKSLASH): Rewrite. (LT_CMD_MAX_LEN): Do not use --fallback-echo. * libltdl/config/ltmain.m4sh: Remove --no-reexec and --fallback-echo handling. (func_fallback_echo): New. (func_emit_wrapper_part1): Quote ECHO. Remove --no-reexec and --fallback-echo handling. (Execute mode): Do not set qecho. --- HACKING | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'HACKING') diff --git a/HACKING b/HACKING index c7efe410..71f2dad7 100644 --- a/HACKING +++ b/HACKING @@ -290,16 +290,15 @@ yyyy-mm-dd Name of Author (tiny change) ====================== * Be careful with both `echo' and `$ECHO'. As the latter may be one of - echo - print -r + print -r -- printf %s\n - $CONFIG_SHELL $0 --fallback-echo - it may not have more than one argument, its value may not be eval'ed - and the argument may not start with a `-'. As a rule of thumb, use + func_fallback_echo + it may not have more than one argument and its value may not be + eval'ed. However, the argument may start with a `-'. As a rule of + thumb, use echo .. for literal (constant) strings without leading hyphen and no backslashes within, - $ECHO ".." for strings without leading hyphen, - $ECHO "X.." | $Xsed otherwise. + $ECHO ".." otherwise. * The Autoconf manual says that giving an empty parameter is equivalent to not giving it at all. (In particular, the Autoconf manual doesn't -- cgit v1.2.1