[Top][All Lists]

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

Re: Build Rule Race Condition

From: Eric Melski
Subject: Re: Build Rule Race Condition
Date: Tue, 18 Aug 2009 20:56:24 -0700
User-agent: Thunderbird (X11/20090608)

Schuster, Peter wrote:

There is a build rule that is causing a problem because it says that if any of 3 output files are out-of-date compared to a common source file, run a program to process the source file and produce the 3 output files. The simplified rule is as follows:

myfile.a myfile.b myfile.c: myfile.source

                        process $<

process then opens all 3 output files for writing.
> ... trimmed for brevity ...
The ideal solution is for make to link all 3 output files together, so that as soon as it fires the job to process any of the 3, all 3 are marked as “running” and no further jobs are started. Is this possible with make?

I recently wrote an article for CM Crossroads about precisely this topic:

Hope that helps,

Eric Melski
Electric Cloud, Inc.

reply via email to

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