How to append some text to a variable in makefile?
You need the :=
in place of the recursive =
:
FOO := hello
FOO := $(FOO)_world
$(info FOO=$(FOO))
hello_world
I would say the makefile addsuffix
function is what you are looking for, thus in your case for example:
FOO := hello
FOO := $(addsuffix _world,$(FOO))
However @user218374 was right too and his solution works as well, in this case, but I am pretty sure you might be happy to have a look at these built-in expansion functions relating also to lists of file names!