0
列出一系列最终以逗号分隔的源文件的最简单方法是什么?如何在makefile中列出源代码?
我的makefile的知识贫乏,所以我写了什么我使用伪代码之后:
sources = array(
'my/file1',
'my/file2',
//...
'my/file30'
)
executable -source=${implode(',', sources)}
列出一系列最终以逗号分隔的源文件的最简单方法是什么?如何在makefile中列出源代码?
我的makefile的知识贫乏,所以我写了什么我使用伪代码之后:
sources = array(
'my/file1',
'my/file2',
//...
'my/file30'
)
executable -source=${implode(',', sources)}
与感谢解决了:Create comma-separated lists in GNU Make
sources = my/file1 \
my/file2 \
my/file3
null :=
space := $(null) #
comma := ,
FULL_SOURCES := $(subst $(space),$(comma),$(strip $(sources)))