[OE-core] i guess there's no way to *conditionally* add tasks?
Enrico Scholz
enrico.scholz at sigma-chemnitz.de
Tue Aug 5 11:28:45 UTC 2014
"Robert P. J. Day" <rpjday-L09J2beyid0N/H6P543EQg at public.gmane.org>
writes:
> addtask configure_ptest_base after do_configure before do_compile
> addtask compile_ptest_base after do_compile before do_install
> addtask install_ptest_base after do_install before do_package do_populate_sysroot
> ...
> # Remove all '*ptest_base' tasks when ptest is not enabled
> if not(d.getVar('PTEST_ENABLED', True) == "1"):
> for i in ['do_configure_ptest_base', 'do_compile_ptest_base', 'do_install_ptest_base']:
> bb.build.deltask(i, d)
>
> so i'm guessing there's no way to conditionally add task(s) to avoid
> adding them, only to turn around and delete them, yes?
I solved similar issues by including files conditionally; e.g. above
would be
---
ptest_inc = "${@['noop', 'ptest'][d.getVar('PTEST_ENABLED', True) == '1']}"
include ptest-${ptest_inc}.inc
--- ptest-ptest.inc ---
addtask configure_ptest_base after do_configure before do_compile
addtask compile_ptest_base after do_compile before do_install
addtask install_ptest_base after do_install before do_package
do_populate_sysroot
Enrico
More information about the Openembedded-core
mailing list