Assume the following files are in the same directory as the makefile:
01.1.dot
01.2.dot
02.1.dot
03.1.dot
03.2.dot
03.3.dot
That means we have files of the form [0-9][0-9].[0-9].dot
Furthermore, the makefile contains the following target:
%.dot.tex: %.dot
dot2tex <...>
Now I would like to create a target which depend on files of the form [0-9][0-9].tex and they should also depend on all files of the form [0-9][0-9].*.dot.tex, such that the first two digits match. For example, make 03.pdf
should depend on 03.tex
, 03.1.dot.tex
, 03.2.dot.tex
and 03.3.dot.tex
. I came up with the following:
%.pdf: %.tex $(addsuffix .tex,$(wildcard %.*.dot))
@echo $?
pdflatex <...>
However, the percentage is not evaluated in the wildcard-function. Does someone have an idea how to solve this?