You can use the $(subst)
command, combined with a little trick to get a variable that has a value of a single space:
p = /usr /usr/share /lib
noop=
space = $(noop) $(noop)
all:
@echo $(subst $(space),:,$(p))
You can use the $(subst)
command, combined with a little trick to get a variable that has a value of a single space:
p = /usr /usr/share /lib
noop=
space = $(noop) $(noop)
all:
@echo $(subst $(space),:,$(p))