title: How would I pass a variable from a bitbake recipe to a makefile?
body: <p>I'm trying to pass a variable from my bitbake (.bb) recipe to a Makefile that I have it calling. </p>
  
  <p>In my recipe I have:</p>
  
  <pre><code>export FOO="bar"
  </code></pre>
  
  <p>When it runs the <code>do_compile()</code> method I have it calling a Makefile I generated. In the Makefile I tested the variable was set correctly via:</p>
  
  <pre><code>ifeq ($(FOO), "bar")
      echo $(FOO) &gt;&gt; ./test.txt
  else
      echo "Didn't work" &gt;&gt; ./test.txt
  endif
  </code></pre>
  
  <p>When I bake the recipe I just see "Didn't work" in the log. I thought this was very strange because if I had <code>FOO="bar"</code> in my Makefile and just ran <code>make</code>, then I would see "bar" printed in the test file. So why didn't it "pass" correctly?</p>
  
  <p>I ran one more test to verify, in my Makefile I only put this line:</p>
  
  <pre><code>echo $(FOO) &gt;&gt; ./always_print.txt
  </code></pre>
  
  <p>And then after baking the recipe I see <code>bar</code> printed in my "always_print.txt" file yet I see "Didn't work" printed in test.txt...</p>
  
  <p>Does anyone have a clue what I'm doing wrong here?</p>