Subject: Re: make -j and failure modes
To: Alan Barrett <>
From: Greywolf <>
List: tech-userlevel
Date: 12/11/2003 09:18:27
Thus spake Alan Barrett ("AB> ") sometime Today...

AB> On Thu, 11 Dec 2003, Robert Elz wrote:
AB> > That is, in normal arithmetic, if someone told you that
AB> > 	4 + 3
AB> > could somehow do something different from
AB> > 	(4 + 3)
AB> > you'd be amazed.
AB> Yes.  And, for similar reasons, I'd be amazed if somebody said that
AB> 	sh -e -c 'false; echo foo'
AB> and
AB> 	sh -e -c '(false); echo foo'
AB> should behave differently....

Thank you, that's where I was headed next.  I also think that the POSIX
behaviour really does violate the POLS, as you stated in another message.

AB> What I have learned from this discussion is that the behaviour of sh -e
AB> is either so vaguely defined or so counter-intuitively defined or so
AB> inconsistently implemented that portable scripts and makefiles should
AB> not rely on it.

Unfortunately, there is no sane way to get 'make' to build stuff otherwise.
Much rewriting would be needed in existing makefiles, as large compound
in-makefile commands would then continue through their execution unless
'exit $?' are put in there all over the place; the single line commands
would be fine because make could simply reap the status from the child
and make its own decision as to whether or not to continue based on
-i or a prepended '-'...

AB> --apb (Alan Barrett)

Hmmm.  Maybe make does need rewhacking.  I guess it wouldn't really
hurt given that if we're doing anything NetBSD on another platform,
we build and supply our own make anyway.

The trick is going to be ensuring that whatever we do at the command-
simplistic level isn't going to break other platforms' make(1)s.