Re: [PATCHv2] m4sugar: factor away _AS_ECHO_PREPARE.

Paul Eggert <[email protected]>
Newsgroups gmane.comp.sysutils.autoconf.patches
Organization UCLA Computer Science Department
Message-ID <[email protected]>
Thanks, some minor comments:

> Macros AS_ECHO and AS_ECHO_N now expand unconditionally to
> +   'printf "%s\n"' and 'printf "%s"' unconditionally.

They actually use single-quoted strings, so I'd change your
single quotes to double and vice versa, if you want to keep
the quotes (but see below).

> +Thus, you should use @command{printf '%s\n'}
> +instead of @command{echo}, and similarly use @command{printf %s} instead

The actual code uses "printf '%s'".  It's OK to omit the single
quotes around '%s' but if so it should be done that way consistently
in both documentation and code.

> +Where portability to obsolete environments, prior to the common
> +availability of @command{printf}, is still a concern, and where you
> +cannot be certain the arguments to @command{echo} do not contain
> +backslashes or begin with a minus, it is suggested to use a
> +here-document like this:

I'd reword this to something that's shorter and more off-putting, e.g.,
"Older scripts, written before @command{printf} was portable,
sometimes used a here-document as a safer alternative to @command{echo},
like this:".
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.