autoconf-commit
[Top][All Lists]
Advanced

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

[SCM] GNU Autoconf source repository branch, master, updated. v2.63-131-


From: Eric Blake
Subject: [SCM] GNU Autoconf source repository branch, master, updated. v2.63-131-g7abb734
Date: Wed, 29 Oct 2008 12:31:56 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Autoconf source repository".

http://git.sv.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=7abb73425a0fc9dbe5787b991be21969c6722deb

The branch, master has been updated
       via  7abb73425a0fc9dbe5787b991be21969c6722deb (commit)
       via  c602a5c6d0028c9257ca3072333c6566f2c2701a (commit)
       via  52773c7b70c37e6b3bc020cbc153a73bebd10d0c (commit)
      from  479ad2b6b20b9b3424635bd974ea45bb4fd54458 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 7abb73425a0fc9dbe5787b991be21969c6722deb
Author: Eric Blake <address@hidden>
Date:   Tue Oct 28 16:37:54 2008 -0600

    Alter signature of AS_INIT_GENERATED.
    
    * lib/m4sugar/m4sh.m4 (AS_INIT_GENERATED): Add parameters, and
    manage here-doc and chmod in place.  This also allows future
    changes for optimizing the child via diversion/m4_wrap magic.
    * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Update
    caller.
    * doc/autoconf.texi (Initialization Macros) <AS_INIT_GENERATED>:
    Update the documentation.
    
    Signed-off-by: Eric Blake <address@hidden>

commit c602a5c6d0028c9257ca3072333c6566f2c2701a
Author: Eric Blake <address@hidden>
Date:   Tue Oct 28 15:35:23 2008 -0600

    Use _m4_stack_reverse in m4_set.
    
    * lib/m4sugar/m4sugar.m4 (_m4_set_contents_1)
    (_m4_set_contents_2): Rewrite to share _m4_stack_reverse
    implementation.
    (m4_set_contents, m4_set_foreach, m4_set_list, m4_set_listc)
    (m4_set_map): Adjust callers to new API.
    
    Signed-off-by: Eric Blake <address@hidden>

commit 52773c7b70c37e6b3bc020cbc153a73bebd10d0c
Author: Eric Blake <address@hidden>
Date:   Tue Oct 28 15:11:16 2008 -0600

    Add m4_stack_foreach_sep.
    
    * lib/m4sugar/m4sugar.m4 (m4_stack_foreach_sep)
    (m4_stack_foreach_sep_lifo): New macros.
    (_m4_stack_reverse): Adjust prototype, to support it.
    (m4_copy): Use fewer macros.
    * tests/m4sugar.at (m4@&address@hidden): Rename...
    (m4@&address@hidden): ...and add m4_stack_foreach_sep tests.
    
    Signed-off-by: Eric Blake <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog              |   28 ++++++++++++++
 doc/autoconf.texi      |   60 ++++++++++++++----------------
 lib/autoconf/status.m4 |   17 +++------
 lib/m4sugar/m4sh.m4    |   34 +++++++++++++----
 lib/m4sugar/m4sugar.m4 |   95 ++++++++++++++++++++++++++++++------------------
 tests/m4sugar.at       |   18 ++++++---
 6 files changed, 159 insertions(+), 93 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b5026a7..b115e0a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,31 @@
+2008-10-29  Eric Blake  <address@hidden>
+
+       Alter signature of AS_INIT_GENERATED.
+       * lib/m4sugar/m4sh.m4 (AS_INIT_GENERATED): Add parameters, and
+       manage here-doc and chmod in place.  This also allows future
+       changes for optimizing the child via diversion/m4_wrap magic.
+       * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Update
+       caller.
+       * doc/autoconf.texi (Initialization Macros) <AS_INIT_GENERATED>:
+       Update the documentation.
+
+2008-10-29  Eric Blake  <address@hidden>
+
+       Use _m4_stack_reverse in m4_set.
+       * lib/m4sugar/m4sugar.m4 (_m4_set_contents_1)
+       (_m4_set_contents_2): Rewrite to share _m4_stack_reverse
+       implementation.
+       (m4_set_contents, m4_set_foreach, m4_set_list, m4_set_listc)
+       (m4_set_map): Adjust callers to new API.
+
+       Add m4_stack_foreach_sep.
+       * lib/m4sugar/m4sugar.m4 (m4_stack_foreach_sep)
+       (m4_stack_foreach_sep_lifo): New macros.
+       (_m4_stack_reverse): Adjust prototype, to support it.
+       (m4_copy): Use fewer macros.
+       * tests/m4sugar.at (m4@&address@hidden): Rename...
+       (m4@&address@hidden): ...and add m4_stack_foreach_sep tests.
+
 2008-10-29  Bruno Haible  <address@hidden>
 
        Mention Sun WorkShop 6.2 OpenMP bug.
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index f2a7923..1a2f748 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -12162,7 +12162,7 @@ echo "(2+$bar)*4 == $foo"
 @asindex{VAR_COPY}
 Emit shell code to assign the contents of the polymorphic shell variable
 @var{source} to the polymorphic shell variable @var{dest}.  For example,
-executing this m4sh snippet will output @samp{bar hi}:
+executing this M4sh snippet will output @samp{bar hi}:
 
 @example
 foo=bar bar=hi
@@ -12202,7 +12202,7 @@ in @var{var} is being expanded.
 @asindex{VAR_POPDEF}
 @cindex composing variable names
 @cindex variable names, composing
-A common m4sh idiom involves composing shell variable names from an m4
+A common M4sh idiom involves composing shell variable names from an m4
 argument (for example, writing a macro that uses a cache variable).
 @var{value} can be an arbitrary string, which will be transliterated
 into a valid shell name by @code{AS_TR_SH}.  In order to access the
@@ -12291,38 +12291,34 @@ generated from, and code to sanitize the environment 
for the rest of the
 script.  Finally, it changes the current diversion to @code{BODY}.
 @end defmac
 
address@hidden AS_INIT_GENERATED
address@hidden AS_INIT_GENERATED (@var{file}, @ovar{comment})
 @asindex{INIT_GENERATED}
-Initialize the M4sh environment.  This macro emits again all the
-code that is generated by @code{AS_INIT}, including the expansion of
address@hidden and @code{AS_SHELL_SANITIZE}.  It is meant
-to be used in a quoted here document when generating other shell scripts.
-
-Note that @code{AS_INIT_GENERATED} does not emit the entire prolog.
-In particular, a line containing @code{#!$SHELL} must have already been
-emitted to the child script; you should not use @code{#!/bin/sh}, or the
-child script will not use the more modern shell that the parent script
-might have detected.  Likewise, the child script starts life without a
-log file open, so you must temporarily disable any attempts to use the
-log file until after emitting code to open a log within the child.
-Currently, the suggested idiom for writing a M4sh
-shell script from within another script is:
-
address@hidden
+Emit shell code to start the creation of a subsidiary shell script in
address@hidden, including changing @var{file} to be executable.  This macro
+populates the child script with information learned from the parent
+(thus, the emitted code is equivalent in effect, but more efficient,
+than the code output by @code{AS_INIT}, @code{AS_BOURNE_COMPATIBLE}, and
address@hidden).  If present, @var{comment} is output near the
+beginning of the child, prior to the shell initialization code.  The
+parent script should check the exit status after this macro, in case
address@hidden could not be properly created (for example, if the disk was
+full).  If successfully created, the parent script can then proceed to
+append additional M4sh constructs into the child script.
+
+Note that the child script starts life without a log file open, so you
+must temporarily disable any attempts to use the log file until after
+emitting code to open a log within the child.  Currently, the suggested
+idiom for writing a M4sh shell script from within another script is:
+
address@hidden
+AS_INIT_GENERATED(address@hidden, [[# My child script.
+]]) || @{ AS_ECHO(["Failed to create child script"]); AS_EXIT; @}
 m4_pushdef([AS_MESSAGE_LOG_FD])dnl
-cat > "@var{file}" <<__EOF__
-#! $SHELL
-# Generated by $as_me.
-# ...
-
address@hidden@}
-__EOF__
-
-cat >>"@var{file}" <<\__EOF__
-AS_INIT_GENERATED
-# ...
-__EOF__
+cat >> "@var{file}" <<\__EOF__
+# Code to initialize AS_MESSAGE_LOG_FD
 m4_popdef([AS_MESSAGE_LOG_FD])dnl
+# Additional code
+__EOF__
 @end example
 
 This, however, may change in the future as the M4sh interface is
@@ -15478,7 +15474,7 @@ $ @kbd{bash trap.sh}
 The portable solution is then simple: when you want to @samp{exit 42},
 run @samp{(exit 42); exit 42}, the first @command{exit} being used to
 set the exit status to 42 for Zsh, and the second to trigger the trap
-and pass 42 as exit status for Bash.  In m4sh, this is covered by using
+and pass 42 as exit status for Bash.  In M4sh, this is covered by using
 @code{AS_EXIT}.
 
 The shell in address@hidden 4.0 has the following bug: @samp{$?} is
diff --git a/lib/autoconf/status.m4 b/lib/autoconf/status.m4
index 54758b1..9ee4b2a 100644
--- a/lib/autoconf/status.m4
+++ b/lib/autoconf/status.m4
@@ -1319,25 +1319,19 @@ fi
 m4_define([_AC_OUTPUT_CONFIG_STATUS],
 [AC_MSG_NOTICE([creating $CONFIG_STATUS])
 dnl AS_MESSAGE_LOG_FD is not available yet:
-m4_pushdef([AS_MESSAGE_LOG_FD])dnl
-cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate the current configuration.
+m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
+[AS_INIT_GENERATED([$CONFIG_STATUS],
+[# Run this file to recreate the current configuration.
 # Compiler output produced by configure, useful for debugging
 # configure, is in config.log if it exists.
 
 debug=false
 ac_cs_recheck=false
 ac_cs_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_ACEOF
+]) || ac_write_fail=1
 
 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-AS_INIT_GENERATED
-exec AS_MESSAGE_FD>&1
-
-# Save the log message, to keep $[0] and so on meaningful, and to
+[#] Save the log message, to keep $[0] and so on meaningful, and to
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
@@ -1576,7 +1570,6 @@ m4_ifdef([_AC_SEEN_CONFIG(ANY)], 
[_AC_OUTPUT_MAIN_LOOP])[]dnl
 
 AS_EXIT(0)
 _ACEOF
-chmod +x $CONFIG_STATUS
 ])# _AC_OUTPUT_CONFIG_STATUS
 
 # _AC_OUTPUT_MAIN_LOOP
diff --git a/lib/m4sugar/m4sh.m4 b/lib/m4sugar/m4sh.m4
index 9463c61..187920c 100644
--- a/lib/m4sugar/m4sh.m4
+++ b/lib/m4sugar/m4sh.m4
@@ -1828,16 +1828,34 @@ m4_define([AS_VAR_TEST_SET],
 ## -------------------- ##
 
 
-# AS_INIT_GENERATED
-# -----------------
-# Emit m4sh initialization code in a suitable form for a quoted
-# here document.  Does not emit the `#!' sequence, which should be
-# generated with `#! $SHELL'; see the manual or autoconf/status.m4
-# for more detail.
+# AS_INIT_GENERATED(FILE, [COMMENT])
+# ----------------------------------
+# Generate a child script FILE with all initialization necessary to
+# reuse the environment learned by the parent script, and make the
+# file executable.  If COMMENT is supplied, it is inserted after the
+# `#!' sequence but before initialization text begins.  After this
+# macro, additional text can be appended to FILE to form the body of
+# the child script.  The macro ends with non-zero status if the
+# file could not be fully written (such as if the disk is full).
 m4_defun([AS_INIT_GENERATED],
 [m4_require([AS_PREPARE])]dnl
-[_AS_SHELL_SANITIZE
-_AS_PREPARE])
+[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
+[as_write_fail=0
+cat >$1 <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+$2
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ASEOF
+cat >>$1 <<\_ASEOF || as_write_fail=1
+_AS_SHELL_SANITIZE
+_AS_PREPARE
+exec AS_MESSAGE_FD>&1
+m4_text_box([Main body of $1 script.])
+_ASEOF
+test $as_write_fail = 0 && chmod +x $1[]dnl
+_m4_popdef([AS_MESSAGE_LOG_FD])])# AS_INIT_GENERATED
+
 
 # AS_INIT
 # -------
diff --git a/lib/m4sugar/m4sugar.m4 b/lib/m4sugar/m4sugar.m4
index 6bd843e..85d36d0 100644
--- a/lib/m4sugar/m4sugar.m4
+++ b/lib/m4sugar/m4sugar.m4
@@ -534,10 +534,10 @@ m4_define([_m4_bpatsubsts],
 # definition.
 #
 # Some macros simply can't be renamed with this method: namely, anything
-# involved in the implementation of m4_stack_foreach and m4_curry.
+# involved in the implementation of m4_stack_foreach_sep.
 m4_define([m4_copy],
 [m4_ifdef([$2], [m4_fatal([$0: won't overwrite defined macro: $2])],
-         [m4_stack_foreach([$1], [m4_curry([m4_pushdef], [$2])])])]dnl
+         [m4_stack_foreach_sep([$1], [m4_pushdef([$2],], [)])])]dnl
 [m4_ifdef([m4_location($1)], [m4_define([m4_location($2)], m4_location)])])
 
 
@@ -1192,13 +1192,8 @@ m4_define([m4_map_args_pair],
 # the active definition of MACRO (it will not be the topmost, and may not
 # be the one passed to FUNC either).
 #
-# The recursive worker _m4_stack_reverse destructively swaps the order of a
-# stack.  We use a temporary stack, and swap directions twice.  Some macros
-# simply can't be examined with this method: namely, anything involved
-# in the implementation of _m4_stack_reverse.
-m4_define([_m4_stack_reverse],
-[m4_ifdef([$1], [m4_pushdef([$2], _m4_defn([$1]))$3[]_m4_popdef([$1])$0($@)])])
-
+# Some macros simply can't be examined with this method: namely,
+# anything involved in the implementation of _m4_stack_reverse.
 m4_define([m4_stack_foreach],
 [_m4_stack_reverse([$1], [m4_tmp-$1])]dnl
 [_m4_stack_reverse([m4_tmp-$1], [$1], [$2(_m4_defn([m4_tmp-$1]))])])
@@ -1207,6 +1202,40 @@ m4_define([m4_stack_foreach_lifo],
 [_m4_stack_reverse([$1], [m4_tmp-$1], [$2(_m4_defn([m4_tmp-$1]))])]dnl
 [_m4_stack_reverse([m4_tmp-$1], [$1])])
 
+# m4_stack_foreach_sep(MACRO, PRE, POST, SEP)
+# m4_stack_foreach_sep_lifo(MACRO, PRE, POST, SEP)
+# ------------------------------------------------
+# Similar to m4_stack_foreach and m4_stack_foreach_lifo, in that every
+# definition of a pushdef stack will be visited.  But rather than
+# passing the definition as a single argument to a macro, this variant
+# expands the concatenation of PRE[]definition[]POST, and expands SEP
+# between consecutive expansions.  Note that m4_stack_foreach([a], [b])
+# is equivalent to m4_stack_foreach_sep([a], [b(], [)]).
+m4_define([m4_stack_foreach_sep],
+[_m4_stack_reverse([$1], [m4_tmp-$1])]dnl
+[_m4_stack_reverse([m4_tmp-$1], [$1], [$2[]_m4_defn([m4_tmp-$1])$3], [$4])])
+
+m4_define([m4_stack_foreach_sep_lifo],
+[_m4_stack_reverse([$1], [m4_tmp-$1], [$2[]_m4_defn([m4_tmp-$1])$3], [$4])]dnl
+[_m4_stack_reverse([m4_tmp-$1], [$1])])
+
+
+# _m4_stack_reverse(OLD, NEW, ACTION, SEP)
+# ----------------------------------------
+# A recursive worker for pushdef stack manipulation.  Destructively
+# copy the OLD stack into the NEW, and expanding ACTION for each
+# iteration.  After the first iteration, SEP is promoted to the front
+# of ACTION.  The current definition is examined after the NEW has
+# been pushed but before OLD has been popped; this order is important,
+# as ACTION is permitted to operate on either _m4_defn([OLD]) or
+# _m4_defn([NEW]).  Since the operation is destructive, this macro is
+# generally used twice, with a temporary macro name holding the
+# swapped copy.
+m4_define([_m4_stack_reverse],
+[m4_ifdef([$1], [m4_pushdef([$2],
+  _m4_defn([$1]))$3[]_m4_popdef([$1])$0([$1], [$2], [$4$3])])])
+
+
 
 ## --------------------------- ##
 ## 9. More diversion support.  ##
@@ -2673,28 +2702,26 @@ m4_define([m4_set_contains],
 # determines which version of _1 helper we use.
 m4_define([m4_set_contents],
 [m4_ifdef([_m4_set_cleanup($1)], [_$0_1c], [_$0_1])([$1])_$0_2([$1],
-    [_m4_defn([_m4_set_($1)])], [[$2]])])
+  [], [], [[$2]])])
 
 # _m4_set_contents_1(SET)
 # _m4_set_contents_1c(SET)
-# _m4_set_contents_2(SET, SEP, PREP)
-# ----------------------------------
-# Expand to a list of quoted elements currently in the set, separated
-# by SEP, and moving PREP in front of SEP on recursion.  To avoid
-# nesting limit restrictions, the algorithm must be broken into two
-# parts; _1 destructively copies the stack in reverse into
-# _m4_set_($1), producing no output; then _2 destructively copies
-# _m4_set_($1) back into the stack in reverse.  SEP is expanded while
-# _m4_set_($1) contains the current element, so a SEP containing
-# _m4_defn([_m4_set_($1)]) can produce output in the order the set was
-# created.  Behavior is undefined if SEP tries to recursively list or
-# modify SET in any way other than calling m4_set_remove on the
-# current element.  Use _1 if all entries in the stack are guaranteed
-# to be in the set, and _1c to prune removed entries.  Uses _m4_defn
-# and _m4_popdef for speed.
+# _m4_set_contents_2(SET, PRE, POST, SEP)
+# ---------------------------------------
+# Expand to a list of quoted elements currently in the set, each
+# surrounded by PRE and POST, and moving SEP in front of PRE on
+# recursion.  To avoid nesting limit restrictions, the algorithm must
+# be broken into two parts; _1 destructively copies the stack in
+# reverse into _m4_set_($1), producing no output; then _2
+# destructively copies _m4_set_($1) back into the stack in reverse.
+# If no elements were deleted, then this visits the set in the order
+# that elements were inserted.  Behavior is undefined if PRE/POST/SEP
+# tries to recursively list or modify SET in any way other than
+# calling m4_set_remove on the current element.  Use _1 if all entries
+# in the stack are guaranteed to be in the set, and _1c to prune
+# removed entries.  Uses _m4_defn and _m4_popdef for speed.
 m4_define([_m4_set_contents_1],
-[m4_ifdef([_m4_set([$1])], [m4_pushdef([_m4_set_($1)],
-    _m4_defn([_m4_set([$1])]))_m4_popdef([_m4_set([$1])])$0([$1])])])
+[_m4_stack_reverse([_m4_set([$1])], [_m4_set_($1)])])
 
 m4_define([_m4_set_contents_1c],
 [m4_ifdef([_m4_set([$1])],
@@ -2705,8 +2732,8 @@ m4_define([_m4_set_contents_1c],
          [_m4_popdef([_m4_set_cleanup($1)])])])
 
 m4_define([_m4_set_contents_2],
-[m4_ifdef([_m4_set_($1)], [m4_pushdef([_m4_set([$1])],
-    _m4_defn([_m4_set_($1)]))$2[]_m4_popdef([_m4_set_($1)])$0([$1], [$3$2])])])
+[_m4_stack_reverse([_m4_set_($1)], [_m4_set([$1])],
+  [$2[]_m4_defn([_m4_set_($1)])$3], [$4])])
 
 # m4_set_delete(SET)
 # ------------------
@@ -2792,7 +2819,7 @@ m4_define([m4_set_empty],
 m4_define([m4_set_foreach],
 [m4_pushdef([$2])m4_ifdef([_m4_set_cleanup($1)],
     [_m4_set_contents_1c], [_m4_set_contents_1])([$1])_m4_set_contents_2([$1],
-       [m4_define([$2], _m4_defn([_m4_set_($1)]))$3[]])m4_popdef([$2])])
+       [m4_define([$2],], [)$3[]])m4_popdef([$2])])
 
 # m4_set_intersection(SET1, SET2)
 # -------------------------------
@@ -2822,13 +2849,11 @@ m4_define([m4_set_intersection],
 # is output if there are any elements.
 m4_define([m4_set_list],
 [m4_ifdef([_m4_set_cleanup($1)], [_m4_set_contents_1c],
-         [_m4_set_contents_1])([$1])_m4_set_contents_2([$1],
-              [_m4_defn([_m4_set_($1)])], [,])])
+         [_m4_set_contents_1])([$1])_m4_set_contents_2([$1], [], [], [,])])
 
 m4_define([m4_set_listc],
 [m4_ifdef([_m4_set_cleanup($1)], [_m4_set_contents_1c],
-         [_m4_set_contents_1])([$1])_m4_set_contents_2([$1],
-              [,_m4_defn([_m4_set_($1)])])])
+         [_m4_set_contents_1])([$1])_m4_set_contents_2([$1], [,])])
 
 # m4_set_map(SET, ACTION)
 # -----------------------
@@ -2841,7 +2866,7 @@ m4_define([m4_set_listc],
 m4_define([m4_set_map],
 [m4_ifdef([_m4_set_cleanup($1)],
     [_m4_set_contents_1c], [_m4_set_contents_1])([$1])_m4_set_contents_2([$1],
-       [$2(_m4_defn([_m4_set_($1)]))])])
+       [$2(], [)])])
 
 # m4_set_remove(SET, VALUE, [IF-PRESENT], [IF-ABSENT])
 # ----------------------------------------------------
diff --git a/tests/m4sugar.at b/tests/m4sugar.at
index 1dff270..550d085 100644
--- a/tests/m4sugar.at
+++ b/tests/m4sugar.at
@@ -41,9 +41,11 @@ AT_CHECK_M4SUGAR([-o-],, [$2], [$3])
 ## m4_stack_foreach.  ##
 ## ------------------ ##
 
-AT_SETUP([m4@&address@hidden)
+AT_SETUP([m4@&address@hidden)
 
-AT_KEYWORDS([m4@&address@hidden m4@&address@hidden m4@&address@hidden)
+AT_KEYWORDS([m4@&address@hidden m4@&address@hidden)
+AT_KEYWORDS([m4@&address@hidden m4@&address@hidden)
+AT_KEYWORDS([m4@&address@hidden m4@&address@hidden)
 
 # Test the semantics of macros to walk stacked macro definitions.
 AT_CHECK_M4SUGAR_TEXT([[dnl
@@ -57,9 +59,11 @@ m4_stack_foreach([abc], [m4_n])
 m4_copy([abc], [foo])dnl
 m4_stack_foreach([foo], [m4_n])
 m4_stack_foreach_lifo([foo], [m4_n])
+m4_stack_foreach_sep([abc], [ m4_index([abcdefghijkl],], [)])
+m4_stack_foreach_sep_lifo([abc], [<], [>], [:])
 m4_pushdef([xyz], [123])dnl
 m4_pushdef([xyz], [456])dnl
-m4_define([doit], [[$1](m4_shift(m4_stack_foreach([xyz], [,m4_echo])))
+m4_define([doit], [[$1](m4_stack_foreach_sep([xyz], [m4_dquote(], [)], [,]))
 ])dnl
 m4_stack_foreach([abc], [doit])]],
 [[def
@@ -83,9 +87,11 @@ jkl
 ghi
 def
 
-def(123,456)
-ghi(123,456)
-jkl(123,456)
+ 3 6 9
+<jkl>:<ghi>:<def>
+def([123],[456])
+ghi([123],[456])
+jkl([123],[456])
 ]])
 
 AT_CLEANUP


hooks/post-receive
--
GNU Autoconf source repository




reply via email to

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