modules: Use posix paths in Kconfig module prompts

kconfiglib doesn't render backslashes in menu strings, and the prompts
in the module menu will be unintelligible on Windows. Print these
menus as posix paths on Windows as well, so they don't look broken in
menuconfig.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
This commit is contained in:
Trond Einar Snekvik 2021-12-02 15:44:36 +01:00 committed by Maureen Helm
parent 31e5b1b861
commit 6a8326ff1e

View File

@ -193,7 +193,7 @@ def kconfig_snippet(meta, path, kconfig_file=None):
name = meta['name']
name_sanitized = meta['name-sanitized']
snippet = (f'menu "{name} ({path})"',
snippet = (f'menu "{name} ({path.as_posix()})"',
f'osource "{kconfig_file.resolve().as_posix()}"' if kconfig_file
else f'osource "$(ZEPHYR_{name_sanitized.upper()}_KCONFIG)"',
f'config ZEPHYR_{name_sanitized.upper()}_MODULE',