autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Specify the default cache file when calling autoconf


From: Paolo Bonzini
Subject: Specify the default cache file when calling autoconf
Date: Tue, 29 May 2001 10:04:07 +0200 (CEST)

This patch (from 2.50) adds a --cache-file option that allows one to
specify the default cache file for the generated configure script. I am
switching GNU Smalltalk to 2.50 and I am really annoyed some times by the
long times that it takes to reconfigure the package simply because I
modified a single Makefile.am!

A dist-hook rule allows me to revert to the default behavior (no cache)
when distributing (or maybe I should patch automake too...)

I know that caches can be harmful, but that's mainly for users --
developers should be given enough rope if they want to save time.

Paolo Bonzini

diff --recursive -U3 autoconf-2.50-orig/acgeneral.m4 autoconf-2.50/acgeneral.m4
--- autoconf-2.50-orig/acgeneral.m4     Sat May 19 19:29:30 2001
+++ autoconf-2.50/acgeneral.m4  Tue May 29 09:51:08 2001
@@ -807,7 +807,7 @@
 ac_init_version=false
 # The variables have the same names as the options, with
 # dashes changed to underlines.
-cache_file=/dev/null
+cache_file=_AC_CACHE_FILE
 AC_SUBST(exec_prefix, NONE)dnl
 no_create=
 no_recursion=
diff --recursive -U3 autoconf-2.50-orig/autoconf autoconf-2.50/autoconf
--- autoconf-2.50-orig/autoconf Tue May 29 09:48:04 2001
+++ autoconf-2.50/autoconf      Tue May 29 09:52:08 2001
@@ -34,6 +34,7 @@
   -v, --verbose            verbosely report processing
   -d, --debug              don't remove temporary files
   -o, --output=FILE        save output in FILE (stdout is the default)
+  -c, --cache-file=FILE    have the generated script cache its results in FILE
   -W, --warnings=CATEGORY  report the warnings falling in CATEGORY [syntax]
 
 Warning categories include:
@@ -110,6 +111,7 @@
   AC_ACLOCALDIR=`(aclocal --print-ac-dir) 2>/dev/null`
 : ${AWK=mawk}
 debug=false
+cache_file=/dev/null
 # Trace Autoconf's initialization?
 initialization=false
 localdir=.
@@ -150,6 +152,15 @@
        localdir=$1
        shift ;;
 
+    --cache-file=* | -c?* )
+      cache_file=$optarg
+       shift ;;
+    --cache-file | -c )
+       test $# = 1 && eval "$exit_missing_arg"
+       shift
+       cache_file=$1
+       shift ;;
+
     --autoconf-dir=* | -A?* )
       autoconf_dir=$optarg
        shift ;;
@@ -258,7 +269,7 @@
 test -f "$autoconf_dir/acsite.m4" && acsite_m4="$autoconf_dir/acsite.m4"
 test -f "$localdir/aclocal.m4"   && aclocal_m4="$localdir/aclocal.m4"
 m4_common="$acsite_m4 $aclocal_m4 -I $autoconf_dir -I $localdir \
-           -Dm4_tmpdir=$tmp"
+           -Dm4_tmpdir=$tmp -D_AC_CACHE_FILE=$cache_file"
 run_m4="$M4           $autoconf_dir/autoconf.m4  $m4_common"
 run_m4f="$M4 --reload $autoconf_dir/autoconf.m4f $m4_common"
 
diff --recursive -U3 autoconf-2.50-orig/autoconf.m4f autoconf-2.50/autoconf.m4f
--- autoconf-2.50-orig/autoconf.m4f     Tue May 29 09:48:05 2001
+++ autoconf-2.50/autoconf.m4f  Tue May 29 09:52:08 2001
@@ -5072,7 +5072,7 @@
 lenlen
 F5,6
 m4_ififelse
-T19,14061
+T19,14066
 _AC_INIT_PARSE_ARGSm4_divert_push([PARSE_ARGS])dnl
 
 # Initialize some variables set by options.
@@ -5080,7 +5080,7 @@
 ac_init_version=false
 # The variables have the same names as the options, with
 # dashes changed to underlines.
-cache_file=/dev/null
+cache_file=_AC_CACHE_FILE
 AC_SUBST(exec_prefix, NONE)dnl
 no_create=
 no_recursion=
diff --recursive -U3 autoconf-2.50-orig/autoconf.sh autoconf-2.50/autoconf.sh
--- autoconf-2.50-orig/autoconf.sh      Sat May 19 18:52:59 2001
+++ autoconf-2.50/autoconf.sh   Tue May 29 09:52:06 2001
@@ -34,6 +34,7 @@
   -v, --verbose            verbosely report processing
   -d, --debug              don't remove temporary files
   -o, --output=FILE        save output in FILE (stdout is the default)
+  -c, --cache-file=FILE    have the generated script cache its results in FILE
   -W, --warnings=CATEGORY  report the warnings falling in CATEGORY [syntax]
 
 Warning categories include:
@@ -110,6 +111,7 @@
   AC_ACLOCALDIR=`(aclocal --print-ac-dir) 2>/dev/null`
 : address@hidden@}
 debug=false
+cache_file=/dev/null
 # Trace Autoconf's initialization?
 initialization=false
 localdir=.
@@ -150,6 +152,15 @@
        localdir=$1
        shift ;;
 
+    --cache-file=* | -c?* )
+      cache_file=$optarg
+       shift ;;
+    --cache-file | -c )
+       test $# = 1 && eval "$exit_missing_arg"
+       shift
+       cache_file=$1
+       shift ;;
+
     --autoconf-dir=* | -A?* )
       autoconf_dir=$optarg
        shift ;;
@@ -258,7 +269,7 @@
 test -f "$autoconf_dir/acsite.m4" && acsite_m4="$autoconf_dir/acsite.m4"
 test -f "$localdir/aclocal.m4"   && aclocal_m4="$localdir/aclocal.m4"
 m4_common="$acsite_m4 $aclocal_m4 -I $autoconf_dir -I $localdir \
-           -Dm4_tmpdir=$tmp"
+           -Dm4_tmpdir=$tmp -D_AC_CACHE_FILE=$cache_file"
 run_m4="$M4           $autoconf_dir/autoconf.m4  $m4_common"
 run_m4f="$M4 --reload $autoconf_dir/autoconf.m4f $m4_common"
 
diff --recursive -U3 autoconf-2.50-orig/man/autoconf.1 
autoconf-2.50/man/autoconf.1
--- autoconf-2.50-orig/man/autoconf.1   Mon May 21 09:33:51 2001
+++ autoconf-2.50/man/autoconf.1        Tue May 29 09:52:09 2001
@@ -27,6 +27,9 @@
 \fB\-o\fR, \fB\-\-output\fR=\fIFILE\fR
 save output in FILE (stdout is the default)
 .TP
+\fB\-c\fR, \fB\-\-cache\-file\fR=\fIFILE\fR
+have the generated script cache its results in FILE
+.TP
 \fB\-W\fR, \fB\-\-warnings\fR=\fICATEGORY\fR
 report the warnings falling in CATEGORY [syntax]
 .SS "Warning categories include:"





reply via email to

[Prev in Thread] Current Thread [Next in Thread]