All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] toolchain-scripts.bbclass: Allow sourcing of subscript for environment
@ 2014-10-09 21:53 Otavio Salvador
  2014-10-09 21:53 ` [PATCH 2/2] meta-toolchain-qt: Fix environment population Otavio Salvador
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Otavio Salvador @ 2014-10-09 21:53 UTC (permalink / raw)
  To: OpenEmbedded Core Mailing List; +Cc: Otavio Salvador

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@ossystems.com.br>
---
 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
-- 
1.7.10.4



^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-10-10 13:18 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-09 21:53 [PATCH 1/2] toolchain-scripts.bbclass: Allow sourcing of subscript for environment Otavio Salvador
2014-10-09 21:53 ` [PATCH 2/2] meta-toolchain-qt: Fix environment population Otavio Salvador
2014-10-09 23:27 ` [PATCH 1/2] toolchain-scripts.bbclass: Allow sourcing of subscript for environment Mark Hatle
2014-10-10  0:41   ` Otavio Salvador
2014-10-10  0:53     ` Mark Hatle
2014-10-10 10:36       ` [PATCH] toolchains-scripts: Add support for target environment scripts Richard Purdie
2014-10-10 12:31         ` Otavio Salvador
2014-10-10 10:37       ` [PATCH 1/2] toolchain-scripts.bbclass: Allow sourcing of subscript for environment Richard Purdie
2014-10-10 13:17 ` Paul Eggleton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.