[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: improvements for parallel makes ?
From: |
Alexey Neyman |
Subject: |
Re: improvements for parallel makes ? |
Date: |
Wed, 5 Apr 2006 12:53:17 +0400 |
User-agent: |
KMail/1.6.2 |
Boris,
On Tuesday 04 April 2006 20:29, Boris Kolpackov wrote:
>> I already expressed that the "truly order-only
>> prerequisites" (TOOP), introduced as a part of the Makefile syntax,
>> will indeed solve the problem. But, the necessity to add these
>> prerequisites to each and every rule (including implicit ones) will
>> nearly render this extension unusable.
>
> Could you remind me how is that so? E.g., the following rule with
> .WAIT:
>
> foo: bar .WAIT baz
>
> will be rewritten as
>
> foo: bar baz
> bar: % baz
Ok, let's consider the following makefile fragment:
<<<<<<
local_objects = a.o b.o c.o d.o
all: all-recursive all-local
all-recursive:
$(MAKE) -C subdir all
all-local: % all-recursive
all-local: $(local_objects)
<<<<<<
The intention is clear: the recursive make in subdirectories shall be
finished before local objects are remade. However, with this
makefile, make will behave as follows:
1. make will start a job for "all-recursive" target
2. make will notice that it has spare jobs, and will consider the
target all-local.
3. all-local target has dependencies, and before making all-local
target itself, make will update its dependencies - in parallel with
the running "all-recursive" job.
Hence, one would need to add "all-recursive" target as a TOOP for
$(local_objects). If $(local_objects) have their own prerequisites,
"all-recursive" needs to be added as a TOOP to them, too. Note that
one cannot rely on the builtin rules then, since they don't have such
TOOPs.
Therefore, the patch I suggested uses another approach. If the next
dependency has the "wait" flag set, make does not consider it and the
dependencies further in the list until the jobs already running
complete.
All of these are described in the original message:
http://lists.gnu.org/archive/html/help-make/2005-04/msg00087.html
Regards,
Alexey.
--
Two leaves pull water from the same root.
-- Supox, SC2
- improvements for parallel makes ?, Christophe LYON, 2006/04/03
- Re: improvements for parallel makes ?, Paul D. Smith, 2006/04/03
- Re: improvements for parallel makes ?, Alexey Neyman, 2006/04/04
- Re: improvements for parallel makes ?, Boris Kolpackov, 2006/04/04
- Re: improvements for parallel makes ?, Christophe LYON, 2006/04/04
- Re: improvements for parallel makes ?, Alexey Neyman, 2006/04/04
- Re: improvements for parallel makes ?, Boris Kolpackov, 2006/04/04
- Re: improvements for parallel makes ?,
Alexey Neyman <=
- Re: improvements for parallel makes ?, Boris Kolpackov, 2006/04/06
- Re: improvements for parallel makes ?, Alexey Neyman, 2006/04/06
- Re: improvements for parallel makes ?, Christophe LYON, 2006/04/06
- Re: improvements for parallel makes ?, Alexey Neyman, 2006/04/20
- Re: improvements for parallel makes ?, Paul D. Smith, 2006/04/20
- Re: improvements for parallel makes ?, Alexey Neyman, 2006/04/20
- Re: improvements for parallel makes ?, Paul D. Smith, 2006/04/20
- Re: improvements for parallel makes ?, Christophe LYON, 2006/04/20
- Re: improvements for parallel makes ?, Alexey Neyman, 2006/04/20
- Re: improvements for parallel makes ?, Christophe LYON, 2006/04/21