Actually on further investigation, this isn't completely working. If I delete the .temporary file, make falls through to the general rule. If I force it to create the .temporary file, make successfully follows the special case rule.
-----Original Message----- From: Greg Chicares [mailto:[email protected]] Sent: Wednesday, August 19, 2009 10:03 AM To: Schuster, Peter; [email protected] Subject: Re: Build Rule Race Condition On 2009-08-19 16:28Z, Schuster, Peter wrote: > > %.a %.b %.c: %.source > process $< [...special cases:] > 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? It's safe because the 'make' manual documents it: | The order in which pattern rules appear in the makefile is important | since this is the order in which they are considered. Of equally | applicable rules, only the first one found is used. Of course, you might like to add comments to your makefile warning maintainers not to rearrange pattern rules, if you see a risk there. ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
