help-make
[Top][All Lists]
Advanced

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

Re: Parallel jobs with order-only prerequisites


From: Steven Simpson
Subject: Re: Parallel jobs with order-only prerequisites
Date: Mon, 13 Oct 2014 08:45:31 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2

Hi Dawid,

On 13/10/14 00:03, Dawid Gosławski wrote:
What is the reason that you are not defining api to be target as well ?

You mean this?:

%.done %.api: %.src
        ...
        touch "$*.done"

If you do that, and make a non-profile change, the module keeps being compiled on each invocation of Make, because the timestamp of %.api is not being updated.


You try to accomplish two tasks in one rule, and this of course will work in serial and not really in the parallel.

There's a relationship between %.done and %.api, which is that %.api is a (potentially non-updating) by-product of building %.done, and that information is needed for parallelism, but it can't be represented using : or :| between them.

However, I just tried adding:

bar.api: | bar.src
baz.api: | baz.src

...and that appears not to break the serial semantics I've managed to get, while making it work in parallel too! I'll have to test it in an actual setting, which differs in two ways:

 * There are multiple source files to list on the RHS.
 * The list is not known until after the first build.

But it looks promising.  I will report back.

Cheers,

Steven


reply via email to

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