tags:

views:

42

answers:

1

hello.

is a possible to do something like this, without shell command:

CXX_MODULES += $(patsubst %, %/%.cpp, $(LIBRARIES))

notice double replacement which does not work (only first replacement happens)

after some tinkering I came up with

$(join $(LIBRARIES), $(patsubst %, /%.cpp, $(LIBRARIES)))

Thank you

+1  A: 

I like your solution, but this also works

expand = $(1)/$(1).cpp

CXX_MODULES += $(foreach x, $(LIBRARIES), $(call expand,$(x)))
Beta