All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] [ANNOUNCE] kconfig: Kconfiglib: a flexible Python Kconfig parser
@ 2011-02-06 18:26 Ulf Magnusson
  0 siblings, 0 replies; only message in thread
From: Ulf Magnusson @ 2011-02-06 18:26 UTC (permalink / raw)
  To: linux-kbuild
  Cc: zippel, mmarek, rdunlap, akpm, andrea.gelmini, linux-kernel,
	linux-doc

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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-02-06 18:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-06 18:26 [PATCH v3] [ANNOUNCE] kconfig: Kconfiglib: a flexible Python Kconfig parser Ulf Magnusson

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.