LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Robert P. J. Day" <rpjday@mindspring.com>
To: Linux kernel mailing list <linux-kernel@vger.kernel.org>
Subject: introducing conditional submenus in the config process?
Date: Fri, 9 Feb 2007 09:10:24 -0500 (EST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0702090901500.5499@localhost.localdomain> (raw)


  i brought this up a while back but nothing was finalized -- is there
sufficient value in being able to select or deselect entire submenus
of features without having to descend into that submenu first?

  as a random example, consider Device Drivers --> MTD support.  as it
stands, i can select or deselect MTD support in its entirety only by
first going into the MTD submenu.  i mentioned before that it would be
far more convenient to have the selection switch on that upper-level
menu entry instead, which you can get with a patch like this:

==================================================
diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig
index 26f75c2..1233602 100644
--- a/drivers/mtd/Kconfig
+++ b/drivers/mtd/Kconfig
@@ -1,8 +1,6 @@
 # $Id: Kconfig,v 1.11 2005/11/07 11:14:19 gleixner Exp $

-menu "Memory Technology Devices (MTD)"
-
-config MTD
+menuconfig MTD
 	tristate "Memory Technology Device (MTD) support"
 	help
 	  Memory Technology Devices are flash, RAM and similar chips, often
@@ -13,6 +11,8 @@ config MTD
 	  them. It will also allow you to select individual drivers for
 	  particular hardware and users of MTD devices. If unsure, say N.

+if MTD
+
 config MTD_DEBUG
 	bool "Debugging"
 	depends on MTD
@@ -292,5 +292,5 @@ source "drivers/mtd/nand/Kconfig"

 source "drivers/mtd/onenand/Kconfig"

-endmenu
+endif
=====================================================

  so the higher level config feature changes from a "config" to a
"menuconfig", then the entire submenu is wrapped in the appropriate
conditional.  this sort of thing could be used in all kinds of places
in the current Kconfig structure to avoid constantly visiting
submenus.

  (as an aside, rather than have to implement this with two Kconfig
features, it might even be worth creating a whole new feature,
something like "submenuconfig" or whatever, that does all this
automatically.)

  thoughts?

rday

-- 
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://fsdev.net/wiki/index.php?title=Main_Page
========================================================================

             reply	other threads:[~2007-02-09 14:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-09 14:10 Robert P. J. Day [this message]
2007-02-09 14:51 ` DervishD

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0702090901500.5499@localhost.localdomain \
    --to=rpjday@mindspring.com \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: introducing conditional submenus in the config process?' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).