On 6/9/10, Todd Showalter <t...@electronjump.com> wrote: > On Wed, Jun 9, 2010 at 4:46 AM, Oleksandr Gavenko <gave...@bifit.com.ua> > wrote: > > > FOO_FNT = foo_14.fnt foo_13.fnt foo_10.fnt > > BAR_FNT = bar_12.fnt bar_9.fnt > > > > FNT = $(FOO_FNT) $(BAR_FNT) > > > > all: $(FNT) > > > > $(FOO_FNT): foo_%.fnt: foo.otf > > fontgen -f $* $< $@ > > > > $(BAR_FNT): bar_%.fnt: bar.otf > > fontgen -f $* $< $@ > > > Thanks, but this doesn't quite solve the problem; I've already > got something akin to that in my current makefile. What I'm trying to > determine is if there's a way I can (sanely) unify the $(FOO_FNT) and > $(BAR_FNT) rules, so I don't have to add another one for $(BAZ_FNT) > and $(QUUX_FNT) and so on somewhere down the road. What I want is a > rule for which the target is $(FNT).
I don't know if this helps or not, but you can separate the command from the dependency listing: FOO_FNT = foo.14.fnt foo.13.fnt foo.10.fnt BAR_FNT = bar.12.fnt bar.9.fnt FNT = $(FOO_FNT) $(BAR_FNT) all: $(FNT) $(FNT): @echo fontgen -p $(subst .,,$(suffix $(basename $@))) $< $@ # generate and include these? $(FOO_FNT): foo.otf $(BAR_FNT): bar.otf You might then be able to generate the foo.14.fnt: foo.otf relation and include it as a separate makefile (like how you would generate and include a .d file for C programs). -Mike _______________________________________________ Help-make mailing list Help-make@gnu.org http://lists.gnu.org/mailman/listinfo/help-make