Subject: Re: make: making .WAIT recursive
To: Chuck Silvers <chuq@chuq.com>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: tech-toolchain
Date: 02/13/2006 11:10:23
On Sun, Feb 12, 2006 at 09:52:27PM -0800, Chuck Silvers wrote:
> On Sun, Feb 12, 2006 at 02:43:43PM +0100, Manuel Bouyer wrote:
> > In other words IMHO the problem is more in the makefiles than in
> > make itself.
> 
> most of the cases where we use .WAIT today are trying to express
> dependencies between things built in different directories by
> separate make processes.  the makefile syntax has no way to
> express such things directly, so .WAIT is the approximation
> that we use instead.
> 
> this really is a lack in make itself, and I think that changing
> .WAIT to apply recursively to dependencies is a better way to
> satisfy the intent of our usage of it.
> 
> if we really want to fix this the best way, make would need to evaluate
> the entire dependency graph of everything recursively built by the original
> make invocation all at once (most likely in the same process), so that it
> could consider these dependencies between directories.  then we would never
> need to use .WAIT and the current issue would be moot.

But, still, .WAIT introduce dependancies between targets of the same Makefile,
so I can't see why we can't make these targets depend on each others.
For example, we have in etc/Makefile:
distribution: .PHONY check_DESTDIR .WAIT distrib-dirs

As distrib-dirs depends on check_DESTDIR I don't see why .WAIT is needed here
(check_DESTDIR in this target shouldn't even be needed).

Now, I can see that it could be tricky to get the dependancies right
when a Makefile .includes several other makefile fragments.

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 26 ans d'experience feront toujours la difference
--