[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: m4_defn overhead
From: |
Eric Blake |
Subject: |
Re: m4_defn overhead |
Date: |
Fri, 12 Oct 2007 16:58:18 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
Ralf Wildenhues <Ralf.Wildenhues <at> gmx.de> writes:
> > 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?
Probably, along with a note that STRING also need not be double-quoted.
A lot of the m4 text macros (m4_split, m4_normalize, m4_flatten, m4_strip)
intentionally operate on quoted text and return quoted output; the m4_* rules
are thus slightly different than the AC_* rules.
>
> 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).
Not for long. I still have one of my pending patches [1] that allows single-
quoted commas in AS_HELP_STRING without eating the trailing whitespace, via my
new macro m4_expand (or whatever better name we can come up with).
[1] http://lists.gnu.org/archive/html/autoconf-patches/2007-10/msg00071.html
[Note to self - I'm now up to 10 open topic branches on my local git
repository, from all the patches I've been working in parallel; I need to start
flushing them upstream...]
>
> > 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.
Yes - M4 HEAD for starters (don't you love the bootstrapping effect this change
has?) :)
Still, anyone brave enough to use unreleased software must be aware of the
perils.
>
> > 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.
You got it. I'll add those tests before committing the descendent of this
patch, along with some verbiage in autoconf.texi.
> > +2007-10-11 Eric Blake <ebb9 <at> byu.net>
> > +
> > + Document effect of recent m4_append change on libtool HEAD.
> > + * tests/m4sugar.at (m4@&t <at> _append): New test.
> > + * NEWS: Document semantics change.
--
Eric Blake
- m4_defn overhead, Eric Blake, 2007/10/10
- Re: m4_defn overhead, Ralf Wildenhues, 2007/10/11
- Re: m4_defn overhead, Eric Blake, 2007/10/11
- Re: m4_defn overhead, Ralf Wildenhues, 2007/10/12
- Re: m4_defn overhead,
Eric Blake <=
- Handling of single-quoted comma [was: m4_defn overhead], Eric Blake, 2007/10/15
- Re: Handling of single-quoted comma [was: m4_defn overhead], Ralf Wildenhues, 2007/10/16
- Re: Handling of single-quoted comma [was: m4_defn overhead], Eric Blake, 2007/10/16
- Re: Handling of single-quoted comma [was: m4_defn overhead], Eric Blake, 2007/10/19
- Re: Handling of single-quoted comma [was: m4_defn overhead], Ralf Wildenhues, 2007/10/19
- Re: Handling of single-quoted comma [was: m4_defn overhead], Eric Blake, 2007/10/19
- Re: Handling of single-quoted comma [was: m4_defn overhead], Eric Blake, 2007/10/23
- Re: Handling of single-quoted comma [was: m4_defn overhead], Paolo Bonzini, 2007/10/24