|
From: | Eric Melski |
Subject: | Re: .ONESHELL enhancement? |
Date: | Tue, 22 Sep 2009 22:43:00 -0700 |
User-agent: | Thunderbird 2.0.0.23 (X11/20090817) |
Matt McCutchen wrote:
But note the following in the standard:The single-shell method has the advantages in [...] the lack of a requirement for many continued lines.So they are viewing the command recipe as a single shell script, and constructs like the following would be legal: foo: bar if test -s $< then echo 'nonempty' >$@ else echo 'empty' >$@ fi
I assumed that this was the intended use of .ONESHELL. If you imagine that the command recipe is written to a temporary file and invoked as, eg, "sh script.sh" when .ONESHELL is enabled, it would allow you to use arbitrary interpreters as your shell. For example:
.ONESHELL: SHELL=/bin/perl all: print "foo\n"; print "bar\n"; This wouldn't work with the "concatenate with &&" proposal. Best regards, Eric Melski http://blog.electric-cloud.com/
[Prev in Thread] | Current Thread | [Next in Thread] |