From bd510a6ffa2376ed984f72a56788db7be7ccce4d Mon Sep 17 00:00:00 2001 From: Magnus Jacobsson Date: Thu, 12 Aug 2021 21:57:44 +0200 Subject: [PATCH] common: make awk crlf agnostic when generating svgcolor_lib Fixes errors like this with Cygwin in a crlf environment with SHELLOPTS=igncr: /cygdrive/c/Users/magja/graphviz/build/lib/common/common/colortbl.h:1524:2: error: missing terminating " character 1524 | {"/svg/ ",0,255,255,255,0,0,0}, | ^~~~~~ Although not shown in the error message, this line actually contained a carriage return after /svg/: {"/svg/ ",0,255,255,255,0,0,0}, --- lib/common/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/common/CMakeLists.txt b/lib/common/CMakeLists.txt index 7a668866e..144c442ae 100644 --- a/lib/common/CMakeLists.txt +++ b/lib/common/CMakeLists.txt @@ -6,7 +6,7 @@ add_definitions(-DGVC_EXPORTS -D_BLD_gvc=1) add_custom_command( OUTPUT svgcolor_lib DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/svgcolor_names ${TOP_SOURCE_DIR}/awk/svgcolor.awk - COMMAND ${AWK_EXECUTABLE} -f ${TOP_SOURCE_DIR}/awk/svgcolor.awk + COMMAND ${AWK_EXECUTABLE} -v RS="\\r*\\n" -f ${TOP_SOURCE_DIR}/awk/svgcolor.awk ${CMAKE_CURRENT_SOURCE_DIR}/svgcolor_names > ${CMAKE_CURRENT_BINARY_DIR}/svgcolor_lib ) add_custom_command( -- 2.40.0