[coreboot-gerrit] New patch to review for coreboot: b652c2c Fix Kconfig option list generator

Stefan Reinauer (stefan.reinauer@coreboot.org) gerrit at coreboot.org
Wed May 6 01:22:22 CEST 2015


Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10115

-gerrit

commit b652c2c14f0c5561f55f293dd686f4ad466d6ddf
Author: Stefan Reinauer <stefan.reinauer at coreboot.org>
Date:   Tue May 5 16:20:07 2015 -0700

    Fix Kconfig option list generator
    
    The Kconfig option list generator was broken by two different changes
    to the project in the last few years:
    - the switch to git from svn
    - allowing wild card includes in Kconfig
    
    Change-Id: I6bc5024a04958e9718d2e3a3a3bb6d69d4277eb6
    Signed-off-by: Stefan Reinauer <stefan.reinauer at coreboot.org>
---
 util/optionlist/Makefile     | 6 ++----
 util/optionlist/kconfig2wiki | 5 ++++-
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/util/optionlist/Makefile b/util/optionlist/Makefile
index 8e78c9a..592d286 100644
--- a/util/optionlist/Makefile
+++ b/util/optionlist/Makefile
@@ -15,12 +15,10 @@
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 #
 
-
-SVNVERSION := $(shell LC_ALL=C svnversion -cn ../.. | sed -e "s/.*://" -e "s/\([0-9]*\).*/\1/" | grep "[0-9]" || LC_ALL=C svn info . | grep ^Revision | sed "s/.*[[:blank:]]\+\([0-9]*\)[^0-9]*/\1/" | grep "[0-9]" || echo unknown)
+VERSION := $(shell git describe --dirty --always || git describe)
 
 all:
-	cd ../..; util/optionlist/kconfig2wiki src/Kconfig $(SVNVERSION) > util/optionlist/Options.wiki
+	cd ../..; util/optionlist/kconfig2wiki src/Kconfig $(VERSION) > util/optionlist/Options.wiki
 
 clean:
 	rm -rf Options.wiki
-
diff --git a/util/optionlist/kconfig2wiki b/util/optionlist/kconfig2wiki
index b73afa5..4265d37 100755
--- a/util/optionlist/kconfig2wiki
+++ b/util/optionlist/kconfig2wiki
@@ -21,6 +21,8 @@
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 #
 
+import glob
+
 helplen = 0
 extra_chapters = 0
 
@@ -105,7 +107,8 @@ def readfile(filename):
 			sys.stdout.write("\n")
 		elif words[0] == "source":
 			fn=zapquotes(words[1])
-			readfile(fn)
+			for name in glob.glob(fn):
+				readfile(name)
 		elif words[0] in ("default","depends", "select", "if", "endif", "#"): pass
 		#else: sys.stderr.write("unknown: %s\n" % i)
 	if helplen: sys.stdout.write("||\n")



More information about the coreboot-gerrit mailing list