Subject: Re: make: making .WAIT recursive
To: None <>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-toolchain
Date: 02/16/2006 03:09:55
>>> .WAIT and .BARRIER
>> But there is no other way to express "neither of these two things
>> depends on the other, but their builds must not happen
>> concurrently".
> if the two things don't depend on each other, then why can't they
> happen concurrently?

Typically because they collide over a temporary file or some such
shared resource.  As a really simple example, I've seen Makefiles do
things like

foo.o bar.o: $*.c
	cc -E $*.c > __tmp.i; hairy-processor __tmp.i; cc -o $@ __tmp.i

in which case building foo.o and bar.o in parallel is likely to collide
over __tmp.i.

I fully agree that it's better to fix such cases so they are
parallel-safe.  While for this example that borders on trivial, it's
not always feasible, especially with some of the more complicated
third-party software.  Consider how ghostscript's build procedure
constructs files by running multiple commands with >> redirection....

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B