FOO = a b
BAR = `for i in $(FOO); do echo $$i.x; done`
demo:
echo $(BAR)
outputs this:
echo `for i in a b; do echo $i.x; done`
a.x b.x
I was expecting it to output
echo a.x b.x
a.x b.x
I need the backticks to be evaluated BEFORE the variable BAR is assigned, not after. How do I do this?
The reason is that I'm going to use BAR thusly:
demo: $(BAR)
...
So if there's a better way to get the transformed FOO into the dependency list of "demo:" then that'll do.
Thanks