]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Disable caching by default, so as not to cause problems when
authorAkim Demaille <akim@epita.fr>
Wed, 5 Apr 2000 07:42:06 +0000 (07:42 +0000)
committerAkim Demaille <akim@epita.fr>
Wed, 5 Apr 2000 07:42:06 +0000 (07:42 +0000)
newbies accidentally use a stale cache file.

* acgeneral.m4 (_AC_INIT_PARSE_ARGS): Set cache_file to /dev/null
to disable caching by default.
(_AC_INIT_HELP): Adjust the --help message.
(AC_CACHE_LOAD, AC_CACHE_SAVE): Don't print "loading/updating
/dev/null" messages.
* autoconf.texi: Note that caching is disabled, how to enable it,
and that `./config.cache' is the traditional name of the cache file.
* install.texi: Likewise.

ChangeLog
acgeneral.m4
configure
doc/autoconf.texi
doc/install.texi
lib/autoconf/general.m4

index bf5b474c338a773d8c8ce3ce259d7a7b626154dc..e6ba6a747f304000d765e7fa85a2cf5c6debebe9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2000-04-05  Steven G. Johnson  <stevenj@alum.mit.edu>
+
+       Disable caching by default, so as not to cause problems when
+       newbies accidentally use a stale cache file.
+
+       * acgeneral.m4 (_AC_INIT_PARSE_ARGS): Set cache_file to /dev/null
+       to disable caching by default.
+       (_AC_INIT_HELP): Adjust the --help message.
+       (AC_CACHE_LOAD, AC_CACHE_SAVE): Don't print "loading/updating
+       /dev/null" messages.
+       * autoconf.texi: Note that caching is disabled, how to enable it,
+       and that `./config.cache' is the traditional name of the cache file.
+       * install.texi: Likewise.
+
 2000-04-03  Akim Demaille  <akim@epita.fr>
 
        * acgeneral.m4 (_AC_INIT_PARSE_ARGS): If any option waiting for a
index 541ca04ed614f0bb90ec821047b42d4e22c0113c..a465bcc1bc3ab6c75210fd09299ab1e70fd5ab7a 100644 (file)
@@ -894,7 +894,7 @@ ac_init_version=false
 # The variables have the same names as the options, with
 # dashes changed to underlines.
 build=NONE
-cache_file=./config.cache
+cache_file=/dev/null
 AC_SUBST(exec_prefix, NONE)dnl
 host=NONE
 no_create=
@@ -1274,7 +1274,7 @@ Configuration:
   -h, --help              print this message
   -V, --version           print the version of autoconf that created configure
   -q, --quiet, --silent   do not print `checking...' messages
-      --cache-file=FILE   cache test results in FILE
+      --cache-file=FILE   cache test results in FILE [disabled]
   -n, --no-create         do not create output files
 
 EOF
@@ -1878,7 +1878,7 @@ done
 # -------------
 define(AC_CACHE_LOAD,
 [if test -r "$cache_file"; then
-  echo "loading cache $cache_file"
+  test "x$cache_file" != "x/dev/null" && echo "loading cache $cache_file"
   dnl Some versions of bash will fail to source /dev/null, so we
   dnl avoid doing that.
   test -f "$cache_file" && . $cache_file
@@ -1931,7 +1931,7 @@ EOF
   esac >>confcache
 if cmp -s $cache_file confcache; then :; else
   if test -w $cache_file; then
-    echo "updating cache $cache_file"
+    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
     cat confcache >$cache_file
   else
     echo "not updating unwritable cache $cache_file"
index f2e980b060ec284f44984ad2a3b1331b4a97bd20..20a87162e43bdc24864147adf8036bdb1bf5d599 100755 (executable)
--- a/configure
+++ b/configure
@@ -62,7 +62,7 @@ ac_init_version=false
 # The variables have the same names as the options, with
 # dashes changed to underlines.
 build=NONE
-cache_file=./config.cache
+cache_file=/dev/null
 exec_prefix=NONE
 host=NONE
 no_create=
@@ -449,7 +449,7 @@ Configuration:
   -h, --help              print this message
   -V, --version           print the version of autoconf that created configure
   -q, --quiet, --silent   do not print `checking...' messages
-      --cache-file=FILE   cache test results in FILE
+      --cache-file=FILE   cache test results in FILE [disabled]
   -n, --no-create         do not create output files
 
 EOF
@@ -624,7 +624,7 @@ for ac_site_file in $CONFIG_SITE; do
 done
 
 if test -r "$cache_file"; then
-  echo "loading cache $cache_file"
+  test "x$cache_file" != "x/dev/null" && echo "loading cache $cache_file"
       test -f "$cache_file" && . $cache_file
 else
   echo "creating cache $cache_file"
@@ -1167,7 +1167,7 @@ EOF
   esac >>confcache
 if cmp -s $cache_file confcache; then :; else
   if test -w $cache_file; then
-    echo "updating cache $cache_file"
+    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
     cat confcache >$cache_file
   else
     echo "not updating unwritable cache $cache_file"
index 9acefa6a443a1ae54c1b0898240571809be5c102..6fedcd1c7c5f076d33352690a66d928bd1f0b4da 100644 (file)
@@ -453,8 +453,9 @@ a shell script called @file{config.status} that, when run, will recreate
 the files listed above (@pxref{Invoking config.status});
 
 @item
-a shell script called @file{config.cache} that saves the results of
-running many of the tests (@pxref{Cache Files});
+an optional shell script normally called called @file{config.cache}
+(created when using @samp{configure --cache-file=./config.cache}) that
+saves the results of running many of the tests (@pxref{Cache Files});
 
 @item
 a file called @file{config.log} containing any messages produced by
@@ -500,7 +501,7 @@ Makefile.in -------------------------------> Makefile.in
 Files used in configuring a software package:
 @example
 @group
-                       .-------------> config.cache
+                       .-------------> [config.cache]
 configure* ------------+-------------> config.log
                        |
 [config.h.in] -.       v            .-> [config.h] -.
@@ -4969,17 +4970,21 @@ tests run on one system so they can be shared between configure scripts
 and configure runs.  It is not useful on other systems.  If its contents
 are invalid for some reason, the user may delete or edit it.
 
-By default, configure uses @file{./config.cache} as the cache file,
-creating it if it does not exist already.  @code{configure} accepts the
-@samp{--cache-file=@var{file}} option to use a different cache file;
-that is what @code{configure} does when it calls @code{configure}
-scripts in subdirectories, so they share the cache.
+By default, configure uses no cache file (technically, it uses
+@samp{--cache-file=/dev/null}), so as to forestall problems caused by
+accidental use of stale cache files.
+
+To enable caching, @code{configure} accepts the optional argument
+@samp{--cache-file=@var{file}} where @var{file} is the name of the cache
+file to use, traditionally @file{./config.cache}.  The cache file is
+created if it does not exist already.  When @code{configure} calls
+@code{configure} scripts in subdirectories, it uses the
+@samp{--cache-file} argument so that they share the same cache.
 @xref{Subdirectories}, for information on configuring subdirectories
 with the @code{AC_CONFIG_SUBDIRS} macro.
 
-Giving @samp{--cache-file=/dev/null} disables caching, for debugging
-@code{configure}.  @file{config.status} only pays attention to the cache
-file if it is given the @samp{--recheck} option, which makes it rerun
+@file{config.status} only pays attention to the cache file if it is
+given the @samp{--recheck} option, which makes it rerun
 @code{configure}.  If you are anticipating a long debugging period, you
 can also disable cache loading and saving for a @code{configure} script
 by redefining the cache macros at the start of @file{configure.in}:
@@ -6330,7 +6335,7 @@ test "$localstatedir" = '$@{prefix@}/var' && localstatedir=/var
 #
 # Give Autoconf 2.x generated configure scripts a shared default
 # cache file for feature test results, architecture-specific.
-if test "$cache_file" = ./config.cache; then
+if test "$cache_file" = /dev/null; then
   cache_file="$prefix/var/config.cache"
   # A cache file is only valid for one C compiler.
   CC=gcc
index 1a3f423bd0d1583132a1d3e9cf64c2a6114b7dfa..7892d0fcbb53d7979e387aaf25e7ea73454b17bb 100644 (file)
@@ -12,17 +12,20 @@ those values to create a @file{Makefile} in each directory of the
 package.  It may also create one or more @file{.h} files containing
 system-dependent definitions.  Finally, it creates a shell script
 @file{config.status} that you can run in the future to recreate the
-current configuration, a file @file{config.cache} that saves the results
-of its tests to speed up reconfiguring, and a file @file{config.log}
-containing compiler output (useful mainly for debugging
-@code{configure}).
+current configuration, and a file @file{config.log} containing compiler
+output (useful mainly for debugging @code{configure}).
+
+It can also use an optional file (typically called @file{config.cache}
+and enabled with @samp{--cache-file=./config.cache}) that saves the
+results of its tests to speed up reconfiguring.  (Caching is disabled by
+default to prevent problems with accidental use of stale cache files.)
 
 If you need to do unusual things to compile the package, please try to
 figure out how @code{configure} could check whether to do them, and mail
 diffs or instructions to the address given in the @file{README} so they
-can be considered for the next release.  If at some point
-@file{config.cache} contains results you don't want to keep, you may
-remove or edit it.
+can be considered for the next release.  If you are using the cache, and
+at some point @file{config.cache} contains results you don't want to
+keep, you may remove or edit it.
 
 The file @file{configure.in} is used to create @file{configure} by a
 program called @code{autoconf}.  You only need @file{configure.in} if
@@ -225,10 +228,10 @@ Print the version of Autoconf used to generate the @code{configure}
 script, and exit.
 
 @item --cache-file=@var{file}
-@cindex Cache, disabling
-Use and save the results of the tests in @var{file} instead of
-@file{./config.cache}.  Set @var{file} to @file{/dev/null} to disable
-caching, for debugging @code{configure}.
+@cindex Cache, enabling
+Enable the cache: use and save the results of the tests in @var{file},
+traditionally @file{./config.cache}.  @var{file} defaults to
+@file{/dev/null} to disable caching.
 
 @item --quiet
 @itemx --silent
index 541ca04ed614f0bb90ec821047b42d4e22c0113c..a465bcc1bc3ab6c75210fd09299ab1e70fd5ab7a 100644 (file)
@@ -894,7 +894,7 @@ ac_init_version=false
 # The variables have the same names as the options, with
 # dashes changed to underlines.
 build=NONE
-cache_file=./config.cache
+cache_file=/dev/null
 AC_SUBST(exec_prefix, NONE)dnl
 host=NONE
 no_create=
@@ -1274,7 +1274,7 @@ Configuration:
   -h, --help              print this message
   -V, --version           print the version of autoconf that created configure
   -q, --quiet, --silent   do not print `checking...' messages
-      --cache-file=FILE   cache test results in FILE
+      --cache-file=FILE   cache test results in FILE [disabled]
   -n, --no-create         do not create output files
 
 EOF
@@ -1878,7 +1878,7 @@ done
 # -------------
 define(AC_CACHE_LOAD,
 [if test -r "$cache_file"; then
-  echo "loading cache $cache_file"
+  test "x$cache_file" != "x/dev/null" && echo "loading cache $cache_file"
   dnl Some versions of bash will fail to source /dev/null, so we
   dnl avoid doing that.
   test -f "$cache_file" && . $cache_file
@@ -1931,7 +1931,7 @@ EOF
   esac >>confcache
 if cmp -s $cache_file confcache; then :; else
   if test -w $cache_file; then
-    echo "updating cache $cache_file"
+    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
     cat confcache >$cache_file
   else
     echo "not updating unwritable cache $cache_file"