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.


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to