Subject: toolchain/20828: make: .WAIT doesn't work if macro expansion needed.
To: None <gnats-bugs@gnats.netbsd.org>
From: None <sjg@crufty.net>
List: netbsd-bugs
Date: 03/20/2003 18:06:35
>Number: 20828
>Category: toolchain
>Synopsis: make: .WAIT doesn't work if macro expansion needed.
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: sjg
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Mar 20 18:07:01 PST 2003
>Closed-Date:
>Last-Modified:
>Originator: Simon J. Gerraty
>Release: NetBSD 1.6_STABLE
>Organization:
Zen Programming...
>Environment:
System: NetBSD void.crufty.net 1.6_STABLE NetBSD 1.6_STABLE (CRUFTY) #0: Sun Nov 10 16:37:28 PST 2002 root@void.crufty.net:/j/obj/sys/compile/CRUFTY i386
Architecture: i386
Machine: i386
>Description:
Given the makefile below, make -j4 ok and make -j4 maybe
will correctly wait for three and six to complete before doing
ok-fin, but make -j4 not, will run not-fin in parallel
with three and six.
one two three four:
@echo Start $@; sleep 6; echo Finished $@
five six seven ok-fin not-fin:
@echo Start $@; sleep 3; echo Finished $@
ok: three six .WAIT ok-fin
not: three six .WAIT $@-fin
MAYBE=ok-fin
maybe: three six .WAIT ${MAYBE}
This is with -current make as of today.
For a laugh try:
$ make -f /homes/sjg/make-tests/jobs-wait -j4 maybe not ok
--- three ---
--- six ---
--- not-fin ---
--- three ---
Start three
--- six ---
Start six
--- not-fin ---
Start not-fin
--- six ---
Finished six
--- not-fin ---
Finished not-fin
--- three ---
Finished three
--- ok-fin ---
Start ok-fin
Finished ok-fin
$
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: