KubaFYI
KubaFYI

Reputation: 229

When using bitbake/yocto, is there a way to conditionally append a task?

I know how to conditionally append variables, but is there a way in which to append/prepend things to tasks in a recipe depending on the value of some variables?

Upvotes: 1

Views: 2164

Answers (1)

Birmjin In
Birmjin In

Reputation: 129

My suggestion is using OVERRIDES variable.

OVERRIDES = 'somecond'

VAR_X = '123'
VAR_X_append_somecond = '456'
VAR_X_append_othercond = '789'

In this case, VAR_X will be 123456 because somecond is in the OVERRIDES variable. Refer here: https://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#conditional-syntax-overrides

Upvotes: 2

Related Questions