On Sat, 2007-01-20 at 17:35 +0100, Dirk Heinrichs wrote: > So if make behaves correctly in the parallel case, does this mean that the > non-parallel case is wrong?
?? 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. 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). -- ------------------------------------------------------------------------------- Paul D. Smith <[EMAIL PROTECTED]> Find some GNU make tips at: http://www.gnu.org http://make.paulandlesley.org "Please remain calm...I may be mad, but I am a professional." --Mad Scientist _______________________________________________ Bug-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-make
