source an environment file in bitbake recipe.
Hi,
Is there any way by which I can use the source command inside a bitbake recipe for example if I need to source some environment file before compiling. source <filename> doesn't seem to work
Will the command . <filename> work
What exactly I need to inherit for source command to work Thanks
Kamal Pandey
Quoted 6 lines · Kamal
Hi,
Is there any way by which I can use the source command inside a bitbake recipe for example if I need to source some environment file before compiling. source <filename> doesn't seem to work
Will the command . <filename> workWhat exactly I need to inherit for source command to work
I ran into something similar in a Makefile. There the problem was that the default sub shell used is /bin/sh and does not support the "source" command. Solution for the Makefile I used is like:
SHELL=/bin/bash
MY_VAR = $(shell source func_defs.sh && call_func 1 2)
So maybe do something like (untested):
bash -c 'source source func_defs.sh && call_func 1 2'
in the bitbake recipe. You obviously depend on bash-native for that recipe.
Hope this helps,
-- Bas.