|
From: | Eric Melski |
Subject: | Re: .ONESHELL enhancement? |
Date: | Wed, 23 Sep 2009 10:52:15 -0700 |
User-agent: | Thunderbird 2.0.0.23 (X11/20090817) |
David Boyce wrote:
On Wed, Sep 23, 2009 at 1:43 AM, Eric Melski <address@hidden> wrote: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.True - but are you imagining or suggesting? I don't think it's likely that make will be changed to _actually_ write its recipes to a temp file (though what do I know, I'm just an occasional lurker). And if you don't use a temp file you have the command line problem (sh -c vs perl -e vs ???).
I'm suggesting that this is how .ONESHELL ought to be implemented. I don't see much benefit from your alternative proposal except for your build auditor use case, but if we could use an arbitrary interpreter for command recipes -- wow! The possibilities are very exciting, imho. A feature like this might have obviated the creation of tools like Scons, for example.
This wouldn't work with the "concatenate with &&" proposal.Yes, but the "concatenate with &&" proposal seems to have devolved into the "don't bother splitting on newlines" proposal anyway, so these unfortunate assumptions about the value of $(SHELL) go away.
True. Note though that writing the recipe to a temp file and invoking it with "$(SHELL) tmpfile" would satisfy both our goals, and I think the worry about creating a temp file for each target is overblown.
Cheers, Eric Melski http://blog.electric-cloud.com/
[Prev in Thread] | Current Thread | [Next in Thread] |