[build2] Kconfig support in build2

Boris Kolpackov boris at codesynthesis.com
Thu Jan 28 08:51:10 UTC 2021


Matthew Krupcale via users <users at build2.org> writes:

> On Wed, Jan 27, 2021 at 5:34 AM Boris Kolpackov <boris at codesynthesis.com> wrote:
>
> > The way I would arrange this build is along these lines:
> >
> > /usr/bin/b [...] libbuild2-kconfig/
> >
> > /usr/bin/b [...] libbuild2-kconfig-tests/ \
> > '!config.import.libbuild2_kconfig=libbuild2-kconfig/'
> 
> Unfortunately this actually results in three separate builds. What
> happens in this case is that it
>  1. builds libbuild2-kconfig first with the correct config.* options
>  2. update: libbuild2-kconfig-tests/ then rebuilds libbuild2-kconfig
> without the CLI config.* options (i.e. only using the buildfile
> options)
>  3. install: libbuild2-kconfig/ rebuilds libbuild2-kconfig again with
> the correct config.* options

Yes, I see. This happens because there is no persistent configuration
in libbuild2-kconfig/ so on step 2 the module is built in the default
configuration. I think configuring libbuild2-kconfig/ is the easiest
way to solve this:

/usr/bin/b [...] configure: libbuild2-kconfig/ 
/usr/bin/b libbuild2-kconfig/

/usr/bin/b [...] libbuild2-kconfig-tests/ \
  '!config.import.libbuild2_kconfig=libbuild2-kconfig/'

/usr/bin/b install: libbuild2-kconfig/

Where [...] are the config.* variables (after configuring libbuild2-kconfig/
we don't need to repeat them in update and install).

(The other way would be to get rid of the module update on step 2 by
using LD_LIBRARY_PATH instead of config.import.libbuild2_kconfig to
locate the module).



More information about the users mailing list