From: Ulf Magnusson <ulfalizer.lkml@gmail.com>
To: linux-kbuild@vger.kernel.org
Cc: zippel@linux-m68k.org, mmarek@suse.cz, rdunlap@xenotime.net,
akpm@linux-foundation.org, andrea.gelmini@gelma.net,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org
Subject: [PATCH v3] [ANNOUNCE] kconfig: Kconfiglib: a flexible Python Kconfig parser
Date: Sun, 6 Feb 2011 19:26:16 +0100 [thread overview]
Message-ID: <20110206182612.GA17388@ulf> (raw)
This patch builds on https://lkml.org/lkml/2011/2/5/174 . A compound patch
(original patch + all fixes) is available at
http://dl.dropbox.com/u/10406197/kconfiglib.patch (apply with 'git am').
Changelog:
v3:
- Forgot to update the documentation for get_mainmenu_text() in v2.
- s/effect/affect/ in example 7.
v2:
- Now supports alternative output directories (O=).
- $-references were expanded as environment variables in some
contexts ('source', 'mainmenu', and 'defconfig') where they should
have been expanded as symbol values - fixed. The reason this broke
so little is that all symbols whose value come from an environment
variable are currently called the same thing as that variable.
- Added the internal special symbol UNAME_RELEASE, used by
DEFCONFIG_LIST. Previously get_defconfig_filename() failed to find
.configs whose DEFCONFIG_LIST entry involved UNAME_RELEASE - now
works.
- get_defconfig_filename() now searches relative to $srctree before
looking in the current directory, just like the C implementation.
- Updated example 1 to work regardless of build directory.
- Precompiled a few regexes.
Signed-off-by: Ulf Magnusson <ulfalizer.lkml@gmail.com>
---
Convenience links:
Latest documentation (generated with pydoc -w kconfiglib):
http://dl.dropbox.com/u/10406197/kconfiglib.html
Latest example files (ex1.py updated in v2):
http://dl.dropbox.com/u/10406197/kconfiglib-examples.tar.gz
scripts/kconfig/kconfiglib.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/scripts/kconfig/kconfiglib.py b/scripts/kconfig/kconfiglib.py
index fa3d5ee..964e5cb 100644
--- a/scripts/kconfig/kconfiglib.py
+++ b/scripts/kconfig/kconfiglib.py
@@ -323,7 +323,7 @@ while True:
sym.set_value(lower_bound)
- # We just changed the value of some symbol. As this may effect
+ # We just changed the value of some symbol. As this may affect
# other symbols, keep going.
done = False
@@ -708,9 +708,9 @@ class Config():
return self.arch
def get_mainmenu_text(self):
- """Returns the text of the 'mainmenu' statement (with environment
- variables expanded to the value they had when the Config was created),
- or None if the configuration has no 'mainmenu' statement."""
+ """Returns the text of the 'mainmenu' statement (with $-references to
+ symbols replaced by symbol values), or None if the configuration has no
+ 'mainmenu' statement."""
return self._expand_sym_refs(self.mainmenu_text)
def get_defconfig_filename(self):
--
1.7.0.4
reply other threads:[~2011-02-06 18:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20110206182612.GA17388@ulf \
--to=ulfalizer.lkml@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=andrea.gelmini@gelma.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mmarek@suse.cz \
--cc=rdunlap@xenotime.net \
--cc=zippel@linux-m68k.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.