Subject: Re: make -j and failure modes
To: None <tech-userlevel@NetBSD.org>
From: Luke Mewburn <lukem@NetBSD.org>
Date: 12/13/2003 09:32:12
On Wed, Dec 10, 2003 at 12:53:24PM -0600, James Chacon wrote:
| > Make -j is simply broken (in yet another way) - just avoid it.
| Actually I can't find other ways it's not working correctly (as long
| as proper analysis of your Makefiles has been done and .WAIT's added
| This is fixed via adding '|| exit $?' as Ben suggested so I'll
| probably start reviewing Makefiles for this shortly. In addition
| the man page for make needs a much clearer explanation of the
| implications of -j and command execution (since non-compat mode
| is different than traditional make in this respect with all the
| commands flowing through 1 shell instance).
Why can't this be fixed by using ``|| exit $?\n'' instead of ``\n'' as
the separator for the merged input fed to sh -e when using make -j ?
This would involve less churn of Makefiles; the current bug is being
caused due to an optimization that make -j performs that is dangerous
given the variance in -e semantics in different sh implementations,
and hacking the Makefiles to work around this issue doesn't strike me
as the optimal solution.