0001 # Select broken dependency issue
0002 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0003 #
0004 # Test with:
0005 #
0006 # make KBUILD_KCONFIG=Documentation/kbuild/Kconfig.select-break menuconfig
0007 #
0008 # kconfig will not complain and enable this layout for configuration. This is
0009 # currently a feature of kconfig, given select was designed to be heavy handed.
0010 # Kconfig currently does not check the list of symbols listed on a symbol's
0011 # "select" list, this is done on purpose to help load a set of known required
0012 # symbols. Because of this use of select should be used with caution. An
0013 # example of this issue is below.
0014 #
0015 # The option B and C are clearly contradicting with respect to A.
0016 # However, when A is set, C can be set as well because Kconfig does not
0017 # visit the dependencies of the select target (in this case B). And since
0018 # Kconfig does not visit the dependencies, it breaks the dependencies of B
0019 # (!A).
0020
0021 mainmenu "Simple example to demo kconfig select broken dependency issue"
0022
0023 config A
0024 bool "CONFIG A"
0025
0026 config B
0027 bool "CONFIG B"
0028 depends on !A
0029
0030 config C
0031 bool "CONFIG C"
0032 depends on A
0033 select B