From: Stepan Kasal Date: Tue, 21 Jun 2005 15:38:24 +0000 (+0000) Subject: fix m4split([]) X-Git-Tag: AUTOCONF-2.59c~327 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ed02e1aa514b525055f6e75f58e721e044d6b32;p=thirdparty%2Fautoconf.git fix m4split([]) --- diff --git a/lib/m4sugar/m4sugar.m4 b/lib/m4sugar/m4sugar.m4 index 63277de52..2ad95d8cc 100644 --- a/lib/m4sugar/m4sugar.m4 +++ b/lib/m4sugar/m4sugar.m4 @@ -1364,11 +1364,11 @@ m4_define([m4_toupper], # # REGEXP specifies where to split. Default is [\t ]+. # -# Pay attention to the m4_changequotes. Inner m4_changequotes exist for -# obvious reasons (we want to insert square brackets). Outer -# m4_changequotes are needed because otherwise the m4 parser, when it -# sees the closing bracket we add to the result, believes it is the -# end of the body of the macro we define. +# If STRING is empty, the result is an empty list. +# +# Pay attention to the m4_changequotes. When m4 reads the definition of +# m4_split, it still has quotes set to [ and ]. Luckily, these are matched +# in the macro body, so the definition is stored correctly. # # Also, notice that $1 is quoted twice, since we want the result to # be quoted. Then you should understand that the argument of @@ -1379,16 +1379,17 @@ m4_define([m4_toupper], # m4_split([active active ])end # => [active], [active], []end -m4_changequote(<<, >>) -m4_define(<>, -<>) -m4_changequote([, ]) +m4_changequote([, ])])