On Mon, Jul 14, 2008 at 10:46 PM, Martin d'Anjou <[EMAIL PROTECTED]> wrote:
> Hello, > > Can someone explain why the remote1 and the remote2 targets respond > differently to passing the -n switch in the following makefile? > > $ cat makefile > remote=localhost > remote1: > ssh $(remote) "cd $(PWD) && $(MAKE) -f makefile this" > remote2: > ssh $(remote) "cd $(PWD) && make -f makefile this" > this: > @echo This is done! > > $ make remote1 -n > ssh localhost "cd /home/me && make -f makefile this" > This is done! > $ make remote2 -n > ssh localhost "cd /home/me && make -f makefile this" > $ > > What I do not understand is why "remote1" is built even though I pass -n? > This is documented. See GNU Make Manual section 5.7.1: "Command lines containing MAKE are executed normally despite the presence of a flag that causes most commands not to be run". David Boyce
_______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
