From: Akim Demaille Date: Sat, 28 Sep 2002 16:40:49 +0000 (+0000) Subject: * doc/autoconf.texi (autom4te.cache): New section. X-Git-Tag: AUTOCONF-2.54a~46 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b042fb40eccb02bdf451121b617dad15f1edede5;p=thirdparty%2Fautoconf.git * doc/autoconf.texi (autom4te.cache): New section. --- diff --git a/ChangeLog b/ChangeLog index 2264b6437..a4dcb79da 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2002-09-28 Akim Demaille + + * doc/autoconf.texi (autom4te.cache): New section. + 2002-09-28 Akim Demaille * lib/autom4te.in (Autoscan-preselections, Autoreconf-preselections) diff --git a/doc/autoconf.texi b/doc/autoconf.texi index a6c157491..d48423fb5 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -230,7 +230,7 @@ Existing Tests * Declarations:: Declarations that may be missing * Structures:: Structures or members that might be missing * Types:: Types that might be missing -* Compilers and Preprocessors:: Checks for compiling programs +* Compilers and Preprocessors:: Checking for compiling programs * System Services:: Operating system services * UNIX Variants:: Special kludges for specific UNIX variants @@ -289,7 +289,7 @@ Writing Tests * Multiple Cases:: Tests for several possible values * Language Choice:: Selecting which language to use for testing -Checking Run-Time Behavior +Checking Run Time Behavior * Test Programs:: Running test programs * Guidelines:: General rules for writing test programs @@ -313,11 +313,11 @@ Programming in M4 * M4 Quotation:: Protecting macros from unwanted expansion * Invoking autom4te:: The Autoconf executables backbone * Programming in M4sugar:: Convenient pure M4 macros -* Programming in M4sh:: Common shell constructs +* Programming in M4sh:: Common shell Constructs M4 Quotation -* Active Characters:: Characters that change the behavior of m4 +* Active Characters:: Characters that change the behavior of M4 * One Macro Call:: Quotation and one macro call * Quotation and Nested Macros:: Macros calling macros * Changequote is Evil:: Worse than INTERCAL: M4 + changequote @@ -433,6 +433,7 @@ Frequent Autoconf Questions, with answers * Bootstrapping:: Autoconf and GNU M4 require each other? * Why Not Imake:: Why GNU uses @command{configure} instead of Imake * Defining Directories:: Passing @code{datadir} to program +* autom4te.cache:: What is it? Can I remove it? History of Autoconf @@ -13892,6 +13893,7 @@ are addressed. * Bootstrapping:: Autoconf and GNU M4 require each other? * Why Not Imake:: Why GNU uses @command{configure} instead of Imake * Defining Directories:: Passing @code{datadir} to program +* autom4te.cache:: What is it? Can I remove it? @end menu @node Distributing @@ -14136,6 +14138,35 @@ Some macros are already available to address this issue: see @end itemize +@node autom4te.cache +@section What is @file{autom4te.cache}? + +@display +What is this directory @file{autom4te.cache}? Can I safely remove it? +@end display + +In the GNU Build System, @file{configure.ac} plays a central role and is +read by many tools: @command{autoconf} to create @file{configure}, +@command{autoheader} to create @file{config.h.in}, @command{automake} to +create @file{Makefile.in}, @command{autoscan} to check the completeness +of @file{configure.ac}, @command{autoreconf} to check the GNU Build +System components that are used. To ``read @file{configure.ac}'' +actually means to compile it with M4, which can be a very long process +for complex @file{configure.ac}. + +This is why all these tools, instead of running directly M4, invoke +@command{autom4te} (@pxref{Invoking autom4te}) which, while answering to +a specific demand, stores additional information in +@file{autom4te.cache} for future runs. For instance, if you run +@command{autoconf}, behind the scenes, @command{autom4te} will also +store information for the other tools, so that when you invoke +@command{autoheader} or @command{automake} etc., re-processing +@file{configure.ac} is not needed. The speed up is frequently of 30, +and is increasing with the size of @file{configure.ac}. + +But it is and remains being simply a cache: you can safely remove it. + + @c ===================================================== History of Autoconf. diff --git a/lib/m4sugar/m4sugar.m4 b/lib/m4sugar/m4sugar.m4 index c2d3f7a82..71451dca0 100644 --- a/lib/m4sugar/m4sugar.m4 +++ b/lib/m4sugar/m4sugar.m4 @@ -1202,12 +1202,7 @@ m4_define([_m4_divert(GROW)], 10000) # ------------------------- # The prologue for Autoconf macros. m4_define([_m4_defun_pro], -[m4_expansion_stack_push(m4_defn([m4_location($1)])[: $1 is expanded from...])dnl -m4_pushdef([_m4_expanding($1)])dnl -m4_ifdef([_m4_divert_dump], - [m4_divert_push(m4_defn([_m4_divert_diversion]))], - [m4_copy([_m4_divert_diversion], [_m4_divert_dump])dnl -m4_divert_push([GROW])])dnl +[ ]) @@ -1216,13 +1211,7 @@ m4_divert_push([GROW])])dnl # The Epilogue for Autoconf macros. MACRO-NAME only helps tracing # the PRO/EPI pairs. m4_define([_m4_defun_epi], -[m4_divert_pop()dnl -m4_if(_m4_divert_dump, _m4_divert_diversion, - [m4_undivert([GROW])dnl -m4_undefine([_m4_divert_dump])])dnl -m4_expansion_stack_pop()dnl -m4_popdef([_m4_expanding($1)])dnl -m4_provide([$1])dnl +[m4_provide([$1])dnl ]) @@ -1313,23 +1302,9 @@ m4_define([m4_before], # `extension' prevents `AC_LANG_COMPILER' from having actual arguments that # it passes to `AC_LANG_COMPILER(C)'. m4_define([m4_require], -[m4_expansion_stack_push(m4_location[: $1 is required by...])dnl -m4_ifdef([_m4_expanding($1)], - [m4_fatal([$0: circular dependency of $1])])dnl -m4_ifndef([_m4_divert_dump], - [m4_fatal([$0: cannot be used outside of an m4_defun'd macro])])dnl -m4_provide_if([$1], +[m4_provide_if([$1], [], - [m4_divert_push(m4_eval(m4_divnum - 1))dnl -m4_default([$2], [$1]) -m4_divert(m4_defn([_m4_divert_dump]))dnl -m4_undivert(m4_defn([_m4_divert_diversion]))dnl -m4_divert_pop(m4_defn([_m4_divert_dump]))])dnl -m4_provide_if([$1], - [], - [m4_warn([syntax], - [$1 is m4_require'd but is not m4_defun'd])])dnl -m4_expansion_stack_pop()dnl + [m4_default([$2], [$1])]) ])