public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@xenotime.net>
To: linux-kbuild@vger.kernel.org
Cc: Michal Marek <mmarek@suse.cz>
Subject: [PATCH] kconfig-language: add to hints
Date: Thu, 28 Apr 2011 10:58:52 -0700	[thread overview]
Message-ID: <20110428105852.975a6583.rdunlap@xenotime.net> (raw)

From: Randy Dunlap <randy.dunlap@oracle.com>

Explain a little about kconfig symbol dependencies and symbol
existence given optional kconfig language scenarios.
Yes, I was bitten by this.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
 Documentation/kbuild/kconfig-language.txt |   22 ++++++++++++++++++++
 1 file changed, 22 insertions(+)

--- lnx-2639-rc5.orig/Documentation/kbuild/kconfig-language.txt
+++ lnx-2639-rc5/Documentation/kbuild/kconfig-language.txt
@@ -381,3 +381,25 @@ config FOO
 
 limits FOO to module (=m) or disabled (=n).
 
+Kconfig symbol existence
+~~~~~~~~~~~~~~~~~~~~~~~~
+The following two methods produce the same kconfig symbol dependencies
+but differ greatly in kconfig symbol existence (production) in the
+generated config file.
+
+case 1:
+
+config FOO
+	tristate "about foo"
+	depends on BAR
+
+vs. case 2:
+
+if BAR
+config FOO
+	tristate "about foo"
+endif
+
+In case 1, the symbol FOO will always exist in the config file (given
+no other dependencies).  In case 2, the symbol FOO will only exist in
+the config file if BAR is enabled.

             reply	other threads:[~2011-04-28 17:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-28 17:58 Randy Dunlap [this message]
2011-05-02 15:40 ` [PATCH] kconfig-language: add to hints Michal Marek

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=20110428105852.975a6583.rdunlap@xenotime.net \
    --to=rdunlap@xenotime.net \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=mmarek@suse.cz \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox