aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2022-09-25 21:24:00 +0200
committerPřemysl Eric Janouch <p@janouch.name>2022-09-25 21:24:18 +0200
commit4ed58dd89ab7ef8b1390a2814d87e0a0b329f793 (patch)
treeac1de034945207873b785ce1e4069f09bd66bea1 /CMakeLists.txt
parent022668fb2336433fda051357fc273b91a9a7092f (diff)
downloadjson-rpc-shell-4ed58dd89ab7ef8b1390a2814d87e0a0b329f793.tar.gz
json-rpc-shell-4ed58dd89ab7ef8b1390a2814d87e0a0b329f793.tar.xz
json-rpc-shell-4ed58dd89ab7ef8b1390a2814d87e0a0b329f793.zip
Bump liberty, make use of its new asciiman.awk
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 9 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 98a5291..135ef0a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -99,7 +99,8 @@ install (FILES LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR})
find_program (ASCIIDOCTOR_EXECUTABLE asciidoctor)
find_program (A2X_EXECUTABLE a2x)
if (NOT ASCIIDOCTOR_EXECUTABLE AND NOT A2X_EXECUTABLE)
- message (FATAL_ERROR "Neither asciidoctor nor a2x were found")
+ message (WARNING "Neither asciidoctor nor a2x were found, "
+ "falling back to a substandard manual page generator")
endif ()
foreach (page ${PROJECT_NAME})
@@ -121,6 +122,13 @@ foreach (page ${PROJECT_NAME})
"${PROJECT_SOURCE_DIR}/${page}.adoc"
DEPENDS ${page}.adoc
COMMENT "Generating man page for ${page}" VERBATIM)
+ else ()
+ set (ASCIIMAN ${PROJECT_SOURCE_DIR}/liberty/tools/asciiman.awk)
+ add_custom_command (OUTPUT ${page_output}
+ COMMAND env LC_ALL=C awk -f ${ASCIIMAN}
+ "${PROJECT_SOURCE_DIR}/${page}.adoc" > ${page_output}
+ DEPENDS ${page}.adoc ${ASCIIMAN}
+ COMMENT "Generating man page for ${page}" VERBATIM)
endif ()
endforeach ()