linux/Documentation/kbuild
Masahiro Yamada 3a9dd3ecb2 kconfig: make 'imply' obey the direct dependency
The 'imply' statement may create unmet direct dependency when the
implied symbol depends on m.

[Test Code]

  config FOO
          tristate "foo"
          imply BAZ

  config BAZ
          tristate "baz"
          depends on BAR

  config BAR
          def_tristate m

  config MODULES
          def_bool y
          option modules

If you set FOO=y, BAZ is also promoted to y, which results in the
following .config file:

  CONFIG_FOO=y
  CONFIG_BAZ=y
  CONFIG_BAR=m
  CONFIG_MODULES=y

This does not meet the dependency 'BAZ depends on BAR'.

Unlike 'select', what is worse, Kconfig never shows the
'WARNING: unmet direct dependencies detected for ...' for this case.

Because 'imply' is considered to be weaker than 'depends on', Kconfig
should take the direct dependency into account.

For clarification, describe this case in kconfig-language.rst too.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Nicolas Pitre <nico@fluxnic.net>
Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
2020-03-13 10:05:34 +09:00
..
headers_install.rst Kbuild updates for v5.3 2019-07-12 16:03:16 -07:00
index.rst Documentation/llvm: add documentation on building w/ Clang/LLVM 2020-03-03 20:49:21 +09:00
issues.rst docs: kbuild: fix build with pdf and fix some minor issues 2019-07-15 11:03:04 -03:00
kbuild.rst kbuild: rename KBUILD_ENABLE_EXTRA_GCC_CHECKS to KBUILD_EXTRA_WARN 2019-09-06 23:46:52 +09:00
kconfig-language.rst kconfig: make 'imply' obey the direct dependency 2020-03-13 10:05:34 +09:00
kconfig-macro-language.rst docs: kbuild: convert docs to ReST and rename to *.rst 2019-06-14 14:21:21 -06:00
Kconfig.recursion-issue-01 kbuild: document recursive dependency limitation / resolution 2015-10-08 15:36:16 +02:00
Kconfig.recursion-issue-02 kbuild: document recursive dependency limitation / resolution 2015-10-08 15:36:16 +02:00
kconfig.rst kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf 2020-01-07 02:18:39 +09:00
Kconfig.select-break kbuild: document recursive dependency limitation / resolution 2015-10-08 15:36:16 +02:00
llvm.rst Documentation/llvm: add documentation on building w/ Clang/LLVM 2020-03-03 20:49:21 +09:00
makefiles.rst kbuild: get rid of trailing slash from subdir- example 2020-02-27 10:03:27 +09:00
modules.rst kbuild: do not read $(KBUILD_EXTMOD)/Module.symvers 2019-11-11 20:07:03 +09:00
reproducible-builds.rst kheaders: make headers archive reproducible 2019-10-05 15:29:49 +09:00