diff options
| -rw-r--r-- | README.rst | 17 | ||||
| -rw-r--r-- | kconfiglib.py | 12 |
2 files changed, 20 insertions, 9 deletions
@@ -8,7 +8,7 @@ Kconfiglib is a `Kconfig <https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt>`_ implementation in Python 2/3. It started out as a helper library, but now has a enough functionality to also work well as a standalone Kconfig implementation -(including ``menuconfig`` implementations). +(including `menuconfig interfaces`_ and `Kconfig extensions`_). The entire library is contained in `kconfiglib.py <https://github.com/ulfalizer/Kconfiglib/blob/master/kconfiglib.py>`_. The @@ -191,8 +191,8 @@ Kconfiglib can do the following, among other things: <https://github.com/ulfalizer/Kconfiglib/blob/master/examples/menuconfig_example.py>`_ example. -Kconfig language extensions -~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Kconfig extensions +~~~~~~~~~~~~~~~~~~ The following Kconfig extensions are available: @@ -224,6 +224,15 @@ The following Kconfig extensions are available: caveat that they must have the same name as the environment variables they reference. A warning is printed if the names differ. +- Setting the environment variable ``KCONFIG_STRICT`` to "y" will cause warnings to be printed + for all references to undefined Kconfig symbols within Kconfig files. The only gotcha is + that all ``hex`` literals must be prefixed by "0x" or "0X", to make it possible to distuinguish + them from symbol references. + + Some projects (e.g. the Linux kernel) use multiple Kconfig trees with many shared ``Kconfig`` + files, leading to some safe undefined symbol references. ``KCONFIG_STRICT`` is useful in + projects that only have a single ``Kconfig`` tree though. + Other features -------------- @@ -297,6 +306,8 @@ Other features While being simpler to understand and tweak. +.. menuconfig_implementations: + Menuconfig interfaces --------------------- diff --git a/kconfiglib.py b/kconfiglib.py index 8b798b4..988c319 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -585,12 +585,12 @@ class Kconfig(object): KconfigError on syntax errors. Note that Kconfig files are not the same as .config files (which store configuration symbol values). - If KCONFIG_STRICT is set in the environment (to any value), warnings - will be generated for all references to undefined symbols within - Kconfig files. The reason this isn't the default is that some projects - (e.g. the Linux kernel) use multiple Kconfig trees (one per - architecture) with many shared Kconfig files, leading to some safe - references to undefined symbols. + If the environment variable KCONFIG_STRICT is set to "y", warnings will + be generated for all references to undefined symbols within Kconfig + files. The reason this isn't the default is that some projects (e.g. + the Linux kernel) use multiple Kconfig trees (one per architecture) + with many shared Kconfig files, leading to some safe references to + undefined symbols. KCONFIG_STRICT relies on literal hex values being prefixed with 0x/0X. They are indistinguishable from references to undefined symbols |
