From 0caa5a82b08fe85d79a96223c3e7e254ebcfd6cd Mon Sep 17 00:00:00 2001 From: Jamie McCrae Date: Fri, 21 Jun 2024 11:41:49 +0100 Subject: [PATCH] cmake: modules: extensions: Fix dts watch file processing Fixes and simplifies the handling of how the dts watch file is processed Signed-off-by: Grzegorz Swiderski Signed-off-by: Jamie McCrae (cherry picked from commit 11c1f3de616e7d22b99f65925ba42bfb7c7c1be4) --- cmake/modules/extensions.cmake | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/cmake/modules/extensions.cmake b/cmake/modules/extensions.cmake index 93ae48ca7b201b..e95129c1a71619 100644 --- a/cmake/modules/extensions.cmake +++ b/cmake/modules/extensions.cmake @@ -2224,16 +2224,8 @@ function(toolchain_parse_make_rule input_file include_files) # the file paths are short, split these up into multiple elements using regex string(REGEX REPLACE "([^ ])[ ]([^ ])" "\\1;\\2" input_as_list "${input_as_list}") - # Pop the first line and treat it specially + # Pop the first item containing "empty_file.o:" list(POP_FRONT input_as_list first_input_line) - string(FIND ${first_input_line} ": " index) - math(EXPR j "${index} + 2") - string(SUBSTRING ${first_input_line} ${j} -1 first_include_file) - - # Remove whitespace before and after filename and convert to CMake path. - string(STRIP "${first_include_file}" first_include_file) - file(TO_CMAKE_PATH "${first_include_file}" first_include_file) - set(result "${first_include_file}") # Remove whitespace before and after filename and convert to CMake path. foreach(file ${input_as_list})