bug-make
[Top][All Lists]
Advanced

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

Re: Prioritizing non-dependent targets in parallel make


From: Paul Smith
Subject: Re: Prioritizing non-dependent targets in parallel make
Date: Thu, 24 Dec 2009 10:16:07 -0500

On Thu, 2009-12-24 at 01:08 -0800, tom honermann wrote:
> There are many valid orders in which the targets can be built.  When make
> is invoked with the parallel execution (-j) option, the order in which the
> non-dependent targets are scheduled has a significant impact on the total
> run time.

You can already completely control the order in which targets are
invoked, even when using -j.

At all times, make will try to build prerequisites starting with the
first one in the prerequisite list, and continuing in order to the last
one in the list.

Invoking a parallel make does not change this algorithm, the ONLY thing
it does is control how many jobs can be "in flight" at the same time.

So, if you list your prerequisites in order with the longest ones first
and the shortest ones last, then you will get the distribution you want.





reply via email to

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