【发布时间】:2015-04-28 18:27:15
【问题描述】:
我正在实现一个 buildroot 包 foo,它不能与特定的其他包 bar 一起包含。我试图通过在各自的Config.in-files 中写入depends on-statements 来定义包互斥。
在foo/Config.in:
config BR2_PACKAGE_FOO
depends on !BR2_PACKAGE_BAR
...
在bar/Config.in:
config BR2_PACKAGE_BAR
depends on !BR2_PACKAGE_FOO
...
这导致 make menuconfig 行为异常并给出以下错误消息:
package/foo/Config.in:1:error: recursive dependency detected!
package/foo/Config.in:1: symbol BR2_PACKAGE_FOO depends on BR2_PACKAGE_BAR
package/bar/Config.in:1: symbol BR2_PACKAGE_BAR depends on BR2_PACKAGE_FOO
声明这种互斥依赖的正确方法是什么?
【问题讨论】: