@@ -146,9 +146,9 @@ def process_cmake(module, meta):
146146 cmake_extern = section .get ('cmake-ext' , False )
147147 if cmake_extern :
148148 return ('\" {}\" :\" {}\" :\" {}\" \n '
149- .format (module_path . name ,
149+ .format (meta [ ' name' ] ,
150150 module_path .as_posix (),
151- "${ZEPHYR_" + module_path . name .upper () + "_CMAKE_DIR}" ))
151+ "${ZEPHYR_" + meta [ ' name' ] .upper () + "_CMAKE_DIR}" ))
152152
153153 cmake_setting = section .get ('cmake' , None )
154154 if not validate_setting (cmake_setting , module , 'CMakeLists.txt' ):
@@ -185,11 +185,11 @@ def process_settings(module, meta):
185185 return out_text
186186
187187
188- def kconfig_snippet (path , kconfig_file = None ):
189- snippet = (f'menu "{ path . name } ({ path } )"' ,
188+ def kconfig_snippet (name , path , kconfig_file = None ):
189+ snippet = (f'menu "{ name } ({ path } )"' ,
190190 f'osource "{ kconfig_file .resolve ().as_posix ()} "' if kconfig_file
191- else f'osource "$(ZEPHYR_{ path . name .upper ()} _KCONFIG)"' ,
192- f'config ZEPHYR_{ path . name .upper ()} _MODULE' ,
191+ else f'osource "$(ZEPHYR_{ name .upper ()} _KCONFIG)"' ,
192+ f'config ZEPHYR_{ name .upper ()} _MODULE' ,
193193 ' bool' ,
194194 ' default y' ,
195195 'endmenu\n ' )
@@ -202,7 +202,7 @@ def process_kconfig(module, meta):
202202 module_yml = module_path .joinpath ('zephyr/module.yml' )
203203 kconfig_extern = section .get ('kconfig-ext' , False )
204204 if kconfig_extern :
205- return kconfig_snippet (module_path )
205+ return kconfig_snippet (meta [ 'name' ], module_path )
206206
207207 kconfig_setting = section .get ('kconfig' , None )
208208 if not validate_setting (kconfig_setting , module ):
@@ -212,7 +212,7 @@ def process_kconfig(module, meta):
212212
213213 kconfig_file = os .path .join (module , kconfig_setting or 'zephyr/Kconfig' )
214214 if os .path .isfile (kconfig_file ):
215- return kconfig_snippet (module_path , Path (kconfig_file ))
215+ return kconfig_snippet (meta [ 'name' ], module_path , Path (kconfig_file ))
216216 else :
217217 return ""
218218
0 commit comments