autoconf-patches
[Top][All Lists]
Advanced

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

Re: m4_defn overhead


From: Ralf Wildenhues
Subject: Re: m4_defn overhead
Date: Fri, 12 Oct 2007 17:42:39 +0200
User-agent: Mutt/1.5.16 (2007-10-11)

Hi Eric,

* Eric Blake wrote on Thu, Oct 11, 2007 at 10:49:09PM CEST:
> 
> On further examination, I've decided the problem in libtool.m4:
> 
> m4_define([_LT_DECL],
> [lt_if_append_uniq([lt_decl_varnames], [$2], [[, ]],...
> 
> where lt_if_append_uniq defers to m4_append.  Notice that the separator is 
> the 
> overquoted string `[, ]';

Hmm.  The Quotation Rule of Thumb in the manual recommends double
quoting of risky literals, which certainly includes comma.  Maybe
it would help to note that SEPARATOR shouldn't be double-quoted?

For a counter example, the first argument to AS_HELP_STRING needs to be
doubly quoted if it contains a comma (the node `Autoconf Language' in
the manual hints the alert reader that this may be needed, but it's a
rather obscure hint).

> which prior to my m4sugar patch was being expanded by 
> m4_append to strip a layer of quoting, but now it is being used as-is.  
> Furthermore, this line in libtool.m4 ONLY appears on libtool HEAD, which has 
> not been released yet, so I hope very few others are being bitten by this bug.

Well, Libtool HEAD is used quite a bit out there, but I agree that we
should fix things.

> So, I would like to patch autoconf to add a testsuite to m4sugar.at, testing 
> the NEW semantics; add a NEWS item that describes the change in semantics, 
> but 
> not alter m4sugar.m4.  I will follow up with a patch to the libtool list that 
> fixes the libtool usage, regardless of autoconf version it is run with.

I'm fine with the patch; you may want to add some tests that actually
use comma in the SEPARATOR argument, to ensure Autoconf doesn't regress
in its semantics there.

Thanks,
Ralf

> +2007-10-11  Eric Blake  <address@hidden>
> +
> +     Document effect of recent m4_append change on libtool HEAD.
> +     * tests/m4sugar.at (m4@&address@hidden): New test.
> +     * NEWS: Document semantics change.
> +




reply via email to

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