help-make
[Top][All Lists]
Advanced

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

RE: here document in recipe


From: Warlich, Christof
Subject: RE: here document in recipe
Date: Tue, 6 Dec 2011 07:34:21 +0100

That's really a nice approach; not only because it completely avoids the need 
to echo and cluster the commands by using block level redirection, but also 
because it clearly seperates _what_ needs to be done (in the recipe) from 
_where_ it needs to be done (by defining SHELL and .SHELLFLAGS as scoped 
variables).

Thanks a lot for sharing this! Cheers,

Chris 

 
-----Original Message-----
From: David Boyce [mailto:address@hidden 
Sent: Dienstag, 6. Dezember 2011 05:02
To: Warlich, Christof
Cc: Stephan Beal; address@hidden
Subject: Re: here document in recipe

On Nov 22, 2011, at 10:01 AM, "Warlich, Christof"
<address@hidden> wrote:

> That avoids the need for the redirection on every line and the final
> copy, thanks.
>
> But the echos still bother me. I played arround with canned recipes,
> but without success. So it seems that this is the best one can get.

You may find this a better way in general, or at least an interesting
alternative. Requires 3.82 though:

.PHONY: all tgtA tgtB

tgtB: SHELL := /usr/bin/ssh
tgtB: .SHELLFLAGS := <remote-host>

all: tgtA tgtB

tgtA:
        @echo Building $@ on $(shell hostname)

tgtB:
        @echo Building $@ on $(shell hostname)

This test case works fine for me (once <remote-host> is filled in).

-David Boyce



reply via email to

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