I'm trying to pass a variable from my bitbake (.bb) recipe to a Makefile that I have it calling.
In my recipe I have:
export FOO="bar"
When it runs the do_compile()
method I have it calling a Makefile I generated. In the Makefile I tested the variable was set correctly via:
ifeq ($(FOO), "bar")
echo $(FOO) >> ./test.txt
else
echo "Didn't work" >> ./test.txt
endif
When I bake the recipe I just see "Didn't work" in the log. I thought this was very strange because if I had FOO="bar"
in my Makefile and just ran make
, then I would see "bar" printed in the test file. So why didn't it "pass" correctly?
I ran one more test to verify, in my Makefile I only put this line:
echo $(FOO) >> ./always_print.txt
And then after baking the recipe I see bar
printed in my "always_print.txt" file yet I see "Didn't work" printed in test.txt...
Does anyone have a clue what I'm doing wrong here?
The make
language does not use "
as a quoting character, so you're comparing $(FOO)
against "bar"
(quotes included). Just omit the quotes:
ifeq ($(FOO),bar)
...