[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Replace AC_FOREACH by m4_foreach_w
From: |
Noah Misch |
Subject: |
Re: Replace AC_FOREACH by m4_foreach_w |
Date: |
Sat, 2 Jul 2005 11:34:33 -0700 |
User-agent: |
Mutt/1.5.5.1i |
I do like this patch. Some comments:
On Fri, Jul 01, 2005 at 10:50:18AM +0200, Stepan Kasal wrote:
> 2005-07-01 Stepan Kasal <address@hidden>
I do not see this ChangeLog entry in CVS. The other changes associated with
this
patch do appear.
> * lib/autoconf/general.m4 (AC_FOREACH): Make obsolete; it's
> replaced ...
Additional lines for the same bullet should start in the same column as the
bullet, like this:
* lib/autoconf/general.m4 (AC_FOREACH): Make obsolete; it's
replaced ...
> * lib/m4sugar/m4sugar.m4 (m4_foreach_w): ... by this new macro.
> * lib/autoconf/status.m4 (_AC_CONFIG_DEPENDENCIES, _AC_CONFIG_UNIQUE):
> Remove m4_foreach_w.
Perhaps it is more descriptive to say that these macros now accept a single
first argument instead of a whitespace-separated list?
> Index: lib/autoconf/status.m4
> ===================================================================
> RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/status.m4,v
> retrieving revision 1.66
> diff -u -r1.66 status.m4
> --- lib/autoconf/status.m4 30 Jun 2005 18:42:09 -0000 1.66
> +++ lib/autoconf/status.m4 1 Jul 2005 08:28:21 -0000
> @@ -211,17 +211,16 @@
> [AC_FILE_DEPENDENCY_TRACE([$1], [$1.in])])])
>
>
> -# _AC_CONFIG_DEPENDENCIES(DEST[:SOURCE1[:SOURCE2...]]...)
> -# -------------------------------------------------------
> +# _AC_CONFIG_DEPENDENCIES(DEST[:SOURCE1[:SOURCE2...]])
> +# ----------------------------------------------------
> # Declare the DESTs depend upon their SOURCE1 etc.
Consider stripping plurals.
> m4_define([_AC_CONFIG_DEPENDENCIES],
> -[AC_FOREACH([AC_File], [$1],
> - [_AC_CONFIG_DEPENDENCY(m4_bpatsubst(AC_File, [:], [,]))])dnl
> +[_AC_CONFIG_DEPENDENCY(m4_bpatsubst([$1], [:], [,]))dnl
> ])
>
>
> -# _AC_CONFIG_UNIQUE(DEST[:SOURCE]...)
> -# -----------------------------------
> +# _AC_CONFIG_UNIQUE(DEST[:SOURCE])
> +# --------------------------------
> #
> # Verify that there is no double definition of an output file
> # (precisely, guarantees there is no common elements between
> @@ -230,19 +229,18 @@
> # Note that this macro does not check if the list $[1] itself
> # contains doubles.
Consider deleting this comment.
> m4_define([_AC_CONFIG_UNIQUE],
> -[AC_FOREACH([AC_File], [$1],
> [m4_pushdef([AC_Dest], m4_bpatsubst(AC_File, [:.*]))dnl
You probably want s/AC_File/[$1]/. The current code may happen to work for
FILES, HEADERS, and LINKS, because the calling macros loop on AC_File.
> + AC_CONFIG_IF_MEMBER(AC_Dest, [AC_LIST_FILES],
> + [AC_FATAL(`AC_Dest' [is already registered with AC_CONFIG_FILES.])])dnl
> AC_CONFIG_IF_MEMBER(AC_Dest, [AC_LIST_HEADERS],
> [AC_FATAL(`AC_Dest' [is already registered with
> AC_CONFIG_HEADERS.])])dnl
> AC_CONFIG_IF_MEMBER(AC_Dest, [AC_LIST_LINKS],
> [AC_FATAL(`AC_Dest' [is already registered with AC_CONFIG_LINKS.])])dnl
> - AC_CONFIG_IF_MEMBER(AC_Dest, [_AC_LIST_SUBDIRS],
> - [AC_FATAL(`AC_Dest' [is already registered with
> AC_CONFIG_SUBDIRS.])])dnl
> AC_CONFIG_IF_MEMBER(AC_Dest, [AC_LIST_COMMANDS],
> [AC_FATAL(`AC_Dest' [is already registered with
> AC_CONFIG_COMMANDS.])])dnl
> - AC_CONFIG_IF_MEMBER(AC_Dest, [AC_LIST_FILES],
> - [AC_FATAL(`AC_Dest' [is already registered with AC_CONFIG_FILES.])])dnl
> -m4_popdef([AC_Dest])])dnl
> + AC_CONFIG_IF_MEMBER(AC_Dest, [_AC_LIST_SUBDIRS],
> + [AC_FATAL(`AC_Dest' [is already registered with
> AC_CONFIG_SUBDIRS.])])dnl
> +m4_popdef([AC_Dest])dnl
> ])