On Wed, Jun 9, 2010 at 11:19 AM, Mike Shal <mar...@gmail.com> wrote:

> I don't know if this helps or not, but you can separate the command
> from the dependency listing:

    Changing the separator to . and using $(suffix) does make things
cleaner.  Good call.

[8<]

     This is where it falls apart for me:

> # generate and include these?
> $(FOO_FNT): foo.otf
> $(BAR_FNT): bar.otf

    I can indeed generate them externally, and I'm fairly sure I could
even generate them "internally" in the recursive example I gave, with
some modifications:

-- makefile --

# assuming name.size.fnt

%.fnt: FORCE
  @make -sC font.make -DSIZE=$(subst .,,$(suffix $*)) -DDEP=$(basename
$*).otf $@

-- font.make --

%.fnt: $(DEP)
  @fontgen -p $(SIZE) $< $@

    This does fix the dependency relationship and does what I need it
to, but (as with using $(eval)) the method feels inelegant.  It feels
like I'm working around make rather than working with it, and whenever
I find myself fighting my tools I suspect I'm doing something wrong.

                                                 Todd.

-- 
 Todd Showalter, President,
 Electron Jump Games, Inc.

_______________________________________________
Help-make mailing list
Help-make@gnu.org
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to