小编Bor*_*aut的帖子

makefile中多行列表中的注释

我想有类似的东西

BROKEN_THINGS = \ 
  thing1 \ # thing1 is completely broken
  thing2 \ # thing2 is broken too, see BUG-123
Run Code Online (Sandbox Code Playgroud)

看起来[g] make是不可能的.

我最终使用warning函数(这是有效的,因为$(warning X)总是返回空字符串):

BROKEN_THINGS = \
  thing1 $(warning "thing1 is completely broken") \
  thing2 $(warning "thing2 is broken too, see BUG-123") \
Run Code Online (Sandbox Code Playgroud)

最后一个并不理想,因为警告会使make的输出变得混乱(并且也是warning特定于gmake的).

有没有更好的解决方案来记录长长的多行列表?

makefile gnu-make

2
推荐指数
1
解决办法
1097
查看次数

标签 统计

gnu-make ×1

makefile ×1