bug-make
[Top][All Lists]
Advanced

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

Re: here docs in makefile


From: Philip Guenther
Subject: Re: here docs in makefile
Date: Thu, 28 Sep 2006 03:41:40 -0600

On 9/28/06, Dan Jacobson <address@hidden> wrote:
...
Also mention how one can do shell HERE docs please!

I don't think it's possible to embed a here-doc directly in a
Makefile.  In the line passed to the shell, all the newlines except
the very last will be preceded by a backslash, but the here-doc syntax
requires a newline not preceeded by a backslash as the start of the
here-doc contents.  (Here-docs that aren't single quoted also require
a bare newline before the terminator.)

So the answer is: you put the command w/here-doc in a file, or use
echo and a pipe, or in some other way rewrite it with
Makefile-friendly syntax.


Philip Guenther




reply via email to

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