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: Alejandro Colomar
Subject: Re: Doubts about .WAIT and .NOTPARALLEL (was: GNU Make 4.4 released!)
Date: Mon, 31 Oct 2022 13:46:59 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0

Hi Eddy,

On 10/31/22 13:42, Edward Welbourne wrote:
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,

Ahh, sure, that's right.

However, I don't see why this would be beneficial. Why would A need to be built before B, if there's no dependency between them? I think this is hiding some kind of missing dependency. Maybe this is a workaround for not having post-requisites yet?

Cheers,

Alex

--
<http://www.alejandro-colomar.es/>

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

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