help-make
[Top][All Lists]
Advanced

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

Re: Crazy make rules with here documents, example.


From: Mike Mestnik
Subject: Re: Crazy make rules with here documents, example.
Date: Tue, 06 Apr 2010 12:25:14 -0500
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4

On 4/6/2010 7:55 AM, Stephan Beal wrote:
On Mon, Apr 5, 2010 at 10:29 PM, Mike Mestnik <address@hidden
<mailto:address@hidden>> wrote:


        @$(PRELFSH)gcc -E -o - - <<'\''EOF'\'' | gcc -x c -o helloworld - \
        #include <stdio.h>\
        int main( int argc, const char* argv[] ) {\
        printf("Hello World!!!\\n");\
        return(0);\
        };\
        EOF$(POSTLFSH)


Can you not output the commands to a temp file and read it in via < ?

At first I believed you, but then I thought about it.

Chicken <- Egg.

You mean with a...
cat <<EOF > blah.tmp
???

I guess I could build this file with a series of printf(s) and echo(s)... Though then I'm back to my first problem and the following would be better...
{ printf "line1\n"; printf "line2\n"; } | cat > blah.tmp
{ printf "line1\n"; printf "line2\n"; } | gcc...

--
----- stephan beal
http://wanderinghorse.net/home/stephan/


--
Mike Mestnik
Technical Team
___
Nagios Enterprises, LLC
Email:  address@hidden
Web:    www.nagios.com




reply via email to

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