From 374f48873424f9167f508a53a80f3ea1c2d41c46 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Sat, 8 Sep 2018 17:25:51 +0200 Subject: Clean up kernel Makefile patch and add new targets Add two new targets: - 'make kmenuconfig' runs the menuconfig interface - 'make dumpvarsconfig' lists all referenced environment variables together with their values (assuming they used the preprocessor syntax) Remove the 'kconfiglibtestconfig' target, which is no longer used. Also clean up the target definitions. The joys of ancient code. --- examples/dumpvars.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 examples/dumpvars.py (limited to 'examples/dumpvars.py') diff --git a/examples/dumpvars.py b/examples/dumpvars.py new file mode 100644 index 0000000..5ce65c2 --- /dev/null +++ b/examples/dumpvars.py @@ -0,0 +1,15 @@ +# Shows a list of all (set) environment variables referenced in the Kconfig +# files, together with their values. +# +# Note: This only works for environment variables referenced via the $(FOO) +# preprocessor syntax. The older $FOO syntax is maintained for backwards +# compatibility. + +import os +import sys + +import kconfiglib + + +for var in kconfiglib.Kconfig(sys.argv[1]).env_vars: + print("{:16} '{}'".format(var, os.environ[var])) -- cgit v1.2.3