]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* doc/autoconf.texi (Prerequisite Macros): State more precisely
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Tue, 21 Feb 2006 09:28:34 +0000 (09:28 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Tue, 21 Feb 2006 09:28:34 +0000 (09:28 +0000)
where a required macro will be expanded.
(Coding Style): Another reason not to use `m4_define'.

ChangeLog
doc/autoconf.texi

index 07098394b07abc3d2fc6c6cfe0f572e729f38178..f440eb3addcd0bfb2ccd297a2b372dfd5e7fd84b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-02-21  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       * doc/autoconf.texi (Prerequisite Macros): State more precisely
+       where a required macro will be expanded.
+       (Coding Style): Another reason not to use `m4_define'.
+
 2006-02-21  Eric Blake  <ebb9@byu.net>
 
        * lib/autoconf/general.m4 (_AC_LIBOBJ): Minor optimization.
index f6aa00f1d84a71443a60719f4e5b46a05be355bc..db2c6da36cba0ace9f69d5dda493157c1b7a4532 100644 (file)
@@ -9417,8 +9417,10 @@ must not be called from the top level.
 @code{AC_REQUIRE} is often misunderstood.  It really implements
 dependencies between macros in the sense that if one macro depends upon
 another, the latter will be expanded @emph{before} the body of the
-former.  In particular, @samp{AC_REQUIRE(FOO)} is not replaced with the
-body of @code{FOO}.  For instance, this definition of macros:
+former.  To be more precise, the required macro will be expanded before
+the outermost @code{AC_DEFUN}'d macro in the current expansion stack.
+In particular, @samp{AC_REQUIRE([FOO])} is not replaced with the body of
+@code{FOO}.  For instance, this definition of macros:
 
 @example
 @group
@@ -9724,10 +9726,12 @@ replacement might contain a file name, since they have special meaning
 to the shell and are less likely to occur in file names.
 
 @xref{Macro Definitions}, for details on how to define a macro.  If a
-macro doesn't use @code{AC_REQUIRE} and it is expected to never be the
-object of an @code{AC_REQUIRE} directive, then use @code{m4_define}.  In
-case of doubt, use @code{AC_DEFUN}.  All the @code{AC_REQUIRE}
-statements should be at the beginning of the macro, @code{dnl}'ed.
+macro doesn't use @code{AC_REQUIRE}, is expected to never be the object
+of an @code{AC_REQUIRE} directive, and macros required by other macros
+inside arguments will not need to be expanded before this macro, then
+use @code{m4_define}.  In case of doubt, use @code{AC_DEFUN}.
+All the @code{AC_REQUIRE} statements should be at the beginning of the
+macro, @code{dnl}'ed.
 
 You should not rely on the number of arguments: instead of checking
 whether an argument is missing, test that it is not empty.  It provides