Kconfig.select-break 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. # Select broken dependency issue
  2. # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3. #
  4. # Test with:
  5. #
  6. # make KBUILD_KCONFIG=Documentation/kbuild/Kconfig.select-break menuconfig
  7. #
  8. # kconfig will not complain and enable this layout for configuration. This is
  9. # currently a feature of kconfig, given select was designed to be heavy handed.
  10. # Kconfig currently does not check the list of symbols listed on a symbol's
  11. # "select" list, this is done on purpose to help load a set of known required
  12. # symbols. Because of this use of select should be used with caution. An
  13. # example of this issue is below.
  14. #
  15. # The option B and C are clearly contradicting with respect to A.
  16. # However, when A is set, C can be set as well because Kconfig does not
  17. # visit the dependencies of the select target (in this case B). And since
  18. # Kconfig does not visit the dependencies, it breaks the dependencies of B
  19. # (!A).
  20. mainmenu "Simple example to demo kconfig select broken dependency issue"
  21. config A
  22. bool "CONFIG A"
  23. config B
  24. bool "CONFIG B"
  25. depends on !A
  26. config C
  27. bool "CONFIG C"
  28. depends on A
  29. select B