[oe-commits] Otavio Salvador : toolchain-scripts.bbclass: Allow sourcing of subscript for environment
git at git.openembedded.org
git at git.openembedded.org
Fri Oct 10 09:39:46 UTC 2014
Module: openembedded-core.git
Branch: master-next
Commit: 457291f2ca084d1f43c0cca2175b448a22761887
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=457291f2ca084d1f43c0cca2175b448a22761887
Author: Otavio Salvador <otavio at ossystems.com.br>
Date: Thu Oct 9 18:53:13 2014 -0300
toolchain-scripts.bbclass: Allow sourcing of subscript for environment
Sometimes we require extra environment settings to be available on the
environment for proper SDK work. This were done, in past, using
'_append' tasks however with the split of the environment in a
canadian package this has been broken.
The easier and more flexible solution is to use environment subscripts
which are sources by the main script. These are now looked at:
$OECORE_NATIVE_SYSROOT/environment-setup.d/*.sh
and sourced.
Signed-off-by: Otavio Salvador <otavio at ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/classes/toolchain-scripts.bbclass | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
index 6cc8eba..11ffbe5 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -72,6 +72,16 @@ toolchain_shared_env_script () {
echo 'export OECORE_SDK_VERSION="${SDK_VERSION}"' >> $script
echo 'export ARCH=${ARCH}' >> $script
echo 'export CROSS_COMPILE=${TARGET_PREFIX}' >> $script
+
+ cat >> $script <<EOF
+
+# Append environment subscripts
+if [ -d "\$OECORE_NATIVE_SYSROOT/environment-setup.d" ]; then
+ for envfile in \$OECORE_NATIVE_SYSROOT/environment-setup.d/*.sh; do
+ source \$envfile
+ done
+fi
+EOF
}
#we get the cached site config in the runtime
More information about the Openembedded-commits
mailing list