summaryrefslogtreecommitdiff
path: root/examples/allnoconfig_simpler.py
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2018-05-27 20:37:59 +0200
committerUlf Magnusson <ulfalizer@gmail.com>2018-05-27 20:37:59 +0200
commit4c4f184a3a648b8cb748ab35159a09ccd06b2ff7 (patch)
tree0a221ad8525a590ade6f7fe7329869797dab7307 /examples/allnoconfig_simpler.py
parent81a0b2ede3f59784d271a60701291e2a0dfc2a7d (diff)
allnoconfig: Move from examples/ to root
Put to-be-packaged stuff in the root. Use allnoconfig_simpler.py, and rename allnoconfig.py to allnoconfig_walk.py and keep it as an example.
Diffstat (limited to 'examples/allnoconfig_simpler.py')
-rw-r--r--examples/allnoconfig_simpler.py22
1 files changed, 0 insertions, 22 deletions
diff --git a/examples/allnoconfig_simpler.py b/examples/allnoconfig_simpler.py
deleted file mode 100644
index 3babcab..0000000
--- a/examples/allnoconfig_simpler.py
+++ /dev/null
@@ -1,22 +0,0 @@
-# This is a simpler version of allnoconfig.py, corresponding to how the C
-# implementation does it. Verified by the test suite to produce identical
-# output to 'make allnoconfig' for all ARCHes.
-#
-# Usage:
-#
-# $ make [ARCH=<arch>] scriptconfig SCRIPT=Kconfiglib/examples/allnoconfig_simpler.py
-
-from kconfiglib import Kconfig, BOOL, TRISTATE
-import sys
-
-kconf = Kconfig(sys.argv[1])
-
-# Avoid warnings printed by Kconfiglib when assigning a value to a symbol that
-# has no prompt. Such assignments never have an effect.
-kconf.disable_warnings()
-
-for sym in kconf.defined_syms:
- if sym.type in (BOOL, TRISTATE):
- sym.set_value(2 if sym.is_allnoconfig_y else 0)
-
-kconf.write_config(".config")