[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCHv3] m4sugar: factor away _AS_ECHO_PREPARE.
From: |
Nick Bowler |
Subject: |
Re: [PATCHv3] m4sugar: factor away _AS_ECHO_PREPARE. |
Date: |
Tue, 29 Jan 2013 14:05:54 -0500 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On 2013-01-29 19:26 +0100, Stefano Lattarini wrote:
> On 01/29/2013 07:17 AM, Gary V. Vaughan wrote:
[...]
> > # Find who we are. Look in the path if we contain no directory separator.
> > @@ -1023,63 +1025,15 @@ fi
> > # Output WORD followed by a newline. WORD must be a single shell word
> > # (typically a quoted string). The bytes of WORD are output as-is, even
> > # if it starts with "-" or contains "\".
> > -m4_defun_init([AS_ECHO],
> > -[AS_REQUIRE([_$0_PREPARE])],
> > -[$as_echo $1])
> > +m4_defun([AS_ECHO],
> > +[printf '%s\n' $1])
> >
> This won't work as expected with some invocation like:
>
> AS_ECHO([1 2 3])
>
> as the generated code will print:
>
> 1
> 2
> 3
>
> rather than the (IMHO) expected:
>
> 1 2 3
>
> This is *not* a regression, since this issue was already in the
> existing code; but it would be nice to have it fixed in a follow-up
> patch.
FYI, the Autoconf manual[1] explicitly says that such usage is not
allowed:
Macro: AS_ECHO (word)
...
word must be a single shell word (typically a quoted string).
[1]
https://gnu.org/software/autoconf/manual/autoconf.html#index-AS_005fECHO-1564
Cheers,
--
Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)
- Re: [PATCH] m4sugar: factor away _AS_ECHO_PREPARE., (continued)
- Re: [PATCH] m4sugar: factor away _AS_ECHO_PREPARE., Paul Eggert, 2013/01/28
- Re: [PATCH] m4sugar: factor away _AS_ECHO_PREPARE., Gary V. Vaughan, 2013/01/28
- [PATCHv2] m4sugar: factor away _AS_ECHO_PREPARE., Gary V. Vaughan, 2013/01/28
- Re: [PATCHv2] m4sugar: factor away _AS_ECHO_PREPARE., Gary V. Vaughan, 2013/01/28
- Re: [PATCHv2] m4sugar: factor away _AS_ECHO_PREPARE., Peter Rosin, 2013/01/29
- Re: [PATCHv2] m4sugar: factor away _AS_ECHO_PREPARE., Paul Eggert, 2013/01/29
- [PATCHv3] m4sugar: factor away _AS_ECHO_PREPARE., Gary V. Vaughan, 2013/01/29
- Re: [PATCHv3] m4sugar: factor away _AS_ECHO_PREPARE., Gary V. Vaughan, 2013/01/29
- Re: [PATCHv3] m4sugar: factor away _AS_ECHO_PREPARE., Paul Eggert, 2013/01/29
- Re: [PATCHv3] m4sugar: factor away _AS_ECHO_PREPARE., Stefano Lattarini, 2013/01/29
- Re: [PATCHv3] m4sugar: factor away _AS_ECHO_PREPARE.,
Nick Bowler <=
- Re: [PATCHv3] m4sugar: factor away _AS_ECHO_PREPARE., Stefano Lattarini, 2013/01/29
- Re: [PATCHv3] m4sugar: factor away _AS_ECHO_PREPARE., Eric Blake, 2013/01/29
- Re: [PATCHv3] m4sugar: factor away _AS_ECHO_PREPARE., Stefano Lattarini, 2013/01/29