Subject: make doesn't honour .WAIT in the expected manner
To: None <firstname.lastname@example.org>
From: David Laight <email@example.com>
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.
a: b .WAIT c
echo a done
echo b done
echo c done
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.
David Laight: firstname.lastname@example.org