Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/arch



On Thu, May 27, 2010 at 09:36:42AM +0200, Alan Barrett wrote:
 > On Thu, 27 May 2010, David A. Holland wrote:
 > > -cleandir distclean: cleanlibdir
 > > +cleandir distclean: .WAIT cleanlibdir
 > 
 > I would have expected .WAIT to be a no-op in this context.  How does
 > "do nothing, wait until you have finished doing nothing, then make
 > cleanlibdir" differ from "make cleanlibdir" ?

Because that's not the only RHS for cleandir. If you have

foo: bar
foo: .WAIT baz

it's the same as

foo: bar .WAIT
foo: baz

or

foo: bar .WAIT baz

It is fragile because it depends on the ordering of declarations and
includes, but it does work.

For example, try this makefile with -j8, with and without the .WAIT:

all: a b c
all: .WAIT d e f g h

a b c d e f g h:
        @echo '>>  $@'
        @sleep 1
        @echo '    $@  >>'


-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index