Subject: Re: make: making .WAIT recursive
To: Manuel Bouyer <bouyer@antioche.eu.org>
From: David Laight <david@l8s.co.uk>
List: tech-toolchain
Date: 02/13/2006 22:17:51
On Mon, Feb 13, 2006 at 11:10:23AM +0100, Manuel Bouyer wrote:
> 
> 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).

That is actaully the crux of the problem.
    a: b .WAIT c
    c: d
ends up being equivalent to
    a: b c
    c: b d
and nothing stops make building 'b' and 'd' at the same time.

However there are many cases where you need to have build 'b' before
'c' can build, but working out whether to build 'b' is expensive, and
you need to build 'c' much more often.
Then the makefiles needs three targets that:
1) builds just 'b'
2) builds 'c' assuming that 'b' is correctly made
3) builds both 'b' and 'c'

The target for '3' is the one that causes grief.

	David

-- 
David Laight: david@l8s.co.uk