Hello.

>AAA_xxx_yyy = "true"

Thank you, I will try.  I could not figure out but I feel it should work.

________________________________
From: Paul Eggleton <paul.eggle...@linux.intel.com>
Sent: Thursday, April 13, 2017 2:23 PM
To: Takashi Matsuzawa
Cc: yocto@yoctoproject.org
Subject: Re: [yocto] 'and' combination for OVERRIDES values?

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
-- 
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to