【发布时间】:2013-03-01 16:46:01
【问题描述】:
我正在尝试将我的 bitbake (.bb) 配方中的变量传递给我让它调用的 Makefile。
在我的食谱中,我有:
export FOO="bar"
当它运行 do_compile() 方法时,我让它调用我生成的 Makefile。在我测试的 Makefile 中,变量是通过以下方式正确设置的:
ifeq ($(FOO), "bar")
echo $(FOO) >> ./test.txt
else
echo "Didn't work" >> ./test.txt
endif
当我烘焙食谱时,我只在日志中看到“不起作用”。我觉得这很奇怪,因为如果我的 Makefile 中有 FOO="bar" 并运行 make,那么我会在测试文件中看到“bar”。那么为什么它没有正确“通过”呢?
我又运行了一个测试来验证,在我的 Makefile 中我只放了这一行:
echo $(FOO) >> ./always_print.txt
然后在烘焙食谱后,我看到bar 打印在我的“always_print.txt”文件中,但我看到“没有工作”打印在 test.txt...
有人知道我在这里做错了什么吗?
【问题讨论】:
标签: makefile recipe openembedded bitbake