Re: Newlines in AC_SUBST

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

 



Greetings,

[answering my own question, so as to keep misinformation out of the archive]

I said, apropos of the apparent prohibition of newlines in AC_SUBST:

> However, do escaped newlines count in this prohibition?
> 
> Writing
>
>     AC_SUBST(variable)
>     variable="blah\\
> "
>
> does work (ie, it does include the newline in the substituted output file). 

...actually, it doesn't.  It appears to work, because the value with
its escaped newline is correctly substituted in the required place,
but because automake puts a `variable=@variable@' into the generated
Makefile.in, it _also_ gets substituted there, erroneously.

It appeared to work for me only because what I was substituting
happened to be legal makefile syntax.  So don't try this at home,
folks.  If anyone though it was worth it, I'd suggest that the
documentation could emphasise:

    This value of variable should not contain literal newlines, not
    even escaped ones.

Sorry for the burned up bandwidth.  All the best,

Norman


-- 
---------------------------------------------------------------------------
Norman Gray                        http://www.astro.gla.ac.uk/users/norman/
Physics and Astronomy, University of Glasgow, UK     norman@xxxxxxxxxxxxxxx




[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux