Subject: Re: make: making .WAIT recursive
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Todd Vierling <>
List: tech-toolchain
Date: 02/17/2006 10:02:44
On Thu, 16 Feb 2006, der Mouse wrote:

> >>> .WAIT and .BARRIER
> >> But there is no other way to express "neither of these two things
> >> depends on the other, but their builds must not happen
> >> concurrently".
> > if the two things don't depend on each other, then why can't they
> > happen concurrently?
> Typically because they collide over a temporary file or some such
> shared resource.

That's not why NetBSD uses it, however.  It's most often used in the
(horribly broken) separation of libraries' and programs' source trees so
that the libs build before the programs.  The make(1) .WAIT is almost
exclusively used via the implementation of .WAIT in ${SUBDIR}.

What's missing is proper dependency ordering in ${SUBDIR}'s use, and that
doesn't currently exist.  I wrote a really horribly simplistic proof of
concept to implement, e.g.:

SUBDIR+=	libfoo foo:libfoo

and posted it, but I can't find it anymore.  The implication here should be
obvious; "${targ}-foo" should have a dependency on "${targ}-libfoo", so
libfoo is required to do its work first.

-- Todd Vierling <> <> <>