help-make
[Top][All Lists]
Advanced

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

Re: .DELETE_ON_ERROR & error propagation through multi-command


From: Robert
Subject: Re: .DELETE_ON_ERROR & error propagation through multi-command
Date: Tue, 08 Nov 2011 15:27:20 +0100
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20110928 Firefox/7.0.1 SeaMonkey/2.4.1

Paul Smith wrote:
With UNIX shells there are lots of ways to manage this.  First you don't
need the "cd .." at all because the working directory is a per-process
feature: changing directories in a sub-shell doesn't impact the parent
shell.  I'm aware that Windows may not behave that way.

Also in general for UNIX shell scripts in recipes you want to separate
all the commands with "&&", not ";", which ensures that if one fails the
command fails immediately with that error.

I'm not strong in Windows scripting so I can't say the best way to solve
your problem.  Presumably you want to preserve the exit code of the
python script, then do the "cd ..", then exit from the recipe line using
the saved exit code.


thanks. The method with && seems to work here on Windows too. MingW GNU make seems to use a sort of MingW sh .
Well, I see Windows cmd.exe shell also understands the &&

Robert




reply via email to

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