Subject: Re: make: making .WAIT recursive
To: Manuel Bouyer <firstname.lastname@example.org>
From: David Laight <email@example.com>
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
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 Laight: firstname.lastname@example.org