@@ -129,12 +129,12 @@ function(internal_yaml_list_append var genex key)
129129 endif ()
130130 list (POP_FRONT ARG_YAML_LIST map_value)
131131 string (REGEX REPLACE "([^\\ ])," "\\ 1;" pair_list "${map_value} " )
132- set (qouted_map_value )
132+ set (quoted_map_value )
133133 foreach (pair ${pair_list} )
134134 if (NOT pair MATCHES "[^ ]*:[^ ]*" )
135135 message (FATAL_ERROR "yaml_set(MAP ${map_value} ) is malformed.\n "
136136 "Syntax is 'LIST MAP \" key1: value1.1, ...\" MAP \" key1: value1.2, ...\"\n "
137- "If value contains comma ',' then ensure the value field is properly qouted "
137+ "If value contains comma ',' then ensure the value field is properly quoted "
138138 "and escaped"
139139 )
140140 endif ()
@@ -145,10 +145,10 @@ function(internal_yaml_list_append var genex key)
145145 message (FATAL_ERROR "value: ${value} is not properly quoted" )
146146 endif ()
147147 string (REGEX REPLACE "\\\\ ," "," value "${value} " )
148- list (APPEND qouted_map_value "\" ${map_key} \" : \" ${value} \" " )
148+ list (APPEND quoted_map_value "\" ${map_key} \" : \" ${value} \" " )
149149 endforeach ()
150- list (JOIN qouted_map_value "," qouted_map_value )
151- string (JSON json_content SET "${json_content} " ${key} ${i} "{${qouted_map_value } }" )
150+ list (JOIN quoted_map_value "," quoted_map_value )
151+ string (JSON json_content SET "${json_content} " ${key} ${i} "{${quoted_map_value } }" )
152152 endforeach ()
153153 else ()
154154 math (EXPR stop "${index} + ${length} - 1" )
@@ -499,7 +499,7 @@ function(yaml_save)
499499 FILE (WRITE ${yaml_file} "${yaml_out} " )
500500
501501 set (save_target ${ARG_YAML_NAME} _yaml_saved)
502- if (NOT TARGET ${save_target} )
502+ if (NOT TARGET ${save_target} )
503503 # Create a target for the completion of the YAML save operation.
504504 # This will be a dummy unless genexes are used.
505505 add_custom_target (${save_target} ALL DEPENDS ${yaml_file} )
@@ -509,16 +509,16 @@ function(yaml_save)
509509 )
510510 endif ()
511511
512- if (genex)
512+ if (genex)
513513 get_property (genex_save_count TARGET ${save_target} PROPERTY genex_save_count)
514- if (${genex_save_count} EQUAL 0)
514+ if (${genex_save_count} EQUAL 0)
515515 # First yaml_save() for this context with genexes enabled
516516 add_custom_command (
517517 OUTPUT ${yaml_file}
518- DEPENDS $<TARGET_PROPERTY:${save_target} ,json_file >
518+ DEPENDS $<TARGET_PROPERTY:${save_target} ,expanded_file >
519519 COMMAND ${CMAKE_COMMAND}
520- -DJSON_FILE ="$<TARGET_PROPERTY:${save_target} ,json_file >"
521- -DYAML_FILE ="${yaml_file} "
520+ -DEXPANDED_FILE ="$<TARGET_PROPERTY:${save_target} ,expanded_file >"
521+ -DOUTPUT_FILE ="${yaml_file} "
522522 -DTEMP_FILES="$<TARGET_PROPERTY:${save_target} ,temp_files>"
523523 -P ${ZEPHYR_BASE} /cmake/yaml-filter .cmake
524524 )
@@ -529,13 +529,13 @@ function(yaml_save)
529529
530530 cmake_path(SET yaml_path "${yaml_file} " )
531531 cmake_path(GET yaml_path STEM yaml_file_no_ext)
532- set (json_file ${yaml_file_no_ext} _${genex_save_count} .json)
533- set_property (TARGET ${save_target} PROPERTY json_file ${json_file } )
532+ set (expanded_file ${yaml_file_no_ext} _${genex_save_count} .json)
533+ set_property (TARGET ${save_target} PROPERTY expanded_file ${expanded_file } )
534534
535- # comment this to keep the temporary JSON files
536- set_property (TARGET ${save_target} APPEND PROPERTY temp_files ${json_file } )
535+ # comment this to keep the temporary files
536+ set_property (TARGET ${save_target} APPEND PROPERTY temp_files ${expanded_file } )
537537
538- FILE (GENERATE OUTPUT ${json_file }
538+ FILE (GENERATE OUTPUT ${expanded_file }
539539 CONTENT "${json_content} "
540540 )
541541 endif ()
@@ -595,7 +595,7 @@ function(to_yaml in_json level yaml genex)
595595 # - with unexpanded generator expressions: save as YAML comment
596596 # - if it matches the special prefix: convert to YAML list
597597 # - otherwise: save as YAML scalar
598- if (subjson MATCHES "\\ $<.*>" AND ${genex} )
598+ if (subjson MATCHES "\\ $<.*>" AND ${genex} )
599599 # Yet unexpanded generator expression: save as comment
600600 string (SUBSTRING ${indent_${level} } 1 -1 short_indent)
601601 set (${yaml} "${${yaml} }#${short_indent}${member} : ${subjson} \n " )
0 commit comments