help-make
[Top][All Lists]
Advanced

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

Here Documents in commands


From: Jens Schweikhardt
Subject: Here Documents in commands
Date: Thu, 28 Nov 2002 20:36:01 +0100
User-agent: Mutt/1.4i

hello, world\n

I've been thinking long and deep and even made a few attempts at using
shell "here documents" in the commands for a rule. My conclusion is that
it is impossible, at least with a POSIX shell. Make's command execution
with sh is inherently line oriented, while here documents are multi-line
by definition. Continuing lines in the Makefile with backslash newline
can't work because the shell only sees the resulting single line.

In the remote event that I have overlooked something, does anyone
know a way how to get something like

        cat << EOF
        foo
        bar
        EOF

in a rule?

PS: Yes, I can get the same effect with a fews echos. Consider it a
    proof-of-concept question.

Regards,

        Jens
-- 
Jens Schweikhardt http://www.schweikhardt.net/
SIGSIG -- signature too long (core dumped)




reply via email to

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