[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: configure -C by default?
From: |
Ralf Wildenhues |
Subject: |
Re: configure -C by default? |
Date: |
Mon, 14 Feb 2011 06:31:26 +0100 |
User-agent: |
Mutt/1.5.20 (2010-08-04) |
[ moving from autoconf@ to -patches ]
* Brian Gough wrote on Mon, Feb 07, 2011 at 01:45:04PM CET:
> Maybe it would help to publicise "-C" in the output so people
> are more aware of it. e.g.
>
> $ ./configure
> configure: not caching test results (use -C to enable)
> checking for a BSD-compatible install... /usr/bin/install -c
> ...
>
> The message could be suppressed if config.status does not exist, so
> it's only shown if someone is configuring more than once.
This would implement that suggestion. I'm not totally sold on this
(and I'm making it a _NOTICE not a _WARNING so it is hidden with -q),
so I'd appreciate input from the other developers if we want this.
Thanks,
Ralf
Hint at -C option when running configure repeatedly.
* lib/autoconf/general.m4 (AC_CACHE_LOAD): Note disabled cache
when config.status is present.
* tests/base.at (AC_CACHE_CHECK): Extend test.
Suggestion from Brian Gough.
diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4
index dd20e71..337aba7 100644
--- a/lib/autoconf/general.m4
+++ b/lib/autoconf/general.m4
@@ -1915,6 +1915,8 @@ m4_define([AC_CACHE_LOAD],
[[\\/]]* | ?:[[\\/]]* ) . "$cache_file";;
*) . "./$cache_file";;
esac
+ elif test -x ./config.status; then
+ AC_MSG_NOTICE([not caching test results (use -C to enable)])
fi
else
AC_MSG_NOTICE([creating cache $cache_file])
diff --git a/tests/base.at b/tests/base.at
index 4b24366..7fac91e 100644
--- a/tests/base.at
+++ b/tests/base.at
@@ -466,6 +466,13 @@ AT_CHECK_CONFIGURE([-C])
# should be updated.
AT_CHECK([test -s cache || test ! -h config.cache])
+# Hint at -C if not running configure for the first time.
+rm -f cache config.cache config.status
+AT_CHECK_CONFIGURE([], [], [stdout])
+AT_CHECK([grep 'not caching test results' stdout], [1])
+AT_CHECK_CONFIGURE([], [], [stdout])
+AT_CHECK([grep 'not caching test results' stdout], [0], [ignore])
+
# config.site can specify a site-wide cache, accumulating information.
# Also test that we don't run afoul of sourcing a file with leading -.
AT_DATA([-config.site],
- Re: configure -C by default?,
Ralf Wildenhues <=