[Top][All Lists]

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

Re: Inconsistent behaviour when building in parallel

From: Dirk Heinrichs
Subject: Re: Inconsistent behaviour when building in parallel
Date: Sat, 20 Jan 2007 22:22:04 +0100
User-agent: KMail/1.9.5

Am Samstag, 20. Januar 2007 20:49 schrieb Paul Smith:

> No, both are correct.
> In the non-parallel case, make examines the first target and its
> prerequisites and sees that it needs to be rebuilt, so it runs the rule.
> The rule updates the first target and also updates the other targets.
> Next make looks at the second target and its prerequisites and sees that
> it does NOT need to be rebuilt (because it is newer than all the
> prerequisites, since it was just updated).  So it's not rebuilt.  Etc.
> In the parallel case, make does exactly the same thing EXCEPT that
> instead of waiting for the first command to complete it immediately
> checks the second target and, since the first command is not done yet
> and hasn't updated it, make sees that it's still out of date so it runs
> that rule again to update it.

So the left hand doesn't know what the right hand does? I consider this a bad 

> In the parallel case you can't tell exactly what will happen: it depends
> on your system; how busy it is, what order the various jobs are
> scheduled by the OS, how long the command takes to execute, etc.  It
> could work perfectly, or it could be run twice, or more times (if there
> are more than two targets).

That's even worse.

Thank you very much for this explanation.



Attachment: pgpTZUY7Fq8Ti.pgp
Description: PGP signature

reply via email to

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