[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Pulling parts from a filename.
From: |
Todd Showalter |
Subject: |
Re: Pulling parts from a filename. |
Date: |
Wed, 9 Jun 2010 12:14:36 -0400 |
On Wed, Jun 9, 2010 at 11:19 AM, Mike Shal <address@hidden> 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.