base.bbclass: introduce COMPATIBLE_TARGET_SYS
authorFrans Meulenbroeks <fransmeulenbroeks@gmail.com>
Sat, 10 Jul 2010 16:12:40 +0000 (18:12 +0200)
committerFrans Meulenbroeks <fransmeulenbroeks@gmail.com>
Wed, 14 Jul 2010 19:33:59 +0000 (21:33 +0200)
This patch introduces COMPATIBLE_TARGET_SYS
It is similar to COMPATIBLE_MACHINE but where COMPATIBLE_MACHINE
is used to specify that a certain recipe is for a certain machine
COMPATIBLE_TARGET_SYS can be used to specify that a certain recipe
is for a certain architecture.

Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Acked-by: Tom Rini <tom_rini@mentor.com>
classes/base.bbclass

index b30310d..f76d03c 100644 (file)
@@ -391,6 +391,13 @@ python () {
             if this_machine and not re.match(need_machine, this_machine):
                 raise bb.parse.SkipPackage("incompatible with machine %s" % this_machine)
 
+        need_target = bb.data.getVar('COMPATIBLE_TARGET_SYS', d, 1)
+        if need_target:
+            import re
+            this_target = bb.data.getVar('TARGET_SYS', d, 1)
+            if this_target and not re.match(need_target, this_target):
+                raise bb.parse.SkipPackage("incompatible with target system %s" % this_target)
+
     pn = bb.data.getVar('PN', d, 1)
 
     # OBSOLETE in bitbake 1.7.4