autoconf
[Top][All Lists]
Advanced

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

Re: Newlines in AC_SUBST


From: Norman Gray
Subject: Re: Newlines in AC_SUBST
Date: Mon, 2 Feb 2004 10:54:17 +0000 (GMT)

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 address@hidden@' 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     address@hidden





reply via email to

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