[Top][All Lists]

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

Re: spurious "(cached)" output from AC_CACHE_VAL

From: Eric Blake
Subject: Re: spurious "(cached)" output from AC_CACHE_VAL
Date: Sat, 28 Feb 2009 06:45:06 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20081209 Thunderbird/ Mnenhy/

Hash: SHA1

According to Bruno Haible on 2/27/2009 3:36 PM:
> Eric Blake wrote in 
> <http://lists.gnu.org/archive/html/bug-gnulib/2009-02/msg00213.html>:
>> But your patch has merit in that it makes a nice macro name that explains 
>> what 
>> you are intending.
> It would even be better if this macro was not needed. Couldn't AC_CACHE_VAL be
> changed to output "(cached)" when run between AC_MSG_CHECKING and
> AC_MSG_RESULT, and be silent otherwise?

Wow, nice suggestion for improving the API.  I'll work on that.

> The implementation of this change would be that AC_CACHE_VAL invokes a
> macro made for this purpose, say, _AC_ECHO_CACHED. AC_MSG_CHECKING would
> pushdef _AC_ECHO_CACHED to a definition that expands to nothing or a ':'
> command, and AC_MSG_RESULT would popdef it.

Or, even better, AC_MSG_CHECKING pushdef's a witness macro, AC_MSG_RESULT
pops it, and AC_CACHE_VAL checks whether the witness macro is defined, to
avoid the AS_ECHO altogether (no need to output a no-op : into the
resulting script).

>> If you'd like, I'll even add another sentence to the autoconf manual that 
>> makes 
>> it clear that all such variables with this naming scheme, regardless of how 
>> they are used, are cached.
> I would *not* document this. If you document it, it may cause additional 
> effort
> if you or Ralf want to change the implementation of caching, sometime in the
> future. There is no functional benefit for the user either: users can use

Thanks to your suggestion of an improved API for AC_CACHE_VAL, I'm
inclined to agree that we no longer need to worry about documenting that
all _cv_ variables are cached, leaving some flexibility for under-the-hood

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


reply via email to

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