[yocto] which yocto doc explains bitbake assignment variations?

Robert P. J. Day rpjday at crashcourse.ca
Thu Mar 29 15:34:15 PDT 2012


  just to be absolutely clear so i don't misunderstand:

On Thu, 29 Mar 2012, Rudolf Streif wrote:

> VAR = "value"
>
>     In this example, VAR is set to value.

  so the "=" assignment will *always* set the variable to that value,
regardless of what combination of =, ?= or ??= has come before it,
correct?

>     Early Default Value Assignment (?=)
>
>     A variable can be early-assigned a default value using the ?= assignment operator:
>
> A ?= "1"
> B ?= "2"
> B ?= "3"
>
>     In this example A will contain 1 if it was not previously set. B will contain 2 because
>     the ?= assignment operator is immediate meaning that if there are multiple ?= assignments
>     to a single variable, the first one will be used.

  and the first ?= will be processed, even if there were earlier ??=
assignments, correct?  (obviously not if there were earlier =
assignments.)

> A ??= "1"
> B ??= "2"
> B ??= "3"
>
>     In this example A will contain 1 if it was not previously set. B will contain 3 because
>     the ??= assignment operator is a late or lazy assignment operator and assignment will not
>     take place until the end of the parsing process. If there are multiple ??= assignments to a
>     single variable, the last one will be used.

  however, this "weak" assignment is cancelled by the appearance of
either a = or a ?= assignment at any time, yes?

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================


More information about the yocto mailing list