mirror of
git://git.sv.gnu.org/autoconf
synced 2025-03-31 15:00:26 +08:00
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.
This commit is contained in:
parent
f1e4ffce26
commit
5ae14bc8c0
14
ChangeLog
14
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
|
||||
|
@ -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"
|
||||
|
8
configure
vendored
8
configure
vendored
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user