From e45a4ad5b400482e2d79af88f4fd29559280f95b Mon Sep 17 00:00:00 2001 From: Magnus Jacobsson Date: Thu, 12 Aug 2021 22:02:48 +0200 Subject: [PATCH] plugin/core: make awk crlf agnostic when generating ps.h Fixes errors like this with Cygwin in a crlf environment with SHELLOPTS=igncr: /cygdrive/c/Users/magja/graphviz/build/plugin/core/ps.h:2:1: error: missing terminating " character 2 | "%%BeginProlog ", | ^~~~~~~~~~~~~~ Although not shown in the error message, this line actually contained a carriage return after %%BeginProlog: "%%BeginProlog ", --- plugin/core/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/core/CMakeLists.txt b/plugin/core/CMakeLists.txt index c717bf984..0fd75b88a 100644 --- a/plugin/core/CMakeLists.txt +++ b/plugin/core/CMakeLists.txt @@ -2,7 +2,7 @@ add_custom_command( OUTPUT ps.h DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/ps.txt - COMMAND ${AWK_EXECUTABLE} -f ${TOP_SOURCE_DIR}/awk/stringize.awk + COMMAND ${AWK_EXECUTABLE} -v RS="\\r*\\n" -f ${TOP_SOURCE_DIR}/awk/stringize.awk ${CMAKE_CURRENT_SOURCE_DIR}/ps.txt > ${CMAKE_CURRENT_BINARY_DIR}/ps.h ) -- 2.49.0