【发布时间】:2019-09-19 12:22:50
【问题描述】:
对于下面的示例 Makefile,我期待和输出
预期输出:
x/x_a
x/x_b
x/x_c
x/x_d
代码:
letters= a b c d
default:$(letters)
$(letters):x/x_$(letters)
x/x_$(letters):
echo $@
但我得到的是
echo x/x_a
x/x_a
make: Circular b <- b dependency dropped.
make: Circular c <- b dependency dropped.
make: Circular c <- c dependency dropped.
make: Circular d <- b dependency dropped.
make: Circular d <- c dependency dropped.
make: Circular d <- d dependency dropped.
echo d
d
echo c
c
echo b
b
不知道是什么原因
- 循环依赖。在我看来它是线性的。
- 打印 b,c,d 而不是 x/x_b,x/x_c,x/x_d
【问题讨论】: