From: Karl Berry Date: Thu, 7 Jan 2021 01:57:08 +0000 (-0800) Subject: doc: discuss AC_* ordering a little. X-Git-Tag: v1.16.4~30 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f80a940a03e1b1537335ba9f7f9dee24af21302e;p=thirdparty%2Fautomake.git doc: discuss AC_* ordering a little. * doc/automake.texi (Optional): mention that AC_CONFIG_AUX_DIR must be called before AM_INIT_AUTOMAKE, and recommend that other AC_CONFIG_* macros be called after. This seems to be the most common practice. Autoconf does not currently impose ordering: https://savannah.gnu.org/support/?110416 --- diff --git a/doc/automake.texi b/doc/automake.texi index 040172e66..68b015151 100644 --- a/doc/automake.texi +++ b/doc/automake.texi @@ -3045,6 +3045,12 @@ Automake will look for various helper scripts, such as Not all scripts are always searched for; some scripts will only be sought if the generated @file{Makefile.in} requires them. +If @code{AC_CONFIG_AUX_DIR} is used, it must be given before the call +to @code{AM_INIT_AUTOMAKE}; Automake will warn about this if it is not +so. All other @code{AC_CONFIG_...} macros are conventionally called +after @code{AM_INIT_AUTOMAKE}, though they may or may not work in +other locations, with or without warnings. + If @code{AC_CONFIG_AUX_DIR} is not given, the scripts are looked for in their standard locations. For @file{mdate-sh}, @file{texinfo.tex}, and @file{ylwrap}, the standard location is the @@ -3065,20 +3071,22 @@ macro. @item AC_CONFIG_HEADERS Automake will generate rules to rebuild these headers from the corresponding templates (usually, the template for a @file{foo.h} -header being @file{foo.h.in}). Older versions of Automake -required the use of @code{AM_CONFIG_HEADER}; this is no longer -the case, and that macro has indeed been removed. +header being @file{foo.h.in}). As with @code{AC_CONFIG_FILES} (@pxref{Requirements}), parts of the specification using shell variables will be ignored as far as cleaning, distributing, and rebuilding is concerned. +Older versions of Automake required the use of +@code{AM_CONFIG_HEADER}; this is no longer the case, and that macro +has indeed been removed. + @item AC_CONFIG_LINKS Automake will generate rules to remove @file{configure} generated links on @samp{make distclean} and to distribute named source files as part of @samp{make dist}. -As for @code{AC_CONFIG_FILES} (@pxref{Requirements}), parts of the +As with @code{AC_CONFIG_FILES} (@pxref{Requirements}), parts of the specification using shell variables will be ignored as far as cleaning and distributing is concerned. (There are no rebuild rules for links.) @@ -4665,7 +4673,6 @@ an otherwise equivalent set of variables without @samp{nobase_} prefix. @acindex AC_CONFIG_SUBDIRS @acindex AC_CONFIG_AUX_DIR - In the GNU Build System, packages can be nested to arbitrary depth. This means that a package can embed other packages with their own @file{configure}, @file{Makefile}s, etc.