[yocto] 'and' combination for OVERRIDES values?

Paul Eggleton paul.eggleton at linux.intel.com
Wed Apr 12 22:23:13 PDT 2017


On Thursday, 13 April 2017 12:16:08 PM NZST Takashi Matsuzawa wrote:
> I just wonder if there is convenient way of defining somthing in recipes
> based on combination of two OVERRIDES variables. Say, I have two variables
> xxx and yyy.
> 
> AAA = "false"
> AAA_xxx = "true"
> AAA_yyy = "true"
> 
> But what if I want to set AAA to be "true" only when xxx and yyy are in
> OVERRIDES? (And also for 'or' condition.)

This should work for "and":

AAA_xxx_yyy = "true"

(There was a time many releases ago where this didn't, but it should work in 
any release in the last few years).

For "or" you already have the answer above, basically do it with the same 
value for both overrides:

AAA = "false"
AAA_xxx = "true"
AAA_yyy = "true"
 
> The similar situation for do_install_append(), etc.
> 
> do_install_append_xxx() {
> }
> 
> do_install_append_yyy() {
> }

Same thing - for and:

do_install_append_xxx_yyy() {
}

for or:

do_install_append_xxx() {
}
 
do_install_append_yyy() {
}

Note, we're appending here rather than setting as above, but otherwise setting 
a function is pretty much the same in terms of operations as a variable - the 
syntax is slightly different and immediate operations (such as +=) aren't 
allowed, but the same rules apply for overrides and deferred operations such 
as _append.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



More information about the yocto mailing list