help-make
[Top][All Lists]
Advanced

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

Re: Make question


From: John Calcote
Subject: Re: Make question
Date: Fri, 05 Feb 2010 09:57:39 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.7) Gecko/20100111 Thunderbird/3.0.1

Darn it Eric! I keep forgetting about your site. I'm going to have to put a yellow sticky note on my computer so I remember to go read this stuff. These are GREAT articles.

Thanks,
John

On 2/5/2010 9:40 AM, Eric Melski wrote:
Canham, Timothy K (316C) wrote:
We have code generation, and we have  a rule like this:

fileout1.txt fileout2.txt fileout3.txt: filein.txt
	filegen.sh filein.txt

We run a parallel make (make -j x), and what I've found is that the rule often gets invoked three times, causes files to overwrite each other.  

...

Is there a way to specify the rule so that the rule is only invoked once in a parallel make, or is there a technique that accomplishes the same thing?
  

Have a look at my article "Rules with Multiple Outputs in GNU Make" at CM Crossroads:
http://cmcrossroads.com/ask-mr-make/12908-rules-with-multiple-outputs-in-gnu-make
That covers the various techniques for solving this problem and the pros and cons of each.

HTH,

Eric Melski
Electric Cloud, Inc.
http://blog.electric-cloud.com/

_______________________________________________ Help-make mailing list address@hidden http://lists.gnu.org/mailman/listinfo/help-make


reply via email to

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