From 699fd81bf3a67606396035697357c5665dcd68af Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Fri, 26 Oct 2018 22:23:27 +0200 Subject: Support enabling the assignment-to-undef. symbol warning via the environment This makes it possible to enable it for the bundled tools, by setting KCONFIG_WARN_UNDEF_ASSIGN=y. Previously, the code had to be modified to call Kconfig.enable_undef_warnings(). Also rename KCONFIG_STRICT to KCONFIG_WARN_UNDEF, for consistency. Keep supporting KCONFIG_STRICT as an alias for backwards compatibility. --- README.rst | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) (limited to 'README.rst') diff --git a/README.rst b/README.rst index ea453d6..4ba2748 100644 --- a/README.rst +++ b/README.rst @@ -325,14 +325,28 @@ 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. +- Two extra optional warnings can be enabled by setting environment variables, + covering cases that are easily missed when making changes to Kconfig files: + + * ``KCONFIG_WARN_UNDEF``: If set to ``y``, warnings will be generated for all + references to undefined symbols within Kconfig files. The only gotcha is + that all hex literals must be prefixed with ``0x`` or ``0X``, to make it + possible to distinguish 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_WARN_UNDEF`` is useful in projects that only have a single + Kconfig tree though. + + ``KCONFIG_STRICT`` is an older alias for this environment variable, + supported for backwards compatibility. + + * ``KCONFIG_WARN_UNDEF_ASSIGN``: If set to ``y``, warnings will be generated + for all assignments to undefined symbols within ``.config`` files. By + default, no such warnings are generated. + + This warning can also be enabled/disabled via + ``Kconfig.enable/disable_undef_warnings()``. Other features -------------- -- cgit v1.2.3