From 7eace27993ad3aa1d6911866d9c60a11f32d36d9 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Tue, 9 Jun 2015 13:32:38 +0200 Subject: Support using Python 3 with iscriptconfig. Can't use print as an expression. Also switch to using a single context line (which should hopefully be stable). This might make the patch more robust, and also makes it clear approx. where it should go. Also fix 'iscriptconfig' spelling in the readme. --- README.md | 15 ++++++++------- makefile.patch | 24 +++++++++--------------- 2 files changed, 17 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index a5cb3fe..26b3b12 100644 --- a/README.md +++ b/README.md @@ -24,15 +24,16 @@ Run the following commands in the kernel root: (Note: The directory name Kconfiglib/ is significant.) -In addition to creating a handy interface, the make targets created by the patch -(`scriptconfig` and `iscripconfig`) are needed to pick up environment variables -set in the kernel makefiles and later referenced in the Kconfig files (ARCH, -SRCARCH, and KERNELVERSION as of Linux v4.0-rc3). The documentation -explains how the make targets are used. The compatibility tests in the test suite -also needs them. +In addition to creating a handy interface, the make targets created by the +patch (`scriptconfig` and `iscriptconfig`) are needed to pick up environment +variables set in the kernel makefiles and later referenced in the Kconfig files +(ARCH, SRCARCH, and KERNELVERSION as of Linux v4.0-rc3). +The documentation explains how the make targets are used. The compatibility +tests in the test suite also needs them. Please tell me if the patch does not apply. It should be trivial to apply -manually. +manually, as it's just a block of text that needs to be inserted near the other +*conf: targets. ### Installation instructions for other projects ### diff --git a/makefile.patch b/makefile.patch index 16a3baf..e8c4425 100644 --- a/makefile.patch +++ b/makefile.patch @@ -1,20 +1,17 @@ -From 61cfb087f144aeb17f4c663a998acbda03053943 Mon Sep 17 00:00:00 2001 +From 6ced956acfe037b0c303780487be86ec71fa2942 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson -Date: Fri, 13 Mar 2015 01:22:48 +0100 +Date: Tue, 9 Jun 2015 13:01:34 +0200 Subject: [PATCH] Kconfiglib scripts/kconfig/Makefile patch. --- - scripts/kconfig/Makefile | 36 ++++++++++++++++++++++++++++++++++++ - 1 file changed, 36 insertions(+) + scripts/kconfig/Makefile | 35 +++++++++++++++++++++++++++++++++++ + 1 file changed, 35 insertions(+) diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile -index 9645c07..be21e03 100644 +index d9b1fef..e6311ed 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile -@@ -11,6 +11,42 @@ else - Kconfig := Kconfig - endif - +@@ -62,1 +62,36 @@ else +PHONY += scriptconfig iscriptconfig kconfiglibtestconfig + +ifneq ($(filter scriptconfig iscriptconfig,$(MAKECMDGOALS)),) @@ -41,7 +38,7 @@ index 9645c07..be21e03 100644 + "import kconfiglib; \ + import sys; \ + c = kconfiglib.Config(sys.argv[4 if \"$(PYTHONCMD)\".startswith(\"ipython\") else 1]); \ -+ print \"A Config instance 'c' for the architecture ({0}) has been created.\".format(c.get_arch())" \ ++ print(\"A Config instance 'c' for the architecture ({0}) has been created.\".format(c.get_arch()))" \ + $(srctree)/$(Kconfig) + +# Used by testsuite.py to be able to compare output for nonsensical @@ -50,10 +47,7 @@ index 9645c07..be21e03 100644 +kconfiglibtestconfig: $(obj)/conf + $(Q)$< --defconfig=.config $(srctree)/$(Kconfig) + -+ - # We need this, in case the user has it in its environment - unexport CONFIG_ - + menuconfig: $(obj)/mconf -- -2.1.0 +2.1.4 -- cgit v1.2.3