diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2019-03-22 15:42:45 +0100 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2019-03-22 17:29:12 +0100 |
| commit | c70a45eb935dc536ce59ec860c17b4c1c531a663 (patch) | |
| tree | 22afac8b77fefc6e5878b5605e1c878e0edd3345 /allyesconfig.py | |
| parent | e4a71defef40b6ab640dedaf185562f343f963c9 (diff) | |
Convert some comments to module docstrings in utilities
This makes running pydoc(3) on the utilities helpful.
Reuse the module docstring for the --help text for utilities that use
argparse.
Also fix some copy-paste errors in the all*config.py descriptions and
clean up the language a bit.
Piggyback removal of an optimization in allmodconfig.py that's pretty
irrelevant now.
Diffstat (limited to 'allyesconfig.py')
| -rwxr-xr-x | allyesconfig.py | 44 |
1 files changed, 17 insertions, 27 deletions
diff --git a/allyesconfig.py b/allyesconfig.py index e475329..afff0e7 100755 --- a/allyesconfig.py +++ b/allyesconfig.py @@ -3,33 +3,16 @@ # Copyright (c) 2018-2019, Ulf Magnusson # SPDX-License-Identifier: ISC -# Works like 'make allyesconfig'. Verified by the test suite to generate output -# identical to 'make allyesconfig', for all ARCHES. -# -# In theory, we need to handle choices in two different modes: -# -# y: One symbol is y, the rest are n -# m: Any number of symbols are m, the rest are n -# -# Only tristate choices can be in m mode. -# -# Here's a convoluted example of how you might get an m-mode choice even during -# allyesconfig: -# -# choice -# tristate "weird choice" -# depends on m -# -# ... -# -# endchoice -# -# The default output filename is '.config'. A different filename can be passed -# in the KCONFIG_CONFIG environment variable. -# -# Usage for the Linux kernel: -# -# $ make [ARCH=<arch>] scriptconfig SCRIPT=Kconfiglib/examples/allyesconfig.py +""" +Writes a configuration file where as many symbols as possible are set to 'y'. + +The default output filename is '.config'. A different filename can be passed +in the KCONFIG_CONFIG environment variable. + +Usage for the Linux kernel: + + $ make [ARCH=<arch>] scriptconfig SCRIPT=Kconfiglib/examples/allmodconfig.py +""" import kconfiglib @@ -50,6 +33,13 @@ def main(): # 'y' mode (the "normal" mode), which will instead just get their # default selection, but will set all symbols in m-mode choices to 'm', # which is as high as they can go. + # + # Here's a convoluted example of how you might get an m-mode choice + # even during allyesconfig: + # + # choice + # tristate "weird choice" + # depends on m sym.set_value(1 if sym.choice else 2) # Set all choices to the highest possible mode |
