diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2023-11-23 18:05:40 +0900 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2023-12-03 18:50:48 +0900 |
commit | 92ef432f027cffe0ff91ff2cbe9258d89ca53968 (patch) | |
tree | b832327993ae84a36bf629972d271c3202547ef4 /scripts/kconfig/Makefile | |
parent | ef6609adf1ecc4c0797a894d4dd365dbbc4903f9 (diff) | |
download | lwn-92ef432f027cffe0ff91ff2cbe9258d89ca53968.tar.gz lwn-92ef432f027cffe0ff91ff2cbe9258d89ca53968.zip |
kbuild: support W=c and W=e shorthands for Kconfig
KCONFIG_WARN_UNKNOWN_SYMBOLS=1 and KCONFIG_WERROR=1 are descriptive
and suitable in scripting, but typing them from the command line can
be tedious.
Associate them with KBUILD_EXTRA_WARN (and the W= shorthand).
Support a new letter 'c' to enable extra checks in Kconfig. You can
still manage compiler warnings (W=1) and Kconfig warnings (W=c)
independently.
Reuse the letter 'e' to turn Kconfig warnings into errors.
As usual, you can combine multiple letters in KCONFIG_EXTRA_WARN.
$ KCONFIG_WARN_UNKNOWN_SYMBOLS=1 KCONFIG_WERROR=1 make defconfig
can be shortened to:
$ KBUILD_EXTRA_WARN=ce make defconfig
or, even shorter:
$ make W=ce defconfig
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Diffstat (limited to 'scripts/kconfig/Makefile')
-rw-r--r-- | scripts/kconfig/Makefile | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index 4eee155121a8..322c061b464d 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile @@ -27,6 +27,14 @@ KCONFIG_DEFCONFIG_LIST += \ endif KCONFIG_DEFCONFIG_LIST += arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) +ifneq ($(findstring c, $(KBUILD_EXTRA_WARN)),) +export KCONFIG_WARN_UNKNOWN_SYMBOLS=1 +endif + +ifneq ($(findstring e, $(KBUILD_EXTRA_WARN)),) +export KCONFIG_WERROR=1 +endif + # We need this, in case the user has it in its environment unexport CONFIG_ |