Commit Graph

542 Commits

Author SHA1 Message Date
Paolo Bonzini
ac0fd199f9 introduce AT_SKIP_IF and AT_FAIL_IF
* NEWS: Mention AT_SKIP_IF and AT_FAIL_IF.
* doc/autoconf.texi (Autotest): Document them.
* lib/autotest/general.m4 (_AT_LINE_ESCAPED, AT_SKIP_IF,
AT_FAIL_IF, _AT_CHECK_EXIT): New.
(AT_CHECK): Use _AT_LINE_ESCAPED.
* tests/autotest.st: Add tests for AT_SKIP_IF and AT_FAIL_IF.
Use AT_SKIP_IF.
* tests/local.st: Use AT_SKIP_IF.
2009-07-13 21:46:08 +02:00
Paolo Bonzini
877876da7c revert previous push 2009-07-13 13:39:25 +02:00
Paolo Bonzini
967cf4d282 introduce AT_SKIP_IF and AT_FAIL_IF
These are lightweight versions of AT_CHECK that automatically
add the equivalent of ! in front of the command and change a
failure exit status to 77 resp. 99.  They expand to just
two lines of shell code at the expense of not supporting
tracing (but then so does AT_XFAIL_IF).

2009-07-12  Paolo Bonzini  <bonzini@gnu.org>

	* NEWS: Mention AT_SKIP_IF and AT_FAIL_IF.
	* doc/autoconf.texi (Autotest): Document them.
	* lib/autotest/general.m4 (_AT_LINE_ESCAPED, AT_SKIP_IF,
	AT_FAIL_IF, _AT_CHECK_EXIT): New.
	(AT_CHECK): Use _AT_LINE_ESCAPED.
	* tests/autotest.st: Add tests for AT_SKIP_IF and AT_FAIL_IF.
	Use AT_SKIP_IF.
	* tests/local.st: Use AT_SKIP_IF.
2009-07-12 16:31:14 +02:00
Eric Blake
ba32f02aed Add m4_copy_force, m4_rename_force.
* lib/m4sugar/m4sugar.m4 (m4_copy_force, m4_rename_force): New
macros.
* tests/m4sugar.at (m4@&t@_defn): Test them.
* doc/autoconf.texi (Redefined M4 Macros) <m4_copy>: Document
them.
* NEWS: Likewise.
Suggested by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-06-15 06:59:03 -06:00
Romain Lenglet
9e380c5ada New AC_ERLANG_SUBST_ERTS_VER macro.
* lib/autoconf/erlang.m4: Add macro AC_ERLANG_SUBST_ERTS_VER.
* doc/autoconf.texi (Erlang Libraries): Document
AC_ERLANG_SUBST_ERTS_VER.
* NEWS: Likewise.
* AUTHORS: Update Romain Lenglet's email address.
* THANKS: Update.
Suggested by Ruslan Babayev.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-05-28 06:19:57 -06:00
Eric Blake
6382b687fd Update uses of all-permissive license.
* ChangeLog: Relicense under GPL.
* ChangeLog.0: Likewise.
* ChangeLog.1: Likewise.
* ChangeLog.2: Likewise.
* THANKS: Likewise.
* m4/m4.m4: Use latest wording of FSF all-permissive license.
* m4/make-case.m4: Likewise.
* doc/install.texi: Likewise.
* tests/statesave.m4: Relicense to match rest of testsuite; this
file does not need all-permissive license since it is not designed
for reuse by other packages.
* BUGS: Relicense under all-permissive license.
* HACKING: Likewise.
* NEWS: Likewise.
* README: Likewise.
* README-alpha: Likewise.
* README-hacking: Likewise.
* TODO: Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-05-20 06:02:49 -06:00
Eric Blake
e86cec418e Don't mention undocumented interface in NEWS.
* NEWS: Correct earlier entry about AS_FOR.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-05-20 06:02:41 -06:00
Eric Blake
3bec0c1d32 Fix quoting of m4 macros in AT_CHECK.
* lib/autotest/general.m4 (AT_CHECK): Expand prior to adding
escapes, to avoid shell syntax errors caused by late macro
expansion.
* NEWS: Document this change.
* tests/autotest.at (Metacharacters in command from M4 expansion):
New test.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-24 13:15:31 -06:00
Eric Blake
bcb6b3180d Rename AT_CHECK_NOESCAPE to AT_CHECK_UNQUOTED.
* lib/autotest/general.m4 (AT_CHECK_NOESCAPE): Deprecate, in favor
of new spelling...
(AT_CHECK_UNQUOTED): ...for consistency with AC_DEFINE_UNQUOTED.
* doc/autoconf.texi (Writing Testsuites) <AT_CHECK>: Document the
rename.
* NEWS: Likewise.
* tests/autotest.at (Binary output, Cleanup): Adjust tests.
* tests/torture.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS):
Likewise.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-24 13:15:22 -06:00
Eric Blake
46e87ded26 Add m4_argn.
* lib/m4sugar/m4sugar.m4 (m4_argn): New macro.
* NEWS: Document it.
* doc/autoconf.texi (Looping constructs) <m4_argn>: Likewise.
<m4_car, m4_cdr>: Improve documentation.
* tests/m4sugar.at (m4 lists): New test.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-22 20:51:28 -06:00
Eric Blake
c241057ad4 Add stdout-nolog and ignore-nolog to AT_CHECK.
* lib/autotest/general.m4 (AT_DIFF_STDERR(stderr-nolog))
(AT_DIFF_STDERR(ignore-nolog), AT_DIFF_STDOUT(stdout-nolog))
(AT_DIFF_STDOUT(ignore-nolog)): New macros.
* tests/autotest.at (Logging): New test.
* doc/autoconf.texi (Writing Testsuites) <AT_CHECK>: Document the
new logging actions.
* NEWS: Likewise.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-15 06:00:56 -06:00
Eric Blake
e8f34dca8c Teach AT_CHECK about hard failures.
* lib/autotest/general.m4 (AT_INIT) <at_fn_check_skip>
<at_fn_check_status, at_fn_group_postprocess>: Handle hard
failures.
* doc/autoconf.texi (Writing Testsuites) <AT_CHECK>: Document
AT_CHECK_NOESCAPE and exit status 99.
* NEWS: Likewise.
* tests/autotest.at (Hard fail, Cleanup): New tests.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-15 06:00:24 -06:00
Eric Blake
52b83b8c37 Make AS_IF, AS_CASE, and AS_FOR more robust to blank arguments.
* lib/m4sugar/m4sh.m4 (_AS_CASE, _AS_CASE_DEFAULT, AS_FOR, _AS_IF)
(_AS_IF_ELSE, AS_IF): Avoid syntax error on blank argument,
including a macro with an empty expansion.
* NEWS: Mention this.
* tests/m4sh.at (AS@&t@_IF and AS@&t@_CASE, AS@&t@_FOR): Update
tests.
Reported by Mike Frysinger.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-13 13:15:34 -06:00
Eric Blake
723c9e5c0f Add m4_blank and friends.
* lib/m4sugar/m4sugar.m4 (m4_blank, m4_nblank, m4_default_nblank)
(m4_default_nblank_quoted): New macros.
* NEWS: Document them.
* doc/autoconf.texi (Conditional constructs): Likewise.
* tests/m4sugar.at (m4sugar shorthand conditionals): New test.
Suggested by Mike Frysinger.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-13 13:15:32 -06:00
Eric Blake
c283f62edb Handle shell comments in AT_CHECK.
* lib/autotest/general.m4 (_AT_DECIDE_TRACEABLE): Handle # in
test correctly.  Latent bug in handling shell comment was first
fixed 2008-11-20, but regressed two patches later.
* tests/autotest.at (Shell comment in command): New test.
* NEWS: Document the fix.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-06 20:52:44 -06:00
Eric Blake
ddbb239f12 Beta Release Version 2.63b.
* NEWS: Mention the release.
* README: Clarify that this is a beta release.
* build-aux/texinfo.tex: Synchronize from upstream.
* .x-sc_trailing_blank: Exempt more upstream files.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-03-31 06:02:38 -06:00
Eric Blake
4da1abd28b Use m4_translit more efficiently in AS_ESCAPE.
* lib/m4sugar/m4sh.m4 (_AS_ESCAPE): Alter API to take first byte
of set separately from rest.
(AS_ESCAPE, _AS_QUOTE_MODERN, AS_TR_SH, AS_VAR_GET): Adjust
callers.
* lib/autoconf/autoheader.m4 (AH_VERBATIM): Avoid duplicate
characters in translit request.
* doc/autoconf.texi (Common Shell Constructs) <AS_ESCAPE>:
Document the macro.
* NEWS: Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-02-19 14:32:36 -07:00
Eric Blake
96bb9a362a Mention recently documented macros.
* NEWS: Update list of new documentation.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-02-19 09:53:35 -07:00
Eric Blake
e8e30e268d Mention new AC_DEFUN_ONCE clients.
* NEWS: Mention recent semantic changes.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-02-05 06:12:24 -07:00
Eric Blake
d7cc80491d Use URLs in --help output, part 2: configure.
* lib/autoconf/general.m4 (_AC_INIT_COPYRIGHT): Bump copyright
date.
(_AC_INIT_PACKAGE): Support optional URL parameter, mapped to
AC_PACKAGE_URL.
(_AC_INIT_DEFAULTS, _AC_INIT_PREPARE): Substitute it.
(_AC_INIT_HELP): Use it in './configure --help' output.
* lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Likewise, for
'./config.status --help'.  Bump copyright date.
* doc/autoconf.texi (Initializing configure) <AC_INIT>: Document
new parameter.
* NEWS: Likewise.
* tests/tools.at (autoheader): Adjust test.
* tests/torture.at (@%:@define header templates)
(Torturing config.status): Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-01-27 16:57:52 -07:00
Eric Blake
9f32bcf860 Improve AC_DEFUN_ONCE semantics.
* lib/m4sugar/m4sugar.m4 (m4_defun_once): Rewrite to be no-op,
rather than warning, on second use, and make sure first use never
occurs out of order.
* tests/m4sugar.at (m4@&t@_require: one-shot initialization):
Enhance test.
* tests/base.at (AC_REQUIRE & AC_DEFUN_ONCE: [Require, expand],
(AC_REQUIRE & AC_DEFUN_ONCE: [Expand, require]): Adjust tests.
* NEWS: Document this.
* doc/autoconf.texi (Macro Definitions) <AC_DEFUN>: Mention
AC_DEFUN_ONCE.
(Prerequisite Macros) <AC_REQUIRE>: Likewise.
(Expanded Before Required): Likewise.
(One-Shot Macros) <AC_DEFUN_ONCE>: Document new semantics.
Reported by Bruno Haible, with suggestion by Paolo Bonzini.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-01-26 09:55:57 -07:00
Eric Blake
46009205a9 Fix out-of-order expansion with expand-before-require.
* lib/m4sugar/m4sugar.m4 (m4_require): Redundantly expand a
required macro when issuing expand-before-require warning.
* doc/autoconf.texi (Prerequisite Macros): Adjust documentation.
(Expanded Before Required): New node.
* tests/m4sugar.at (m4@&t@_require: nested): Adjust test.
* NEWS: Mention this fix.
Suggested by Bruno Haible.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-01-21 08:57:42 -07:00
Eric Blake
7f4d002958 Document some recently added macros.
* lib/m4sugar/m4sugar.m4 (m4_map_args_w): Add optional sep
parameter.
* doc/autoconf.texi (Looping constructs) <m4_map_args_sep>
<m4_map_args_w, m4_stack_foreach, m4_stack_foreach_sep>: Document
new macros.
(Set manipulation Macros) <m4_set_map_sep>: Likewise.
* tests/m4sugar.at (m4@&t@_stack, M4 loops): Enhance tests.
* NEWS: Document new macros.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-12-19 14:06:46 -07:00
Eric Blake
59f80f3aea Mention limitation of M4 1.4.x on builtin tokens.
* doc/autoconf.texi (Redefined M4 Macros) <m4_dumpdef>: Document
ramification of M4 1.4.x's inability to pass builtin tokens
through text macros.
(Evaluation Macros) <m4_curry>: Likewise.
* tests/m4sugar.at (m4@&t@_defn): Enhance test.
* NEWS: Mention subtle change in m4_dumpdef semantics.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-12-18 15:55:58 -07:00
Eric Blake
96ab16be4a Document m4_version_prereq.
* doc/autoconf.texi (Number processing Macros)
<m4_version_prereq>: Add documentation.
* NEWS: Mention it.
Reported by Bruno Haible.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-12-18 06:44:59 -07:00
William Pursell
276044d355 Fix AC_HEADER_ASSERT w.r.t. --enable-assert.
* lib/autoconf/headers.m4 (AC_HEADER_ASSERT): Honor --enable-assert,
rather than treating it as a synonym for --disable-assert.
* NEWS: Document the fix.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-12-08 16:30:50 -07:00
Eric Blake
580ada8c2e Add m4_cleardivert.
* lib/m4sugar/m4sugar.m4 (m4_cleardivert): New macro.
* lib/autotest/general.m4 (AT_INIT): Use it.
* lib/autoconf/general.m4 (_AC_INIT_NOTICE): Likewise.
* tests/m4sugar.at (m4@&t@_divert_stack): Test it.
* doc/autoconf.texi (Diversion support) <m4_cleardivert>: Document
it.
* NEWS: Likewise.
Suggested by Paolo Bonzini.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-11-25 09:28:43 -07:00
Eric Blake
a8a9b2148d Fix typos in recent testsuite improvements.
* lib/autotest/general.m4 (AT_INIT) <at_fn_check_prepare_dynamic>:
Fix typo.
* NEWS: Clarify the potential impact to users.
* tests/autotest.at (AT_DATA_AUTOTEST): New macro, patterned after
AT_DATA_M4SUGAR.
(AT_CHECK_AT_PREP, AT_CHECK_AT_TITLE): Use it.
(unusual file names): Test that the recent echo fix does not
regress.  Fix quoting bug that made the test a no-op.
Reported by Paolo Bonzini and Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-11-21 13:36:27 -07:00
Eric Blake
79042ea346 Fix XFAIL related to AT_CHECK.
* lib/autotest/general.m4 (AT_CHECK, AT_CHECK_UNQUOTED): Expand
first argument once.
(_AT_CHECK): Don't re-expand commands.
* tests/autotest.at (Multiline command from M4 expansion): Remove
XFAIL.
* tests/tools.at (autoupdating AU_ALIAS): Quote unbalanced paren.
* NEWS: Document the fallout.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-11-20 18:27:35 -07:00
Eric Blake
fa506f9116 Add m4_chomp, m4_esyscmd_s.
* lib/m4sugar/m4sugar.m4 (m4_esyscmd_e, m4_chomp, m4_chomp_all):
New macros.
* doc/autoconf.texi (Redefined M4 Macros) <m4_esyscmd_s>: Document
them.
(Text processing Macros) <m4_chomp>: Likewise.
* NEWS: Likewise.
* tests/m4sugar.at (m4@&t@_esyscmd_s): New test.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-11-20 15:42:39 -07:00
Eric Blake
e84b404ff0 Alter default value of AS_EXIT.
* lib/m4sugar/m4sh.m4 (_AS_EXIT_PREPARE): Let as_func_exit
parameter be optional.
(AS_EXIT): Use it to make better default.
(_AS_DETECT_BETTER_SHELL): Use new default.
* bin/autoconf.as (exit_missing_arg, getopt): Likewise.
* lib/autoconf/status.m4 (AC_OUTPUT): Likewise.
* tests/m4sh.at (AS@&t@_EXIT): Update test.
* doc/autoconf.texi (Common Shell Constructs) <AS_EXIT>: Mention
new default behavior.
(Limitations of Builtins) <trap>: Adjust to use new default.
* NEWS: Mention the semantic change.
Suggested by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-11-18 21:00:34 -07:00
Eric Blake
740062eb42 Add AS_SET_STATUS, make AS_EXIT more efficient.
* lib/m4sugar/m4sh.m4 (_AS_EXIT_PREPARE, AS_SET_STATUS): New
macros.
(AS_EXIT): Rewrite to avoid forks.
(_AS_SHELL_SANITIZE): Avoid AS_EXIT prior to shell functions.
(AS_PREPARE, _AS_PREPARE): Add new preparation.
* doc/autoconf.texi (Common Shell Constructs) <AS_SET_STATUS>:
Document.
* NEWS: Mention new macro.
* tests/m4sh.at (AS@&t@_EXIT): New test.
(BASENAME_TEST): Sort.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-11-18 09:57:19 -07:00
Eric Blake
463b59e84f Yet more FDL 1.3 fallout.
* NEWS: Mention manual license change.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-11-10 16:06:59 -07:00
Clinton Roy
44fbeef86d Pass autoreconf -I to aclocal -I
* bin/autoreconf.in (parse_args): Pass --include to aclocal.
* doc/autoconf.texi (autoreconf Invocation): Updates for above.
* NEWS: Document it.
* THANKS: Update.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-11-10 10:34:59 -07:00
Paolo Bonzini
c22cc67be7 Change `present but cannot be compiled' behavior to use compiler result.
* NEWS: Document it.
* doc/autoconf.texi (Present But Cannot Be Compiled): Document it.
* lib/autoconf/headers.m4 (_AC_CHECK_HEADER_MONGREL): Implement it
and adjust warning.
* tests/semantics.at (AC_CHECK_HEADERS): Test new semantics.
2008-11-06 10:55:31 +01:00
Eric Blake
9f4363abb6 Simplify diversion stack handling.
* lib/m4sugar/m4sugar.m4 (m4_divert_stack): Use fewer macros, and
avoid extra newlines.
(m4_divert_stack_push): Compute location here, rather than caller.
(m4_divert_push): Update caller.
(m4_divert): Likewise, and also adjust current diversion name.
(m4_divert_pop): Simplify rule that diversion stack must never go
empty.
(_m4_require_call): Bypass diversion stack when collecting
required macro text.
(m4_init): Set current diversion without requiring m4_init.
* lib/m4sugar/m4sh.m4 (AS_INIT): Avoid too many pops.
* lib/autotest/general.m4 (AT_INIT): Likewise.
* lib/autoconf/general.m4 (_AC_INIT_DEFAULTS): Schedule wrapped
text to run prior to m4sugar cleanup.
* doc/autoconf.texi (Text processing Macros) <m4_newline>: Mention
optional argument.
(Conditional constructs) <m4_ifvaln, m4_n>: Mention use of dnl.
* NEWS: Undo blurb about m4_divert.
* tests/m4sugar.at (m4@&t@_divert_stack): New test.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-10-31 10:25:24 -06:00
Paolo Bonzini
250422b094 Rewrite handling of diversion and expansion stack.
* NEWS: Document stricter requirement on m4_init.
* lib/m4sugar/m4sugar.m4 (m4_divert_stack): New, replacing
_m4_divert_n_stack.
(_m4_divert_stack_push): New.
(m4_divert): Use _m4_divert_stack_push and replace m4_define with
m4_popdef.
(m4_divert_push): Use _m4_divert_stack_push.
(m4_divert_pop): Use m4_divert_stack instead of _m4_divert_n_stack,
pop _m4_divert_stack instead of m4_divert_stack.
(m4_expansion_stack): New.  Update comment above it.
(m4_expansion_stack_push, m4_expansion_stack_pop): Work on
_m4_expansion_stack instead of m4_expansion_stack.
(m4_expansion_stack_dump): Check presence of _m4_expansion_stack
instead of m4_expansion_stack.  Use m4_expansion_stack's expansion
instead of the definition, and compensate for the trailing newline
in the expansion.
(m4_warn, _m4_defun_pro, _m4_defun_epi): Check presence of
_m4_expansion_stack instead of m4_expansion_stack.
(m4_newline): Expand first argument after the newline.
(m4_init): Use m4_divert_stack instead of _m4_divert_n_stack,
* tests/m4sugar.at (m4_append, m4_text_wrap): Invoke m4_init.
* tests/tools.at (whitespace in file names, the empty token): Likewise.
2008-10-29 08:00:08 +01:00
Eric Blake
0b08f40fc7 Override m4 1.4.x dumpdef, as it breaks autom4te.
* lib/m4sugar/m4sugar.m4 (m4_dumpdef): New implementation.
* doc/autoconf.texi (Redefined M4 Macros) <m4_dumpdef>: Mention
semantic differences as well as m4_dumpdefs.
* NEWS: Likewise.
* tests/m4sugar.at (m4@&t@_dumpdef): New test.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-10-28 14:02:34 -06:00
Eric Blake
bc9d68de41 Add AS_VAR_ARITH.
* lib/m4sugar/m4sh.m4 (_AS_VAR_ARITH_PREPARE, _AS_VAR_ARITH_WORKS)
(AS_VAR_ARITH): New macros.
(_AS_PREPARE, AS_PREPARE): Emit preparation.
* tests/m4sh.at (AS@&t@_VAR_ARITH): New test.
* doc/autoconf.texi (Polymorphic Variables) <AS_VAR_ARITH>:
Document new macro.
(Limitations of Usual Tools) <expr>: Mention portability problem
if first argument starts with -.
(Shell Substitutions) <$((expression))>: Mention it.
* NEWS: Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-10-27 16:11:56 -06:00
Eric Blake
5d9dae38a3 Document AS_EXIT.
* doc/autoconf.texi (Common Shell Constructs) <AS_EXIT>: Document
this macro.
(Limitations of Builtins): Mention AS_EXIT.
* NEWS: Mention it.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-10-25 06:30:06 -06:00
Eric Blake
2922868b72 Improve m4_copy.
* lib/m4sugar/m4sugar.m4 (m4_copy): Add second implementation for
public use.
(_m4_copy): New macro, which preserves pushdef stacks.
(_m4_defun_pro_outer): Bypass it, for speed.
(m4_init): Bypass new implementation, since it breaks on m4_defn.
* bin/autoupdate.in (handle_autoconf_macros): Likewise.
* lib/autoconf/general.m4 (AC_PREREQ): Undefine before redefining,
now that m4_copy checks this.
* doc/autoconf.texi (Redefined M4 Macros) <m4_copy>: Document
this, as well as m4_rename.
* lib/autoconf/autoconf.m4 (m4_copy): Temporarily redefine when
renaming builtins.
* NEWS: Likewise.
* tests/m4sugar.at (m4@&t@_defn): Enhance test.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-10-24 06:41:49 -06:00
Eric Blake
e84e41e106 Allow AS_CASE in shell lists.
* lib/m4sugar/m4sh.m4 (AS_CASE): Always execute test, in case of
side effects.  Allow continuation of script on same line as esac.
* lib/autoconf/c.m4 (AC_PROG_CC_STDC): Adjust client.
* tests/m4sh.at (AS@&t@_IF and AS@&t@_CASE): Enhance test.
* NEWS: Document the subtle change.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-10-21 21:04:02 -06:00
Eric Blake
86ce15b622 Add AS_VAR_APPEND.
* lib/m4sugar/m4sh.m4 (_AS_VAR_APPEND_PREPARE)
(_AS_VAR_APPEND_WORKS, AS_VAR_APPEND): New macros.
(AS_PREPARE, _AS_PREPARE): Emit preparation.
* tests/m4sh.at (AS@&t@_VAR_APPEND): New test.
* doc/autoconf.texi (Polymorphic Variables) <AS_VAR_APPEND>:
Document new macro.
<AS_VAR_SET>: Mention ramification of `""` rules.
* NEWS: Mention new macro.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-10-21 15:03:17 -06:00
Eric Blake
c6b172ee19 Add m4_curry.
* lib/m4sugar/m4sugar.m4 (m4_curry, _m4_curry): New macros.
* tests/m4sugar.at (m4@&t@_map_args): Rename...
(m4@&t@_map_args and m4@&t@_curry): ...and add currying tests.
* doc/autoconf.texi (Looping constructs) <m4_map_args>: Document
currying as a way to add parameters.
(Evaluation Macros) <m4_curry>: Document the new macro.
* NEWS: Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-10-17 16:32:27 -06:00
Eric Blake
92f34215fc Add m4_set_map.
* lib/m4sugar/m4sugar.m4 (m4_set_foreach): New macro.
* tests/m4sugar.at (m4@&t@_set): Enhance test.
* doc/autoconf.texi (Set manipulation Macros) <m4_set_map>:
Document it.
* NEWS: Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-10-17 16:02:48 -06:00
Eric Blake
f4ace96990 Document m4_map_args.
* lib/m4sugar/m4sugar.m4 (m4_transform, m4_transform_pair):
Rename...
(m4_map_args, m4_map_args_pair): ...to these names, and document.
(m4_version_unletter): Use the interface.
* lib/m4sugar/foreach.m4 (m4_map_args, m4_map_args_pair)
(_m4_map_args_, _m4_map_args_pair_, _m4_map_args_pair_end):
Perform same renames.
* lib/m4sugar/m4sh.m4 (AS_CASE, AS_IF): Adjust callers.
* tests/m4sugar.at (m4@&t@_map_args): New test.
(recursion): Adjust caller.
* tests/m4sh.at (AS@&t@_IF and AS@&t@_CASE): Likewise.
* doc/autoconf.texi (Looping constructs) <m4_map_args>: Document
this interface.
* NEWS: Mention the new macros.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-10-17 16:00:57 -06:00
Eric Blake
c8cfd385c2 Document AS_VAR interfaces.
* doc/autoconf.texi (Programming in M4sh): M4sh is now prime-time.
(Polymorphic Variables): New node.
* NEWS: Update accordingly.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-10-17 15:48:46 -06:00
Paolo Bonzini
2079086ce2 Updates to shell portability documentation
* doc/autoconf.texi: Updates all references to "Portable Shell" and
"Limitations of Builtins" to use three-argument commands.
(Programming in M4sh): Document AS_ECHO, AS_ECHO_N, AS_UNSET.
(Portable Shell): Move here discussion about "Where is the POSIX
shell?"  Mention that M4sh provides a SVR2 shell and takes care
of unsetting variables if necessary.  Talk about M4sh and not only
Autoconf-generated scripts.
(Special Shell Variables): Talk about M4sh and not only
Autoconf-generated scripts.  Don't talk about things that Autoconf
does not do.  Mention problems of $LINENO with shell functions.
(Limitations of Builtins).  Mention AS_ECHO and AS_ECHO_N.  Move
discussion of eval bugs before discussion on proper use of eval.
Mention AS_IF.  Reword why not to use "shift N".  Mention "foo=;
unset foo" trick.  Include M4sh code that unsets MAIL for Bash 2.01.
* NEWS: Update list of documented M4sh macros.
2008-10-15 16:05:42 +02:00
Paolo Bonzini
06bceefef2 Add and document AS_ME_PREPARE and AS_LINENO_PREPARE
2008-10-10  Paolo Bonzini  <bonzini@gnu.org>

	* lib/m4sugar/m4sh.m4 (AS_ME_PREPARE, AS_LINENO_PREPARE): New.
	* doc/autoconf.texi (Initialization macros): Document them.
	(Portable Shell): Refer to AS_LINENO_PREPARE.

	* bin/autoconf.as: Invoke AS_ME_PREPARE.
	* lib/autotest/general.m4: Likewise.
2008-10-11 13:30:38 +02:00
Paolo Bonzini
edd65fb24d don't advertise shell function adversely
2008-10-08  Paolo Bonzini  <bonzini@gnu.org>

	* doc/autoconf.texi: Be less wary of shell functions.
2008-10-10 15:33:28 +02:00