On 10/24/24 1:28 PM, Jairo Mejia Aponte via lists.yoctoproject.org wrote:
You don't often get email from jairo.mejiaaponte=belden....@lists.yoctoproject.org. 
Learn why this is important<https://aka.ms/LearnAboutSenderIdentification>
Hi,

If you need to add something to several recipes, you can create a bbclass and 
make the recipes inherit it.

Ex:

SUMMARY = "Enables/disables compile flags for builds"

TARGET_CFLAGS:append = "${@ ' -DTEST_ENV' if not d.getVar('RELEASE') else ''}"

The else is empty, maybe it is not entirely clear in the example. This kind of 
approach can be made  for any you want. You can make an append of a task and 
things like that.

Then the recipes would only need to have the line:

inherit <bbclass_name>


Additionally, you could dynamically add a prefunc and postfunc for each task, provided you can detect which one is a shell task and not a python task (though maybe having set -e in a python's task's prefunc would be fine as well?), from anonymous python I guess?

Just throwing ideas right now.

Cheers,
Quentin
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#64110): https://lists.yoctoproject.org/g/yocto/message/64110
Mute This Topic: https://lists.yoctoproject.org/mt/109185755/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to