Joining elements of a list in GNU Make

后端 未结 3 379
后悔当初
后悔当初 2021-01-01 12:33

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

3条回答
  •  耶瑟儿~
    2021-01-01 12:46

    You use ':' as separator, so you are on Linux. Consider using bash tool chain to replace continuous spaces by single colon

    PATH := $(shell echo $(DIRS) | sed "s/ \+/:/g")
    

提交回复
热议问题