Subject: bin/32594: make doesn't honour .WAIT in the expected manner
To: None <,>
From: None <>
List: netbsd-bugs
Date: 01/22/2006 10:10:00
>Number:         32594
>Category:       bin
>Synopsis:       make doesn't honour .WAIT in the expected manner
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jan 22 10:10:00 +0000 2006
>Originator:     David Laight
>Release:        NetBSD 3.99.15
Architecture: All
Machine: All
	Makefiles use .WAIT in order to build a set of items in series
	without resorting to submakes.  However make doesn't apply the
	.WAIT recursively and will build the dependancies of the second
	target before the first one completes.
	This is not usually what is required.
	Given the makefile:
a: b .WAIT c
	echo a done
	echo b started; sleep 2; echo b done
c: d
	echo c done
	echo d started; sleep 1; echo d done

	You get 'b' and 'd' running in parallel, 'c' itself isn't run until
	'b' finishes.

	Many of the NetBSD system build makefiles fail for this reason.
	The obvious cases are where 'c' is a .PHONY target with no commands.
	(eg the .WAIT in the 'snap_kern: xxx' line in src/etc/Makefile)
	Not easy...