Browse Source

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>
pull/40911/head
Trond Einar Snekvik 4 years ago committed by Maureen Helm
parent
commit
6a8326ff1e
  1. 2
      scripts/zephyr_module.py

2
scripts/zephyr_module.py

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

Loading…
Cancel
Save