From da2df35fbf1284aaecdf9cd1568f6ee734245e44 Mon Sep 17 00:00:00 2001 From: "Keith W. Campbell" Date: Mon, 15 Mar 2021 13:35:21 -0400 Subject: [PATCH] DDR: omit blank lines in annt files Remove CR and trailing whitespace. Signed-off-by: Keith W. Campbell --- cmake/modules/ddr/DDRSetStub.cmake.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/modules/ddr/DDRSetStub.cmake.in b/cmake/modules/ddr/DDRSetStub.cmake.in index db453acb2e1..b1bcab6b553 100644 --- a/cmake/modules/ddr/DDRSetStub.cmake.in +++ b/cmake/modules/ddr/DDRSetStub.cmake.in @@ -151,7 +151,7 @@ function(process_source_files src_files) add_custom_command( OUTPUT "${annt_file}" DEPENDS "${stub_file}" - COMMAND ${pp_command} | awk "/^\$/ { next } /^DDRFILE_BEGIN /,/^DDRFILE_END / { print \"@\" $0 }" > ${annt_file} + COMMAND ${pp_command} | awk "/^DDRFILE_BEGIN /,/^DDRFILE_END / { gsub(/[\\t\\r ]*$/, \"\"); if (NF != 0) { print \"@\" $0 } }" > ${annt_file} VERBATIM ) endforeach()