autoconf-patches
[Top][All Lists]
Advanced

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

Re: [SCM] GNU Autoconf source repository branch, master, updated. v2.63-


From: Ralf Wildenhues
Subject: Re: [SCM] GNU Autoconf source repository branch, master, updated. v2.63-259-g4600920
Date: Sat, 24 Jan 2009 14:24:22 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

Hi Eric,

a couple of comments (sorry for reviewing patches out-of-order):

* Eric Blake wrote on Wed, Jan 21, 2009 at 05:32:34PM CET:
> commit 46009205a943a5f5b712cc11b72e9b017141ffeb
> Author: Eric Blake <address@hidden>
> Date:   Tue Jan 20 14:22:41 2009 -0700
> 
>     Fix out-of-order expansion with expand-before-require.
>     
>     * lib/m4sugar/m4sugar.m4 (m4_require): Redundantly expand a
>     required macro when issuing expand-before-require warning.
>     * doc/autoconf.texi (Prerequisite Macros): Adjust documentation.
>     (Expanded Before Required): New node.

> --- a/doc/autoconf.texi
> +++ b/doc/autoconf.texi

> address@hidden Expanded Before Required
> address@hidden Expanded Before Required
> +
> address@hidden expanded before required
> +Older versions of Autoconf silently built files with incorrect ordering
> +between dependent macros if an outer macro first expanded, then later
> +indirectly required, an inner macro.  Starting with Autoconf 2.64, this
> +situation no longer generates out-of-order code, but results in
> +duplicate output and a diagnosis of a syntax warning:

s/a diagnosis of // ?

> address@hidden
> +$ @kbd{cat configure.ac}
> address@hidden([TESTA], [[echo in A
> address@hidden test -n "$SEEN_A" ; then echo duplicate ; fi
> address@hidden:]])
> address@hidden([TESTB], [AC_REQUIRE([TESTA])[echo in B
> address@hidden test -z "$SEEN_A" ; then echo bug ; fi]])
> address@hidden([TESTC], [AC_REQUIRE([TESTB])[echo in C]])
> address@hidden([OUTER], [[echo in OUTER]
> address@hidden
> address@hidden)
> address@hidden
> address@hidden
> address@hidden
> +$ @kbd{autoconf}
> address@hidden:11: warning: AC_REQUIRE:
> address@hidden `TESTA' was expanded before it was required
> address@hidden:4: TESTB is expanded from...
> address@hidden:6: TESTC is expanded from...
> address@hidden:7: OUTER is expanded from...
> address@hidden:11: the top level
> address@hidden example
> +

@noindent  ?

> +To avoid this warning, decide what purpose the macro in question serves.
> +If it only needs to be expanded once (for example, if it provides
> +initialization text used by later macros), then the fix is to change all
> +instance of direct calls to instead go through @code{AC_REQUIRE}

s/instance/&s/

> +(@pxref{Prerequisite Macros}).  If, instead, the macro is parameterized
> +by arguments or by the current definition of other macros in the m4
> +environment, then the macro should always be directly expanded instead
> +of required.

Cheers,
Ralf




reply via email to

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