From 772ec7db089f5fefd85e1e37695a22009e76d3bc Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sat, 3 Jan 2009 16:33:11 +0000 Subject: bitbake-dev: Add BBCLASSEXTEND support --- bitbake-dev/lib/bb/parse/parse_py/BBHandler.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'bitbake-dev/lib/bb/parse') diff --git a/bitbake-dev/lib/bb/parse/parse_py/BBHandler.py b/bitbake-dev/lib/bb/parse/parse_py/BBHandler.py index 00ad6ef4f..5a128e867 100644 --- a/bitbake-dev/lib/bb/parse/parse_py/BBHandler.py +++ b/bitbake-dev/lib/bb/parse/parse_py/BBHandler.py @@ -181,8 +181,21 @@ def handle(fn, d, include = 0): classes.remove(__classname__) else: if include == 0: - finalise(fn, d) - + multi = data.getVar('BBCLASSEXTEND', d, 1) + if multi: + based = bb.data.createCopy(d) + finalise(fn, based) + darray = {"": based} + for cls in multi.split(): + pn = data.getVar('PN', d, True) + based = bb.data.createCopy(d) + data.setVar('PN', pn + '-' + cls, based) + inherit([cls], based) + finalise(fn, based) + darray[cls] = based + return darray + else: + finalise(fn, d) bbpath.pop(0) if oldfile: bb.data.setVar("FILE", oldfile, d) -- cgit v1.2.3