bug-make
[Top][All Lists]
Advanced

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

Re: Doubts about .WAIT and .NOTPARALLEL (was: GNU Make 4.4 released!)


From: Edward Welbourne
Subject: Re: Doubts about .WAIT and .NOTPARALLEL (was: GNU Make 4.4 released!)
Date: Mon, 31 Oct 2022 12:42:00 +0000

On 10/31/22 08:01, Paul Smith wrote:
>> * New feature: The .WAIT special target
>>    If the .WAIT target appears between two prerequisites of a target, then
>>    GNU Make will wait for all of the targets to the left of .WAIT in the list
>>    to complete before starting any of the targets to the right of .WAIT.
>>    This feature is available in some other versions of make, and it will be
>>    required by an upcoming version of the POSIX standard for make.
>>    Different patches were made by Alexey Neyman <alex.neyman@auriga.ru> 
>>(2005)
>>    and Steffen Nurpmeso <steffen@sdaoden.eu> (2020) that were useful but the
>>    result is a different implementation (closer to Alexey's idea).

Alejandro Colomar (Monday, October 31, 2022 11:06) replied:
> I'm curious: what is .WAIT made for?  Isn't it just a workaround for
> broken dependencies?

No.

> I mean, considering the following example:
>
>      all: one two .WAIT three
>      one two three: ; @sleep 1; echo $@
>
> It's the same as if it was written as
>
>      all: one two three
>      three: one two
>      one two three: ; @sleep 1; echo $@
>
> Isn't it?

Only from the point of view of make all; try make three and you'll see
the difference.

If you make three with the first make file, it'll take one second and
just echo three.  Passing -j 37 will make no difference.  If you make
three with the second make file, it'll take at least two seconds (three
with -j1) and output one and two (in some order) then three.

If you make all with the either makefile, it'll behave like make three
with the second makefile, but differently from make three with the first
makefile.

If any other targets depend on three, they're likewise changed by the
second makefile, compared to the first,

        Eddy.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]