diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2011-11-12 17:16:42 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-02-10 13:36:55 +0000 |
commit | 9624a817bb7d2d9fce10704b1c1a047f93260f36 (patch) | |
tree | ac61f871c638e7b810f988a9aa676d0056fdb5a9 /meta/classes/cross.bbclass | |
parent | 4308acbbd43e6b8b37123d95df6675233007dae4 (diff) | |
download | openembedded-core-9624a817bb7d2d9fce10704b1c1a047f93260f36.tar.gz openembedded-core-9624a817bb7d2d9fce10704b1c1a047f93260f36.tar.bz2 openembedded-core-9624a817bb7d2d9fce10704b1c1a047f93260f36.tar.xz openembedded-core-9624a817bb7d2d9fce10704b1c1a047f93260f36.zip |
cross.bbclass: add virtclass handler
Allow use of BBCLASSEXTEND with 'cross' and use of virtclass-cross in
recipes.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'meta/classes/cross.bbclass')
-rw-r--r-- | meta/classes/cross.bbclass | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/meta/classes/cross.bbclass b/meta/classes/cross.bbclass index 5681ab92b..8da30483f 100644 --- a/meta/classes/cross.bbclass +++ b/meta/classes/cross.bbclass @@ -55,6 +55,23 @@ libexecdir = "${exec_prefix}/libexec/${CROSS_TARGET_SYS_DIR}" do_populate_sysroot[sstate-inputdirs] = "${SYSROOT_DESTDIR}/${STAGING_DIR_NATIVE}" +python cross_virtclass_handler () { + if not isinstance(e, bb.event.RecipePreFinalise): + return + + classextend = e.data.getVar('BBCLASSEXTEND', True) or "" + if "cross" not in classextend: + return + + pn = e.data.getVar("PN", True) + if not pn.endswith("-cross"): + return + + bb.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) + ":virtclass-cross", e.data) +} + +addhandler cross_virtclass_handler + do_install () { oe_runmake 'DESTDIR=${D}' install } |