>From b19b5e7d81022523073cacf8d0c65cd7434dc773 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 10 Jul 2020 13:42:26 -0700 Subject: [PATCH] Document AS_IF(..., ..., [[]]) glitch * doc/autoconf.texi (Common Shell Constructs): Note the if-false arg problem reported by Jannick in: https://lists.gnu.org/r/autoconf/2020-03/msg00045.html --- doc/autoconf.texi | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 594547c0..f4520bba 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -13750,6 +13750,13 @@ AS_IF([test "x$foo" = xyes], [HANDLE_FOO([yes])], @noindent ensures any required macros of @code{HANDLE_FOO} are expanded before the first test. + +The @var{run-if-false} argument should either consist entirely of +blanks, or expand to a nonempty shell command. For example, +@code{AS_IF([:], [:], [[]])} is invalid because its @var{run-if-false} +argument contains the nonblank characters @code{[]} which expand to +nothing. This restriction on @var{run-if-false} also applies to other +macros with ``if-false'' arguments denoting shell commands. @end defmac @defmac AS_MKDIR_P (@var{file-name}) -- 2.17.1