I want to write something like regex:
SRC:=\"a.dat.1 a.dat.2\"
$(SRC): %.dat.%: (\\\\1).rlt.(\\\\2)
dat2rlt $^ $@
so that
For the limited example you gave, you can use a pattern with one %
.
SRC := a.dat.1 a.dat.2
${SRC}: a.dat.%: a.rlt.%
dat2rlt $^ $@
$*
in the recipe will expand to whatever the %
matched."
s around your original macro are definitely wrong..SECONDEXPANSION
in the manual for more complicated stuff (or over here).