Subject: make doesn't honour .WAIT in the expected manner
To: None <tech-toolchain@netbsd.org>
From: David Laight <david@l8s.co.uk>
List: tech-toolchain
Date: 01/08/2006 15:28:00
It seems that .WAIT only causes make to wait before executing the
commands of a target, it still executes all the dependencies of the 
target in parallel with the targets before the .WAIT.

So with:

a: b .WAIT c
	echo a done

b:
	sleep 2
	echo b done

c: d
	echo c done

d:
	sleep 1
	echo d done

Where you want the equivalent of 'make b; make c; echo a done' you
actually get 'b' and 'd' running together.

This isn't useful, indeed many of the .WAIT targets in the netbsd
makefiles do not have the desired effect.

In particular bsd.own.mk has:
    depend:         .NOTMAIN realdepend .WAIT subdir-depend
which attempts to cause 'realdepend' to execute before 'subdir-depend'.
The .WAIT effect because the dependants of subdir-depend get run
in parallel with realdepend.

In practise .WAIT is only useful if it forces a wait before the
dependencies of anything that follows are made.

Thoughs/fixes ?

	David

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