summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-06-04Add syncconfig.py, used for incremental buildsUlf Magnusson
This script calls through to Kconfiglib.sync_deps() and can be used to implement incremental builds. Having additional dependency mechanisms for changes to Kconfig files and environment variables is redundant, because those changes indirectly influence symbol values and will be caught as well.
2018-05-31menuconfig: Fix outdated commentUlf Magnusson
cached_search_strings was renamed to cached_search_nodes.
2018-05-31Reorder compatibility testsUlf Magnusson
The defconfig tests tend to find any issue quickly, so keep those first. Go alldefconfig -> allnoconfig -> allmodconfig -> allyesconfig after that, and do the sanity checks at the end.
2018-05-31Simplify allyesconfigUlf Magnusson
Setting all tristate choice symbols to 'm' is enough to always do the right thing in practice. It has no effect for bool choice symbols (since 'm' will be ignored), but forces symbols in m-mode choices to 'm'. 'm' will also be ignored for tristate choice symbols in choices in 'y' mode, because tristate is automagically converted to bool there.
2018-05-30Add an allmodconfig implementationUlf Magnusson
Verified to produce identical output to 'make allmodconfig', for all arches. Will be packaged.
2018-05-30Update source links in READMEUlf Magnusson
To-be-packaged scripts now live in the root.
2018-05-30Add an alldefconfig.py scriptUlf Magnusson
Will be packaged. Piggyback test suite cleanups to make test names match the name of the script being tested.
2018-05-30Remove unused all{no,yes}config importsUlf Magnusson
No longer used after the tool helpers were added.
2018-05-30Add tool helper for loading/saving .config filesUlf Magnusson
Removes repeated KCONFIG_CONFIG boilerplate. Also make allyesconfig use KCONFIG_CONFIG when writing (oversight), and document the sys.exit() behavior for standard_kconfig().
2018-05-30Add tool helper for selecting the top-level KconfigUlf Magnusson
standard_kconfig() gets the top-level Kconfig file from the first command-line argument, defaulting to "Kconfig". This removes some boilerplate from tools.
2018-05-30allyesconfig: Prepare for packagingUlf Magnusson
Move to the root, simplify a bit, provide an entry point function (for setuptools's entry_points).
2018-05-28Simplify allyesconfig.py example with Kconfig.choicesUlf Magnusson
Could do something similar to allnoconfig.py for the packaged version.
2018-05-27Provide lists with all menus and commentsUlf Magnusson
Handy e.g. when implementing advanced search features.
2018-05-27Make Kconfig._choices publicUlf Magnusson
Useful in various places outside the library, e.g. in the upcoming packaged allyesconfig implementation, and when generating documentation.
2018-05-27Actually commit new allnoconfig.pyUlf Magnusson
Oops.
2018-05-27allnoconfig: Move from examples/ to rootUlf Magnusson
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.
2018-05-27oldconfig: Move from examples/ to rootUlf Magnusson
All the packaged code will appear in the root.
2018-05-27oldconfig: Prepare for packagingUlf Magnusson
setuptools' 'entry_points' gives nice behavior on Windows. It requires that the module has an entry point function. Create one and move the command line argument handling to it. Piggyback KCONFIG_CONFIG support, and make the script executable (oversight).
2018-05-27menuconfig: Always prompt for save when output file is missingUlf Magnusson
An output file should still be generated if you're happy with the default settings.
2018-05-27oldconfig: Show help with '?' instead of '??'Ulf Magnusson
This matches the C tools. Hadn't noticed they had the same feature.
2018-05-27Simplify error exitsUlf Magnusson
Had missed sys.exit(msg).
2018-05-27Get rid of the predefined UNAME_RELEASE symbolUlf Magnusson
Commit cbf32e2 ("Expand environment variables in strings directly") added direct expansion of environment variables is strings, with commit b9384a1 ("Restore compatibility with $UNAME_RELEASE") adding a hack to restore compatibility with the predefined $UNAME_RELEASE symbol, used by DEFCONFIG_LIST in the Linux kernel. With the compatibility hack in place, there's no longer any need to define UNAME_RELEASE as a proper symbol. Remove it.
2018-05-27menuconfig: Prepare for packagingUlf Magnusson
setuptools' 'entry_points' gives nice behavior on Windows. It requires that the module has an entry point function. Create one and move the command line argument handling to it.
2018-05-27Simplify unquoted string default checkUlf Magnusson
D'oh
2018-05-26Micro-optimize _parse_help() loopUlf Magnusson
Shaves ~6% off the _parse_help() runtime for the x86 Kconfigs in cProfile.
2018-05-25Style nitUlf Magnusson
2018-05-25Warn if quotes are omitted around string defaultsUlf Magnusson
This takes some heuristics, as it's indistinguishable from a reference to an undefined symbol. Guess that the quotes are missing if the 'default' value isn't all-uppercase.
2018-05-23Update genrest.py link to new locationUlf Magnusson
2018-05-22menuconfig: Move symbol name from title into info textUlf Magnusson
It's easy to miss at the top, especially as it's centered. Have a generic 'Symbol information', 'Choice information', etc., title instead.
2018-05-22menuconfig: Rearrange symbol name printing conditionUlf Magnusson
The name is always shown for items without prompts (which are always promptless symbols). Only show-name mode needs the symbol/choice check.
2018-05-22menuconfig: Add mode for showing all symbol namesUlf Magnusson
Pressing 'c' toggles show-name mode, where names of symbols are displayed before their prompt.
2018-05-21Fix link to genrest.pyUlf Magnusson
2018-05-21menuconfig: Don't show implicit menus in symbol infoUlf Magnusson
Only show "real" (non-indented) menus, like in the menu path at the top.
2018-05-21menuconfig: Quote symbol values in jump-to dialogUlf Magnusson
This is consistent with how they're shown in the info dialog. Looks less confusing for empty strings too.
2018-05-21menuconfig: Show symbol values in search resultsUlf Magnusson
Makes it double as a quick way to check if something is enabled. Suggested by Randy Dunlap.
2018-05-20menuconfig: Use lower() instead of re.IGNORECASE in searchUlf Magnusson
This gets rid of some slight input jerkiness while inputting e.g. '.*debug' on my machine (though the '.*' is redundant there), due to faster matching. The '.*' probably has bad interactions with re.search(), which matches anywhere in the string. A plain "debug" matches about 70% faster, though it's fast enough to feel instant anyway.
2018-05-20menuconfig: Style nitUlf Magnusson
2018-05-20menuconfig: Fix outdated 'matches' commentUlf Magnusson
2018-05-20menuconfig: Search names and prompts separatelyUlf Magnusson
Instead of doing a single search of the '<symbol name> "<prompt>"' string. This avoids gotchas like '_DEBUG$' not matching FOO_DEBUG if FOO_DEBUG has a prompt.
2018-05-20menuconfig: Formatting nitUlf Magnusson
2018-05-20menuconfig: Fix bad regex crash on Python 3.4-Ulf Magnusson
re.error.msg was added in Python 3.5. Show a generic error message when it isn't available.
2018-05-19menuconfig: Implement scroll offset for text boxesUlf Magnusson
This makes it clearer when an edit box is scrolled, especially when backspacing. The cursor will now only go to the far left/right of the edit box at the start/end of the string. Reuse _SCROLL_OFFSET to specify the scroll offset.
2018-05-19menuconfig: Add info and allow ~ in save/load dialogsUlf Magnusson
List the working directory, which might not be obvious, and support referring to the home directory with ~. Support for multiple lines of help text in input dialogs was added as well.
2018-05-19Warn for incompatible uses of 'option env=...'Ulf Magnusson
Since commit cbf32e2 ("Expand environment variables in strings directly"), Kconfiglib expands environment variables directly in strings instead of using the 'option env=...' mechanism (this is planned for the C tools too). This new behavior is backwards-compatible as long as all 'option env=...' symbols have the same name as the environment variables they reference. Warn if 'option env="FOO"' appears on a symbol that isn't named FOO, to point out compatibility issues and help with debugging.
2018-05-19Micro-optimize help text parsing some moreUlf Magnusson
This code is surprisingly hot.
2018-05-18menuconfig: Remove redundant information for menus and commentsUlf Magnusson
The Kconfig definition already lists the location and menu path, and now shows up at the top.
2018-05-18Get rid of _dedent_rstrip()Ulf Magnusson
Only a single caller left now, in a hot loop.
2018-05-18Warn if prompt contains leading or trailing whitespaceUlf Magnusson
Also strip the prompt in that case. Leading/trailing whitespace in prompts leads to ugly workarounds in e.g. reStructuredText documentation, where '*prompt *' is invalid.
2018-05-18Restore compatibility with $UNAME_RELEASEUlf Magnusson
UNAME_RELEASE is expanded in one of the 'default's of the DEFCONFIG_LIST symbol in the Linux kernel. This broke after "$FOO" was changed to directly expand to the value of the environment variable FOO, rather than to the value of the symbol FOO. Restore compatibility with a small wrapper.
2018-05-18menuconfig: Add .config loading dialogUlf Magnusson
Automatically turn on show-all mode if the currently selected node becomes invisible after loading the new configuration. Show an are-you-sure dialog if there are unsaved changes. A wart here is that there currently isn't a way to get 'errno' and 'strerror' from the IOError exception returned by load_config(). Hack around it by opening the configuration file separately with open() first, just to catch any obvious errors.