[oe] Two quick questions
Holger Hans Peter Freyther
holger+oe at freyther.de
Fri Jan 1 04:02:35 UTC 2010
On Thursday 31 December 2009 19:55:52 Michael Morrell wrote:
> I have two quick OE questions.
>
> First, is it possible to use any of the "directives" in a bb file or conf
> file based on a condition? For example, can I "inherit" a class or use
> "addtask" only under certain conditions. I couldn't find a way to do
> this.
The question is why do you need this? What would be your usecase? You could
achieve this with inherit ${MY_VAR} and then have MY_VAR be either "base"
(which is already included) or what you want... but this is kind of ugly and
hard to understand.
> Second, if I have some code common to several bb files, I can either put it
> in a .inc file and use "require" or in a .bbclass file and use "inherit".
> Are there any guidelines on which approach is better?
my rule of thumb. .inc if it only belongs to the package. E.g. all "foo"
packages need this... For a .bbclass two or more packages would need to use
this functionality. The classic example here is a buildsystem...
z.
More information about the Openembedded-devel
mailing list