From 6b871898d82c0b902a9766b2eeb5c1b682786080 Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch
Date: Mon, 8 Nov 2021 06:36:01 +0100 Subject: Fix build on macOS and other non-GNU systems --- CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 12bc35a..2e637cd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -94,13 +94,13 @@ include_directories (${PROJECT_SOURCE_DIR} ${PROJECT_BINARY_DIR}) set (actions ${PROJECT_BINARY_DIR}/nncmpp-actions.h) add_custom_command (OUTPUT ${actions} COMMAND cpp -I${PROJECT_BINARY_DIR} -P ${PROJECT_SOURCE_DIR}/nncmpp.actions - | grep . | tr [[\n]] [[\t]] | sed -ne [[y/\t/\n/]] > ${actions} - -e [[h; s/,[^\n]*/,/g]] -e [[s/$/COUNT/]] - -e [[s/[^\n]*/\tACTION_&/g]] -e [[s/.*/enum action {\n&\n};\n/p]] - -e [[g; s/,[^\n]*//g; y/_/-/]] -e [[s/[^\n]\{1,\}/\t"&",/g]] + | grep . | tr [[\n]] ^ | sed -ne [[h; s/,[^^]*/,/g]] -e [[s/$/COUNT/]] + -e [[s/[^^]*/\tACTION_&/g]] -e [[s/.*/enum action {\n&\n};\n/p]] + -e [[g; s/,[^^]*//g; y/_/-/]] -e [[s/[^^]\{1,\}/\t"&",/g]] -e [[s/.*/static const char *g_action_names[] = {\n&};\n/p]] - -e [[g; s/[^\n]*, //g;]] -e [[s/[^\n]\{1,\}/\t"&",/g]] + -e [[g; s/[^^]*, *//g;]] -e [[s/[^^]\{1,\}/\t"&",/g]] -e [[s/.*/static const char *g_action_descriptions[] = {\n&};/p]] + | tr ^ [[\n]] > ${actions} COMMAND test -s ${actions} DEPENDS ${PROJECT_BINARY_DIR}/config.h VERBATIM) -- cgit v1.2.3-70-g09d2