summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@rpsys.net>2006-10-01 13:18:36 +0000
committerRichard Purdie <rpurdie@rpsys.net>2006-10-01 13:18:36 +0000
commitb07ad27a8b9a82e7eba2a312f2d95804244c4710 (patch)
tree4920a527ebf0aeafb572bc51b50cc70a0eb3e7b3
parent05aeac6a1c5595ef494bd3aa451fbb6aa08104ec (diff)
downloadopenembedded-b07ad27a8b9a82e7eba2a312f2d95804244c4710.tar.gz
Add multicmahine.bbclass (from .dev)
-rw-r--r--classes/multimachine.bbclass22
1 files changed, 22 insertions, 0 deletions
diff --git a/classes/multimachine.bbclass b/classes/multimachine.bbclass
new file mode 100644
index 0000000000..30a285e5f3
--- /dev/null
+++ b/classes/multimachine.bbclass
@@ -0,0 +1,22 @@
+STAMP = "${TMPDIR}/stamps/${MULTIMACH_ARCH}${TARGET_VENDOR}-${TARGET_OS}/${PF}"
+WORKDIR = "${TMPDIR}/work/${MULTIMACH_ARCH}${TARGET_VENDOR}-${TARGET_OS}/${PF}"
+STAGING_KERNEL_DIR = "${STAGING_DIR}/${MULTIMACH_ARCH}${TARGET_VENDOR}-${TARGET_OS}/kernel"
+
+# Find any machine specific sub packages and if present, mark the
+# whole package as machine specific for multimachine purposes.
+python __anonymous () {
+ packages = bb.data.getVar('PACKAGES', d, 1).split()
+ macharch = bb.data.getVar('MACHINE_ARCH', d, 1)
+ multiarch = bb.data.getVar('PACKAGE_ARCH', d, 1)
+
+ for pkg in packages:
+ pkgarch = bb.data.getVar("PACKAGE_ARCH_%s" % pkg, d, 1)
+
+ # We could look for != PACKAGE_ARCH here but how to choose
+ # if multiple differences are present?
+ # Look through IPKG_ARCHS for the priority order?
+ if pkgarch and pkgarch == macharch:
+ multiarch = macharch
+
+ bb.data.setVar('MULTIMACH_ARCH', multiarch, d)
+}