[Top][All Lists]

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

RE: Build Rule Race Condition

From: Schuster, Peter
Subject: RE: Build Rule Race Condition
Date: Wed, 19 Aug 2009 09:28:59 -0700

Thanks Eric, great article!

My situation is actually even more complicated because I forgot to
mention that the system already defines a general for all .a, .b, and .c

        %.a %.b %.c: %.source
                process $<

The problem is that there are a couple "special" .source files that need
to have an extra intermediate step that produces a .temporary file,
leading to the rule in my original email:

        myfile1.a myfile1.b myfile1.c: myfile1.temporary
                process myfile1.temporary
        myfile2.a myfile2.b myfile2.c: myfile2.temporary
                process myfile2.temporary

and so on for 14 special case files.

However because they've set it up so that all these special case files
have a naming convention of <name>_snp.source, it looks like I can still
define a new pattern rule of

        %_snp.a %_snp.b %_snp.c: %_snp.temporary
                process $<

This works, but only if I define the special case rule before the
generic rule, so this seems like hackery to me.  Is this "safe" in the
long run, or do I need to look for a better solution?


-----Original Message-----
From: Eric Melski [mailto:address@hidden 
Sent: Tuesday, August 18, 2009 8:56 PM
To: Schuster, Peter
Cc: address@hidden
Subject: Re: Build Rule Race Condition

I recently wrote an article for CM Crossroads about precisely this

Hope that helps,

Eric Melski
Electric Cloud, Inc.

This email has been scanned by the MessageLabs Email Security System.
For more information please visit 

reply via email to

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