 +	$(Q)PYTHONPATH="$(srctree)/Kconfiglib:$$PYTHONPATH" "$(PYTHONCMD)" -i -c \
 +	  "import kconfiglib; \
 +	   import sys; \
-+	   c = kconfiglib.Config(sys.argv[1]); \
++	   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())" \
 +	  $(srctree)/$(Kconfig)
 +

From 10d327f145cfd2004ba5c9f4e8fbb6a9a6d725a4 Mon Sep 17 00:00:00 2001
From: Ulf Magnusson <ulfalizer@gmail.com>
Date: Fri, 7 Dec 2012 03:58:36 +0100
Subject: [PATCH] Kconfiglib scripts/kconfig/Makefile patch.

---
 scripts/kconfig/Makefile |   35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index 3091794..012bafb 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -11,6 +11,41 @@ else

 	$< $(Kconfig)
 
-- 
1.8.1.2

