Makefile generic pattern rule — xyzzy-en_US.ext2 from xyzzy.ext0
I can't figure out a way to define a generic pattern rule for the following kind of production with make: require xyzzy-en_US.ext2 from xyzzy.ext0 via xyzzy.ext1 . This works: all: xyzzy-en_US.ext2 # to be compiled from xyzzy.ext0 %.ext1 : %.ext0 # produce xyzzy.ext1 %-en_US.ext2 : %.ext1 # produce xyzzy-en_US.ext2 But how to generalize the locale part of the second rule? Or do I need to generate rules for all different locales? Neither of these work: %-??_??.ext2 : %.ext1 # ... %.ext2 : $(@,%-??_??.ext2,%.ext1) # ... There is no good way to do this with Make (regex handling is high on my