From: Akim Demaille Date: Mon, 22 May 2000 13:31:00 +0000 (+0000) Subject: Add `configure --config-cache', `-C' as a shortcut for X-Git-Tag: autoconf-2.50~888 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be64229cfaf844f84abad4e9bfbcedd018302059;p=thirdparty%2Fautoconf.git Add `configure --config-cache', `-C' as a shortcut for `--cache-file=config.cache'. * acgeneral.m4 (_AC_INIT_PARSE_ARGS): Let `configure' support `--config-cache' and `-C'. Report them in `--help'. Fix the display of missing argument. (_AC_OUTPUT_SUBDIRS): Adjust. * doc/install.texi (Invoking configure): Rename the node as (Running configure scripts): this, the name of the chapter. (Operation Controls): Rename as... (Invoking configure): this. Document the new options. * doc/autoconf.texi (direntry): Huh? What is this `aclocal' doing here? Point to `Invoking configure'. (Cache Files): No need to document the disabling of the cache. --- diff --git a/ChangeLog b/ChangeLog index 954354516..1d41c0427 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,22 @@ +2000-05-22 Akim Demaille + + Add `configure --config-cache', `-C' as a shortcut for + `--cache-file=config.cache'. + + * acgeneral.m4 (_AC_INIT_PARSE_ARGS): Let `configure' support + `--config-cache' and `-C'. + Report them in `--help'. + Fix the display of missing argument. + (_AC_OUTPUT_SUBDIRS): Adjust. + * doc/install.texi (Invoking configure): Rename the node as + (Running configure scripts): this, the name of the chapter. + (Operation Controls): Rename as... + (Invoking configure): this. + Document the new options. + * doc/autoconf.texi (direntry): Huh? What is this `aclocal' doing + here? Point to `Invoking configure'. + (Cache Files): No need to document the disabling of the cache. + 2000-05-22 Mark Elbrecht , Eli Zaretskii More MS-DOS support. diff --git a/NEWS b/NEWS index 77bfbfc5e..658f8cd7a 100644 --- a/NEWS +++ b/NEWS @@ -60,6 +60,9 @@ test cases in this new frame work. Cross compilation is enabled iff the user specified `--host'. `configure' now fails if it can't run the executables it compiles, unless cross-compilation is enabled. +- Cache file + The cache file is disabled by default. The new options + `--config-cache', `-C' set the cache to `config.cache'. ** config.status - faster diff --git a/acgeneral.m4 b/acgeneral.m4 index f23a7b46f..8b6763b69 100644 --- a/acgeneral.m4 +++ b/acgeneral.m4 @@ -1012,6 +1012,9 @@ do | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; + --config-cache | -C) + cache_file=config.cache ;; + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ @@ -1277,7 +1280,8 @@ Try `configure --help' for more information.]) done if test -n "$ac_prev"; then - AC_MSG_ERROR(missing argument to --`echo $ac_prev | sed 's/_/-/g'`) + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + AC_MSG_ERROR(missing argument to $ac_option) fi # Be sure to have absolute paths. @@ -1327,6 +1331,7 @@ Configuration: -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] @@ -4587,6 +4592,8 @@ if test "$no_recursion" != yes; then | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ | --c=*) ;; + --config-cache | -C) + ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) diff --git a/doc/autoconf.texi b/doc/autoconf.texi index d950940ac..2733bfec2 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -32,8 +32,8 @@ How to create configuration scripts * autoreconf: (autoconf)Invoking autoreconf. Remaking multiple @code{configure} scripts -* configure: (autoconf)Invoking aclocal. - How to use the Autoconf output +* configure: (autoconf)Invoking configure. + Configuring a package * config.status: (autoconf)Invoking config.status. Recreating a configuration @end direntry @@ -130,7 +130,7 @@ package. This is edition @value{EDITION}, for Autoconf version * Writing Macros:: Adding new macros to Autoconf * Manual Configuration:: Selecting features that can't be guessed * Site Configuration:: Local defaults for @code{configure} -* Invoking configure:: How to use the Autoconf output +* Running configure scripts:: How to use the Autoconf output * Invoking config.status:: Recreating a configuration * Questions:: Questions about Autoconf, with answers * Upgrading:: Tips for upgrading from version 1 @@ -322,7 +322,7 @@ Running @code{configure} Scripts * System Type:: Specifying the system type * Sharing Defaults:: Setting site-wide defaults for @code{configure} * Environment Variables:: Defining environment variables. -* Operation Controls:: Changing how @code{configure} runs +* Invoking configure:: Changing how @code{configure} runs Questions About Autoconf @@ -5193,7 +5193,7 @@ 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 +To enable caching, @code{configure} accepts @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 @@ -5204,16 +5204,7 @@ with the @code{AC_CONFIG_SUBDIRS} macro. @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}: - -@example -define([AC_CACHE_LOAD]) -define([AC_CACHE_SAVE]) -AC_INIT(@r{whatever}) -@r{ ... rest of configure.in ...} -@end example +@code{configure}. It is wrong to try to distribute cache files for particular system types. There is too much room for error in doing that, and too much @@ -6175,7 +6166,7 @@ macro which does that. @c ===================================================== Site Configuration. -@node Site Configuration, Invoking configure, Manual Configuration, Top +@node Site Configuration, Running configure scripts, Manual Configuration, Top @chapter Site Configuration @code{configure} scripts support several kinds of local configuration @@ -6614,7 +6605,7 @@ fi @c ============================================== Running configure Scripts. -@node Invoking configure, Invoking config.status, Site Configuration, Top +@node Running configure scripts, Invoking config.status, Site Configuration, Top @chapter Running @code{configure} Scripts @cindex @code{configure} @@ -6632,7 +6623,7 @@ may use comes with Autoconf. * System Type:: Specifying the system type * Sharing Defaults:: Setting site-wide defaults for @code{configure} * Environment Variables:: Defining environment variables. -* Operation Controls:: Changing how @code{configure} runs +* Invoking configure:: Changing how @code{configure} runs @end menu @include install.texi @@ -6640,7 +6631,7 @@ may use comes with Autoconf. @c ============================================== Recreating a Configuration -@node Invoking config.status, Questions, Invoking configure, Top +@node Invoking config.status, Questions, Running configure scripts, Top @chapter Recreating a Configuration @cindex @code{config.status} diff --git a/doc/install.texi b/doc/install.texi index 88eb5b69a..a3b59b05a 100644 --- a/doc/install.texi +++ b/doc/install.texi @@ -16,9 +16,10 @@ 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.) +and enabled with @samp{--cache-file=./config.cache} or simply @samp{-C}) +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 @@ -203,8 +204,8 @@ will cause the specified gcc to be used as the C compiler (unless it is overridden in the site shell script). -@node Operation Controls -@section Operation Controls +@node Invoking configure +@section Invoking @code{configure} @code{configure} recognizes the following options to control how it operates. @@ -225,6 +226,10 @@ 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 --config-cache +@itemx -C +Alias for @samp{--cache-file=config.cache}. + @item --quiet @itemx --silent @itemx -q diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index f23a7b46f..8b6763b69 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -1012,6 +1012,9 @@ do | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; + --config-cache | -C) + cache_file=config.cache ;; + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ @@ -1277,7 +1280,8 @@ Try `configure --help' for more information.]) done if test -n "$ac_prev"; then - AC_MSG_ERROR(missing argument to --`echo $ac_prev | sed 's/_/-/g'`) + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + AC_MSG_ERROR(missing argument to $ac_option) fi # Be sure to have absolute paths. @@ -1327,6 +1331,7 @@ Configuration: -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] @@ -4587,6 +4592,8 @@ if test "$no_recursion" != yes; then | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ | --c=*) ;; + --config-cache | -C) + ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)