[trimmed Eric, as he's probably bored of overhearing us by now ;-)]
Ralf Wildenhues wrote:
Hi Gary,
Hallo Ralf,
* Gary V. Vaughan wrote on Wed, May 17, 2006 at 10:42:21PM CEST: > Perhaps you misunderstand me? I'm advocating sh.test style static > check that tries to match uses of, say, $EGREP in an AC_DEFUN with a > matching m4_require([_LT_DECL_EGREP]) at ``make test'' time. Nope, I'm not misunderstanding you, I think. Such an automated check will not save you.
>
You can still get into trouble by requiring macros in the wrong order. I.e., all macros have their requirements listed at the beginning, but still some are expanded before their requirements.
Yikes! I hope that isn't really the case. Autoconf require graph tracing has gone to quite some lengths to ensure that all the macros you AC_REQUIRE are expanded before the body of the macro that requires them.
Oh wait, you mean that the expansion order of the required macros can't be inferred? I agree with that, but I don't think it has any bearing on the usefulness of having a warning in macros that use, say, $Xsed without ac_require([_LT_DECL_SED]).
IMHO this is an argument for not factorizing more than makes actually sense from a script POV: if I have to think about requirement order of third party macros, and I actually know in which order I want stuff to appear in the output, and what I'm doing is linear, well, then why am I not just writing it that way?
ACK. So long as there is (preferably) no code duplication :-D Really, the point is moot, as I have no clue how to reliably extract a list of macros that forgot to require the appropriate DECLs :-( Cheers, Gary. -- Gary V. Vaughan ())_. [EMAIL PROTECTED],gnu.org} Research Scientist ( '/ http://blog.azazil.net GNU Hacker / )= http://trac.azazil.net/projects/libtool Technical Author `(_~)_ http://sources.redhat.com/autobook