kbuild: Show marked Kconfig fragments in "help"
authorKees Cook <keescook@chromium.org>
Thu, 31 Aug 2023 19:13:39 +0000 (12:13 -0700)
committerMasahiro Yamada <masahiroy@kernel.org>
Sun, 3 Sep 2023 17:04:20 +0000 (02:04 +0900)
commitfeec5e1f74f5b735c0c5c02ec70673db1334173f
tree0089441a74b7b520bc6d9ab585a65e86395fc33b
parent7cd343008b967423b06af8f6d3236749c67d12e8
kbuild: Show marked Kconfig fragments in "help"

Currently the Kconfig fragments in kernel/configs and arch/*/configs
that aren't used internally aren't discoverable through "make help",
which consists of hard-coded lists of config fragments. Instead, list
all the fragment targets that have a "# Help: " comment prefix so the
targets can be generated dynamically.

Add logic to the Makefile to search for and display the fragment and
comment. Add comments to fragments that are intended to be direct targets.

Signed-off-by: Kees Cook <keescook@chromium.org>
Co-developed-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
20 files changed:
Makefile
arch/arm/configs/dram_0x00000000.config
arch/arm/configs/dram_0xc0000000.config
arch/arm/configs/dram_0xd0000000.config
arch/arm/configs/lpae.config
arch/arm64/configs/virt.config
arch/powerpc/configs/disable-werror.config
arch/powerpc/configs/security.config
arch/riscv/configs/32-bit.config
arch/riscv/configs/64-bit.config
arch/s390/configs/btf.config
arch/s390/configs/kasan.config
arch/x86/Makefile
kernel/configs/debug.config
kernel/configs/kvm_guest.config
kernel/configs/nopm.config
kernel/configs/rust.config
kernel/configs/x86_debug.config
kernel/configs/xen.config
scripts/kconfig/Makefile