On Mon, 2019-09-02 at 20:48 +0530, nikhil jain wrote:
> So currently in my remote execution design these 2 commands execute
> on different host.
> 
> So, does ONESHELL will make these 2 commands on the same host ?

Well, I don't know how your remote execution design works.

However, .ONESHELL tells make to invoke the entire recipe in a single
shell invocation so I assume that will cause them all to be invoked on
a single remote host, yes.

See:

https://www.gnu.org/software/make/manual/html_node/One-Shell.html


Note, though, that this can break recipes if they are written in such a
way that they expect each line to be invoked in a separate shell.  For
one simple example:

  foo:
          cd foo && echo in foo
          cd bar && echo in bar

will work very differently with and without .ONESHELL.

More discussion is in the manual, above.

If your makefiles have these assumptions built into their recipes, and
you can't change them, you may not be able to take advantage of this.


_______________________________________________
Help-make mailing list
Help-make@gnu.org
https://lists.gnu.org/mailman/listinfo/help-make

Reply via email to