diff options
| author | Mark Schulte <mark@mjs.pw> | 2017-04-12 23:04:13 -0700 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2019-03-15 11:42:36 +0100 |
| commit | 647bd2839e83267bf92fc5909f1b86e630bf395f (patch) | |
| tree | 20b7224d00bbe161ee245c88e4db47628654feab /docs/markdown/Kconfig-module.md | |
| parent | 66db1af4dd4905426cc7e11e335e1e4788d267d4 (diff) | |
| download | meson-647bd2839e83267bf92fc5909f1b86e630bf395f.tar.gz | |
[modules] Add kconfig module
Add a kconfig module to allow meson to integrate with existing projects
that use kconfig.
Diffstat (limited to 'docs/markdown/Kconfig-module.md')
| -rw-r--r-- | docs/markdown/Kconfig-module.md | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/docs/markdown/Kconfig-module.md b/docs/markdown/Kconfig-module.md new file mode 100644 index 000000000..b13f7ec49 --- /dev/null +++ b/docs/markdown/Kconfig-module.md @@ -0,0 +1,44 @@ +--- +short-description: Unstable kconfig module +authors: + - name: Mark Schulte, Paolo Bonzini + years: [2017, 2019] + has-copyright: false +... + +# Unstable kconfig module + +This module parses Kconfig output files to allow use of kconfig +configurations in meson projects. + +**Note**: this does not provide kconfig frontend tooling to generate a +configuration. You still need something such as kconfig frontends (see +link below) to parse your Kconfig files, and then (after you've +choosen the configuration options), output a ".config" file. + + [kconfig-frontends]: http://ymorin.is-a-geek.org/projects/kconfig-frontends + +## Usage + +The module may be imported as follows: + +``` meson +kconfig = import('unstable-kconfig') +``` + +The following functions will then be available as methods on the object +with the name `kconfig`. You can, of course, replace the name +`kconfig` with anything else. + +### kconfig.load() + +This function loads a kconfig output file and returns a dictionary object. + +`kconfig.load()` makes no attempt at parsing the values in the +file. Therefore, true boolean values will be represented as the string "y" +and integer values will have to be converted with `.to_int()`. + +* The first (and only) argument is the path to the configuration file to + load (usually ".config"). + +**Returns**: a [dictionary object](Reference-manual.md#dictionary-object). |
