Subject: Re: non-.WAIT bsd.subdir.mk (was Re: patches to fix make -j)
To: Todd Vierling <tv@duh.org>
From: James Chacon <jmc@NetBSD.org>
List: tech-toolchain
Date: 12/18/2003 10:37:04
On Thu, Dec 18, 2003 at 11:25:56AM -0500, Todd Vierling wrote:
> On Thu, 18 Dec 2003, Todd Vierling wrote:
> 
> : I had, at one time, a patch that let you do something like
> :
> : SUBDIRS=	a b:a c:a d e:b
> :
> : which was indeed parallelizable, and guaranteed that b/c came after a, and e
> : came after b for the operations "all", "depend", "dependall", and
> : "includes".  This was quite useful in such directories as
> : src/gnu/usr.bin/gcc, src/gnu/usr.bin/binutils, src/gnu/libexec/uucp, etc.
> : It also demonstrated well how these things can be expressed as make
> : dependencies rather than the hacky .WAIT turnstile.
> 
> And I found the diff, and updated it to -current; see below.  In more
> detail, you can specify something like
> 
> SUBDIR=		a:d b:c c d:e:b e
> 
> and you will get a guarantee that c builds before b, d builds before a, and
> e and b both build before d, regardless of -j setting.  With parallelism,
> the above will indeed build c and e in parallel before proceeding with their
> dependents.

What about uses of .WAIT not in SUBDIR definitions? See etc/Makefile for
lots of examples for instance. This isn't just a recursive make problem.

James