tinderbox information.

Jim Gettys release-wranglers@freedesktop.org
Wed Mar 10 15:13:35 PST 2004


On Tue, 2004-03-09 at 16:55, John Dennis wrote:
> On Tue, 2004-03-09 at 16:03, Jim Gettys wrote:
> > make -k always returns success.  So status can't be used if
> > one wants to do -k builds.  So I had to change it to do -k builds.
> 
> Are you sure about this?

No, I'm not sure anything I do in perl seems often mysterious.

>
>  Last week when you asked about adding -k I
> wondered about make's return status and looked the documentation, I
> didn't find an answer, but I assumed it would do the logical thing,
> which is if any command returns non-zero the final exit status is
> non-zero.
> 
> To test this I created the following Makefile:
> 
> all: one two
> 
> one:
> 	sh -c "exit 1"
> 
> two:
> 	sh -c "exit 0"
> 
> 
> then I tried a make -k, for instance:
> 
> $ make -k; echo $?
> sh -c "exit 1"
> make: *** [one] Error 1
> sh -c "exit 0"
> make: Target `all' not remade because of errors.
> 2
> 
> Note, you get the non-zero exit status even if the last command
> succeeded. Try various combinations of exit values for targets one and
> two and you'll see it always does the right thing.
> 
> Granted, this is with GNU make, but I would expect other makes to have
> the same behavior. Are you seeing something different?
> 

I may have screwed up the test for the return status.  I'll
experiment some more this afternoon.
                         - Jim

-- 
Jim Gettys <Jim.Gettys@hp.com>
HP Labs, Cambridge Research Laboratory





More information about the release-wranglers mailing list