我想要像
这样的东西BROKEN_THINGS = \
thing1 \ # thing1 is completely broken
thing2 \ # thing2 is broken too, see BUG-123
使用[g] make看起来这是不可能的。
我最终使用warning
函数(这可行,因为$(warning X)
总是返回空字符串):
BROKEN_THINGS = \
thing1 $(warning "thing1 is completely broken") \
thing2 $(warning "thing2 is broken too, see BUG-123") \
最后一个并不理想,因为警告会使make的输出变得混乱(而且warning
也是特定于gmake的。)
是否有更好的解决方案来记录长长的多行列表?
答案 0 :(得分:7)
您可以使用:
BROKEN_THINGS =
BROKEN_THINGS += thing1 # thing1 is completely broken
BROKEN_THINGS += thing2 # thing2 is broken too, see BUG-123