[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Advanced expansion of prereg pattern?
From: |
Lars Noschinski |
Subject: |
Re: Advanced expansion of prereg pattern? |
Date: |
Thu, 5 May 2005 21:48:23 +0200 |
User-agent: |
mutt-ng 1.5.9i (Linux) |
* Boris Kolpackov <address@hidden> [2005-05-05 11:10]:
> Lars Noschinski <address@hidden> writes:
[...]
> > So I want to compile the .tex files, which depend on the .fig files
> > converted to .eps before.
> >
> > My first try was a rule like the first one below (I know it is not
> > correct, but I think it is clear what I try to achieve):
> >
> > %.pdf: %.tex %/*.eps
> > .....
> >
> > %.eps: %.fig
> > .....
[...]
> Make from CVS (and soon to be released 3.81) can do this but not current
> release (3.80). Meantime you can use $(call), $(eval) and target-specific
> variables to do the trick:
>
> # $1 - directory, e.g., exercise01, exercise02
> #
> define set-eps-deps
> $1: eps := $(patsubst %.fix,%.eps,$(wildcard $1/*.fig))
> endef
>
> exercises := exercise01.tex exercise02.tex ...
>
> $(for e,$(exercises),$(eval $(call set-eps-deps,$(basename $e))))
Hm, I found a similar solution yesterday evening, but your solution using
target-specific variables (which I didn't grok before) is more elegant
than generating a full rule as I did.
Thank you very much.
Lars Noschinski