[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AM_SUBST_IGNORE = AC_SUBST without Makefile variable definition
From: |
Ralf Wildenhues |
Subject: |
Re: AM_SUBST_IGNORE = AC_SUBST without Makefile variable definition |
Date: |
Thu, 20 Oct 2005 08:51:55 +0200 |
User-agent: |
Mutt/1.5.11 |
[ removed automake-patches, its readers are likely to read here, too,
and this isn't about a patch ]
Hi Stepan,
* Stepan Kasal wrote on Wed, Oct 19, 2005 at 01:37:22PM CEST:
> On Wed, Oct 19, 2005 at 11:32:37AM +0200, Ralf Wildenhues wrote:
> > I believe what Stepan meant was:
*snip*
>
> not exactly. It is like this:
>
> 1) each occurence of @VAR@ is replaced by the value of VAR, for each
> AC_SUBSTed variable VAR.
> 2) if the original line matched /@address@hidden/, then
> - this match is removed
> - each embedded newline is esaped by a backslash
> - if the resulting string ends with a backslash, space is appendeded
Ah, ok. Thank you for clearing this up.
> In other words, after the usual sed substtitutions, the following
> sed code is executed:
> /@address@hidden/ {
> s/\n/\\&/g
> s/@address@hidden//
> s/\\$/& /
> }
Oh, ahh. Nifty! Only thing the user will have to keep in mind is that
she should add another white space (besides the newline, which will be
removed by `make') to separate values. I guess that could be called a
feature even!
> > [...] unless an actual implementation can be shown not to
> > show execution time regression inside config.status.
>
> The above proposal is suited for this.
ACK.
> (Having "@FOO\n@" for "flattened value of FOO" might look nicer, but
> effective implementation would be more difficult, if possible.
> The facts that the magical tag means "the whole line is flattened" and
> that the tag is at the end of the line enable easy effective
> implementation.)
ACK.
> > If you accept that fact, you might as well flatten the variable before
> > substituting it.
*snip*
> if autoconf "flattens" the variable, it is
> possible that the line would get too long, which could cause problems.
ACK. Darn, I knew I must've missed something.
> Actually, there is a report that LIBOBJ can get too long with latest
> autotools and heavy gnulib usage:
Ahh.
> > [...] it also means that any occurrence of
> > @FOO@
> > in a Makefile.in will be substituted by $FOO_FLATTENED rather than $FOO,
>
> That doesn't sound like a good idea. I think that one of the motivations
> for multiline substitutions was that we can AC_SUBST multiline make rules.
Ah, ok. So you also intend to have an AC_SUBST_NOFLATTEN or
AC_SUBST_RULE that will cause Automake
- not to add the @\n@ at the end (as will be done with AC_SUBST),
- output this one after all the variables (and also after some or all
rules?)
Nice idea! Do we have a real-world example where this would help, though?
Cheers,
Ralf