summaryrefslogtreecommitdiff
path: root/makefile.patch
diff options
context:
space:
mode:
Diffstat (limited to 'makefile.patch')
-rw-r--r--makefile.patch48
1 files changed, 22 insertions, 26 deletions
diff --git a/makefile.patch b/makefile.patch
index 5b71d10..9992755 100644
--- a/makefile.patch
+++ b/makefile.patch
@@ -1,22 +1,24 @@
-From 01899aa5e6d1f33e1965d7934bea2ff97a48bc89 Mon Sep 17 00:00:00 2001
+From 7cac9bab3de49c03e1edce71d5d4b631d7464b74 Mon Sep 17 00:00:00 2001
From: Ulf Magnusson <ulfalizer@gmail.com>
Date: Tue, 9 Jun 2015 13:01:34 +0200
-Subject: [PATCH] Kconfiglib scripts/kconfig/Makefile patch.
+Subject: [PATCH] Kconfiglib scripts/kconfig/Makefile patch
---
- scripts/kconfig/Makefile | 35 +++++++++++++++++++++++++++++++++++
- 1 file changed, 35 insertions(+)
+ scripts/kconfig/Makefile | 30 ++++++++++++++++++++++++++++++
+ 1 file changed, 30 insertions(+)
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
-index 8c12c20c55a6..88c618b34915 100644
+index 4a7bd2192073..448cd1cb9314 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
-@@ -27,1 +27,36 @@ gconfig: $(obj)/gconf
-+PHONY += scriptconfig iscriptconfig kconfiglibtestconfig
+@@ -27,2 +27,32 @@ gconfig: $(obj)/gconf
+
++PHONY += scriptconfig iscriptconfig kmenuconfig dumpvarsconfig
+
-+ifneq ($(filter scriptconfig iscriptconfig,$(MAKECMDGOALS)),)
-+PYTHONCMD ?= python
-+endif
++PYTHONCMD ?= python
++kpythonpath := PYTHONPATH=$(srctree)/Kconfiglib:$$PYTHONPATH
++kpython := $(kpythonpath) $(PYTHONCMD)
++kpython3 := $(kpythonpath) python3
+
+ifneq ($(filter scriptconfig,$(MAKECMDGOALS)),)
+ifndef SCRIPT
@@ -25,29 +27,23 @@ index 8c12c20c55a6..88c618b34915 100644
+endif
+
+scriptconfig:
-+ifdef SCRIPT_ARG
-+ $(Q)PYTHONPATH="$(srctree)/Kconfiglib:$$PYTHONPATH" \
-+ "$(PYTHONCMD)" "$(SCRIPT)" $(Kconfig) "$(SCRIPT_ARG)"
-+else
-+ $(Q)PYTHONPATH="$(srctree)/Kconfiglib:$$PYTHONPATH" \
-+ "$(PYTHONCMD)" "$(SCRIPT)" $(Kconfig)
-+endif
++ $(Q)$(kpython) $(SCRIPT) $(Kconfig) $(if $(SCRIPT_ARG),"$(SCRIPT_ARG)")
+
+iscriptconfig:
-+ $(Q)PYTHONPATH="$(srctree)/Kconfiglib:$$PYTHONPATH" "$(PYTHONCMD)" -i -c \
++ $(Q)$(kpython) -i -c \
+ "import kconfiglib; \
+ import sys; \
-+ kconf = kconfiglib.Kconfig(sys.argv[4 if \"$(PYTHONCMD)\".startswith(\"ipython\") else 1]); \
-+ print(\"A Kconfig instance 'kconf' for the architecture $(ARCH) has been created.\")" \
++ kconf = kconfiglib.Kconfig(sys.argv[4 if '$(PYTHONCMD)'.startswith('ipython') else 1]); \
++ print('A Kconfig instance \'kconf\' for the architecture $(ARCH) has been created.')" \
+ $(Kconfig)
+
-+# Used by testsuite.py to be able to compare output for nonsensical
-+# arch/defconfig combinations, which has proven effective for finding obscure
-+# bugs
-+kconfiglibtestconfig: $(obj)/conf
-+ $(Q)$< --defconfig=.config $(Kconfig)
++kmenuconfig:
++ $(Q)$(kpython3) $(srctree)/Kconfiglib/menuconfig.py $(Kconfig)
++
++dumpvarsconfig:
++ $(Q)$(kpython) $(srctree)/Kconfiglib/examples/dumpvars.py $(Kconfig)
+
menuconfig: $(obj)/mconf
--
-2.14.1
+2.17.1