Subject: Re: patches to fix make -j
To: Todd Vierling <email@example.com>
From: James Chacon <jmc@NetBSD.org>
Date: 12/17/2003 21:13:07
On Wed, Dec 17, 2003 at 05:55:49PM -0500, Todd Vierling wrote:
> Proper Makefile dependency ordering has zero need for .WAIT and will work
> properly under -j (provided -j works as advertised). At the time .WAIT was
> being sprinkled all over the place, I offered to fix <bsd.subdir.mk> to
> allow for specification of dependency ordering as an alternative to .WAIT,
> but no one seemed to care.
The only way this works is if
SUBDIRS= a b c
enforce that all of a is built before b or c starts. That effectively reduces
parallelism possibilities as each sub-dir make has to be done sequentially.
The general case we have in sys is 'libsa XXX YYY' where XXX and YYY depend
on libsa being done before they start. Unless each sub-make is fired off
sequentially, you'll lose unless you have otherwise apriori knowledge of
these dependencies that aren't spelled out.