In my makefile I have a variable with a list of directories, like this:
DIRS = /usr /usr/share/ /lib
Now, I need to create PATH variable fr
You can use the $(subst) command, combined with a little trick to get a variable that has a value of a single space:
$(subst)
p = /usr /usr/share /lib noop= space = $(noop) $(noop) all: @echo $(subst $(space),:,$(p))
Hope that helps,
Eric Melski