autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Replace AC_FOREACH by m4_foreach_w


From: Stepan Kasal
Subject: Re: Replace AC_FOREACH by m4_foreach_w
Date: Wed, 25 May 2005 10:50:14 +0200
User-agent: Mutt/1.4.1i

Hello,

On Tue, May 24, 2005 at 09:21:33AM -0700, Paul Eggert wrote:
> For example, why not simply remove AC_FOREACH, and replace:
> 
>   [AC_FOREACH([AC_File], [$1],
>      [_AC_CONFIG_DEPENDENCY(m4_bpatsubst(AC_File, [:], [,]))])dnl
> 
> with:
> 
>   [m4_foreach([AC_File], m4_split(m4_normalize([$1])),
>      [_AC_CONFIG_DEPENDENCY(m4_bpatsubst(AC_File, [:], [,]))])dnl
> 
> and similarly with all other calls to AC_FOREACH?

in a sense I first did this, and then factored out the common idiom
to a new macro, m4_foreach_w.

> [...] wouldn't it be better to remove AC_FOREACH rather than
> rename it?  The whole idea, as I understand it, was to change the
> syntax from white-space separation to m4 lists (which are more reliable).

I didn't have this in mind.  Macros which use whitespace-separated list
are too old to be changed.

> The problem with AC_FOREACH isn't so much its name, as that it makes it
> convenient to support the "wrong" convention.

The name is also part of this problem.  The name AC_FOREACH might give
the impression that this is ``the Autoconf foreach''.

When you have m4_foreach and m4_foreach_w, you can see which is the
``normal'' one.

Have a nice day,
        Stepan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]