I would like to perform expansion on a variable that might contain references to other variables. I'll illustrate with an example:
a = 1
b = 2
c = 3
X = foo bar baz $(foreach x, a b c, $$(value $(x))) qux
$(info $(X))
If you run this makefile, it prints:
foo bar baz $(value a) $(value b) $(value c) qux
I'd like to know how to expand it so that I get:
foo bar baz 1 2 3 qux
I can do the following:
$(eval X = $(X))
To get close to what I want, however this requires me to reassign the variable again. Also, I'm "eval"ing whatever was in the whole variable which may not be what I want. I'd like to be able to do something like $(expand X) and have the resulting text.