automake-patches
[Top][All Lists]
Advanced

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

Re: expand-before-require bug


From: Eric Blake
Subject: Re: expand-before-require bug
Date: Tue, 20 Jan 2009 21:30:05 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Eric Blake <ebb9 <at> byu.net> writes:

> 
> I am about to patch autoconf to issue a syntax warning on instances of 
> expanding a macro, then later requiring the same macro, from within the same 
> defun'd body.  This is a bug in user code which can lead to silent out-of-
order 
> expansion in older autoconf, and which will cause duplicate expansion in 
newer 
> autoconf once I implement Bruno's suggestion of re-expanding the macro as 
part 
> of issuing the warning.

It turns out that a lot of people do this:

m4_defun([a],[A])
m4_defun([b],[m4_require([a])B])
m4_defun([outer],[A
B])

and this was one of those cases.  So I've reworked my autoconf patch to avoid 
treating this case as a false positive - my latest incantation of the autoconf 
patch neither warns nor duplicates if there is no chance that the expand-before-
require could have triggered out-of-order expansion.  Which means this patch to 
automake is no longer a technical necessity.  So now the question becomes, is 
it okay to apply this patch for cosmetic reasons, and with a changed summary 
line?

> Subject: [PATCH] Avoid expand-before-require warning from newer autoconf.
> 
> * m4/init.m4 (AM_INIT_AUTOMAKE): Require, rather than directly
> expand, AM_PROG_INSTALL_SH and AM_PROG_INSTALL_STRIP.
> 

-- 
Eric Blake







reply via email to

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