summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-02-10 18:58:28 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-04-30 11:37:22 +0100
commit71b78f04832985250115b5e72321fa82309090f6 (patch)
tree88d314c0f19977b73c19bbae8b333528f5100459 /meta/classes
parentc47a869308cb0cccde0b1aee9a001352c99a8395 (diff)
downloadpoky-71b78f04832985250115b5e72321fa82309090f6.tar.gz
classes: Add recipe class to overrides
We have currently no override to detect a recipe being build cross, crosssdk or for target at times we can use virtclass-native and virtclass-nativesdk to override stuff in recipes but we dont have way to modify a variables based on recipe type always. This patch adds in such an override and in particular makes a target override class available. With this change now we can say: EXTRA_OECONF_class-target = "...." EXTRA_OECONF_class-native = "..." EXTRA_OECONF_class-nativesdk = "..." EXTRA_OECONF_class-crosssdk= "..." Based of an original patch by Khem Raj (From OE-Core rev: cf332fd9bf685f6d42b11c1f0c37b934c7f5bcbe) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/base.bbclass1
-rw-r--r--meta/classes/cross-canadian.bbclass2
-rw-r--r--meta/classes/cross.bbclass1
-rw-r--r--meta/classes/crosssdk.bbclass1
-rw-r--r--meta/classes/native.bbclass1
-rw-r--r--meta/classes/nativesdk.bbclass1
6 files changed, 6 insertions, 1 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 02e1ff5b74..a984eae5bc 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -1,4 +1,5 @@
1BB_DEFAULT_TASK ?= "build" 1BB_DEFAULT_TASK ?= "build"
2CLASSOVERRIDE ?= "class-target"
2 3
3inherit patch 4inherit patch
4inherit staging 5inherit staging
diff --git a/meta/classes/cross-canadian.bbclass b/meta/classes/cross-canadian.bbclass
index bbf8f161fd..ed53118a2f 100644
--- a/meta/classes/cross-canadian.bbclass
+++ b/meta/classes/cross-canadian.bbclass
@@ -8,7 +8,7 @@
8# SDK packages are built either explicitly by the user, 8# SDK packages are built either explicitly by the user,
9# or indirectly via dependency. No need to be in 'world'. 9# or indirectly via dependency. No need to be in 'world'.
10EXCLUDE_FROM_WORLD = "1" 10EXCLUDE_FROM_WORLD = "1"
11 11CLASSOVERRIDE = "class-cross-canadian"
12STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${SDK_ARCH}${SDK_VENDOR}-${SDK_OS}:${STAGING_DIR_NATIVE}${bindir_native}/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}" 12STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${SDK_ARCH}${SDK_VENDOR}-${SDK_OS}:${STAGING_DIR_NATIVE}${bindir_native}/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}"
13 13
14# 14#
diff --git a/meta/classes/cross.bbclass b/meta/classes/cross.bbclass
index 8da30483f4..e998307236 100644
--- a/meta/classes/cross.bbclass
+++ b/meta/classes/cross.bbclass
@@ -4,6 +4,7 @@ inherit relocatable
4# no need for them to be a direct target of 'world' 4# no need for them to be a direct target of 'world'
5EXCLUDE_FROM_WORLD = "1" 5EXCLUDE_FROM_WORLD = "1"
6 6
7CLASSOVERRIDE = "class-cross"
7PACKAGES = "" 8PACKAGES = ""
8PACKAGES_DYNAMIC = "" 9PACKAGES_DYNAMIC = ""
9PACKAGES_DYNAMIC_virtclass-native = "" 10PACKAGES_DYNAMIC_virtclass-native = ""
diff --git a/meta/classes/crosssdk.bbclass b/meta/classes/crosssdk.bbclass
index 67df236b2c..93aba7022e 100644
--- a/meta/classes/crosssdk.bbclass
+++ b/meta/classes/crosssdk.bbclass
@@ -1,5 +1,6 @@
1inherit cross 1inherit cross
2 2
3CLASSOVERRIDE = "class-crosssdk"
3PACKAGE_ARCH = "${SDK_ARCH}" 4PACKAGE_ARCH = "${SDK_ARCH}"
4python () { 5python () {
5 # set TUNE_PKGARCH to SDK_ARCH 6 # set TUNE_PKGARCH to SDK_ARCH
diff --git a/meta/classes/native.bbclass b/meta/classes/native.bbclass
index ffab971cbb..bca48d4637 100644
--- a/meta/classes/native.bbclass
+++ b/meta/classes/native.bbclass
@@ -97,6 +97,7 @@ PKG_CONFIG_SYSROOT_DIR = ""
97 97
98# we dont want libc-uclibc or libc-glibc to kick in for native recipes 98# we dont want libc-uclibc or libc-glibc to kick in for native recipes
99LIBCOVERRIDE = "" 99LIBCOVERRIDE = ""
100CLASSOVERRIDE = "class-native"
100 101
101PATH =. "${COREBASE}/scripts/native-intercept:" 102PATH =. "${COREBASE}/scripts/native-intercept:"
102 103
diff --git a/meta/classes/nativesdk.bbclass b/meta/classes/nativesdk.bbclass
index 9e20834575..a58fce2040 100644
--- a/meta/classes/nativesdk.bbclass
+++ b/meta/classes/nativesdk.bbclass
@@ -8,6 +8,7 @@ STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${SDK_ARCH}${S
8 8
9# we dont want libc-uclibc or libc-glibc to kick in for nativesdk recipes 9# we dont want libc-uclibc or libc-glibc to kick in for nativesdk recipes
10LIBCOVERRIDE = "" 10LIBCOVERRIDE = ""
11CLASSOVERRIDE = "class-nativesdk"
11 12
12# 13#
13# Update PACKAGE_ARCH and PACKAGE_ARCHS 14# Update PACKAGE_ARCH and PACKAGE_ARCHS