alistair23-linux/scripts/kconfig
Nicolas Pitre 237e3ad0f1 Kconfig: Introduce the "imply" keyword
The "imply" keyword is a weak version of "select" where the target
config symbol can still be turned off, avoiding those pitfalls that come
with the "select" keyword.

This is useful e.g. with multiple drivers that want to indicate their
ability to hook into a secondary subsystem while allowing the user to
configure that subsystem out without also having to unset these drivers.

Currently, the same effect can almost be achieved with:

config DRIVER_A
	tristate

config DRIVER_B
	tristate

config DRIVER_C
	tristate

config DRIVER_D
	tristate

[...]

config SUBSYSTEM_X
	tristate
	default DRIVER_A || DRIVER_B || DRIVER_C || DRIVER_D || [...]

This is unwieldy to maintain especially with a large number of drivers.
Furthermore, there is no easy way to restrict the choice for SUBSYSTEM_X
to y or n, excluding m, when some drivers are built-in. The "select"
keyword allows for excluding m, but it excludes n as well. Hence
this "imply" keyword.  The above becomes:

config DRIVER_A
	tristate
	imply SUBSYSTEM_X

config DRIVER_B
	tristate
	imply SUBSYSTEM_X

[...]

config SUBSYSTEM_X
	tristate

This is much cleaner, and way more flexible than "select". SUBSYSTEM_X
can still be configured out, and it can be set as a module when none of
the drivers are configured in or all of them are modular.

Signed-off-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: John Stultz <john.stultz@linaro.org>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Cc: Paul Bolle <pebolle@tiscali.nl>
Cc: linux-kbuild@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: Michal Marek <mmarek@suse.com>
Cc: Edward Cree <ecree@solarflare.com>
Link: http://lkml.kernel.org/r/1478841010-28605-2-git-send-email-nicolas.pitre@linaro.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2016-11-16 09:26:33 +01:00
..
lxdialog kconfig/lxdialog: get ncurses CFLAGS with pkg-config 2014-09-23 15:47:48 +02:00
.gitignore
check.sh kbuild: trivial - remove trailing empty lines 2014-06-10 00:04:06 +02:00
conf.c kconfig: allow kconfig to handle longer path names 2015-12-10 11:06:10 +01:00
confdata.c kconfig: add unexpected data itself to warning 2016-05-10 17:20:19 +02:00
expr.c kconfig: Fix copy&paste error 2015-10-20 19:13:14 +02:00
expr.h Kconfig: Introduce the "imply" keyword 2016-11-16 09:26:33 +01:00
gconf.c kconfig: Do not print status messages in make -s mode 2015-04-09 17:44:34 +02:00
gconf.glade
images.c
kxgettext.c
list.h Replace mentions of "list_struct" to "list_head" 2014-11-20 14:45:15 +01:00
lkc.h kconfig: Remove unnecessary prototypes from headers 2015-02-25 15:00:17 +01:00
lkc_proto.h kconfig: Remove unnecessary prototypes from headers 2015-02-25 15:00:17 +01:00
Makefile scripts/kconfig: allow building with make 3.80 again 2016-02-01 12:11:27 +01:00
mconf.c kconfig: Do not print status messages in make -s mode 2015-04-09 17:44:34 +02:00
menu.c Kconfig: Introduce the "imply" keyword 2016-11-16 09:26:33 +01:00
merge_config.sh kconfig/merge_config.sh: Accept a single file 2015-10-14 16:19:37 +02:00
nconf.c kconfig: Do not print status messages in make -s mode 2015-04-09 17:44:34 +02:00
nconf.gui.c nconf: use function calls instead of ncurses' variables LINES and COLS 2013-06-18 23:58:58 +02:00
nconf.h
POTFILES.in
qconf.cc kconfig: fix qconf segfault by deleting heap objects 2016-01-11 09:45:08 +01:00
qconf.h Port xconfig to Qt5 - Source format. 2015-10-14 14:59:03 +02:00
streamline_config.pl localmodconfig: Fix whitespace repeat count after "tristate" 2016-04-26 18:35:16 -04:00
symbol.c Kconfig: Introduce the "imply" keyword 2016-11-16 09:26:33 +01:00
util.c kconfig: Remove dead code 2015-02-25 15:00:16 +01:00
zconf.gperf Kconfig: Introduce the "imply" keyword 2016-11-16 09:26:33 +01:00
zconf.hash.c_shipped kconfig: Regenerate shipped zconf.{hash,lex}.c files 2015-08-19 17:05:39 +02:00
zconf.l kconfig: warn of unhandled characters in Kconfig commands 2015-08-19 17:05:39 +02:00
zconf.lex.c_shipped kconfig: Regenerate shipped zconf.{hash,lex}.c files 2015-08-19 17:05:39 +02:00
zconf.tab.c_shipped kconfig: re-generate *.c_shipped files after previous change 2015-06-15 14:05:58 +02:00
zconf.y Kconfig: Introduce the "imply" keyword 2016-11-16 09:26:33 +01:00