Re: Task only for target recipe

Ayoub Zaki

thanks for the hint :-)

it did it however I run in other problems:

My goal is to cross-compile executable scripts into binaries using shc tool:

the SHC tool converts the scripts into C files, inherits the CC, CFLAGS and LDFLAGS from environment and compiles them using ${CC}.

This works fine for recipes that cross-compile since  CC, CFLAGS and LDFLAGS are defined but stuck when  dealing with allarch recipes (They are Not defined).

Is there a way to overcome this?


On Thu, Jan 28, 2021 at 10:26 PM Richard Purdie <richard.purdie@...> wrote:
On Thu, 2021-01-28 at 18:53 +0100, Ayoub Zaki via wrote:
> Hello I created a new task that I want to run for every recipe of my
> image but only for target recipes and skip all native, sdk,...
> mytask.bbclass:
> addtask do_mytask after do_install
> do_mytask() {
>     :
> }
> do_mytask_class-target() {
>     bbwarn "mytask"
>     :
> }
> I added to local.conf :
> INHERIT += "mytask"
> I don't see it running! what is the proper way to achieve this?

How are you running it? You've said you want it to run after do_install
but not what should trigger it.

Adding "before do_build" to the addtask line for example might trigger
it (do_build is the default task).



Join to automatically receive all group messages.