From 65639b40bd90d79afc1ffdcada926c99e6954102 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Tue, 11 Dec 2012 08:38:20 +0100 Subject: Make it possible to pass an argument via scriptconfig. --- kconfiglib.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'kconfiglib.py') diff --git a/kconfiglib.py b/kconfiglib.py index ffae96f..08cec75 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -30,18 +30,19 @@ Kconfig-based configuration systems. Features include the following: For the Linux kernel, scripts are run using - $ make scriptconfig SCRIPT= + $ make scriptconfig SCRIPT= [SCRIPT_ARG=] Running scripts via the 'scriptconfig' target ensures that required environment variables (SRCARCH, ARCH, srctree, KERNELVERSION, etc.) are set up correctly. Alternative architectures can be specified like for other 'make *config' targets: - $ make scriptconfig ARCH=mips SCRIPT= + $ make scriptconfig ARCH=mips SCRIPT= [SCRIPT_ARG=] The script will receive the name of the Kconfig file to load in sys.argv[1]. (As of Linux 3.7.0-rc8 this is always "Kconfig" from the kernel top-level -directory.) +directory.) If an argument is provided with SCRIPT_ARG, it will appear in +sys.argv[2]. To get an interactive Python prompt with Kconfiglib preloaded and a Config object 'c' created, use -- cgit v1.2.3