Makefile patsubs double replacement

Posted by aaa on Stack Overflow See other posts from Stack Overflow or by aaa
Published on 2010-06-10T02:00:39Z Indexed on 2010/06/10 2:22 UTC
Read the original article Hit count: 202

Filed under:

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

© Stack Overflow or respective owner

Related posts about makefile