From 3414238a1080d492d350ae1f245cc2777b2daf08 Mon Sep 17 00:00:00 2001 From: Alexis Hildebrandt Date: Mon, 24 Apr 2023 12:37:50 +0200 Subject: doc: Generate PDF version of ledger manpage when building web docs --- doc/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc') diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 9a4a728d..66b92c21 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -160,6 +160,11 @@ if (BUILD_WEB_DOCS) DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/ledger.1 VERBATIM) list(APPEND ledger_doc_files ledger.1.html) + add_custom_command(OUTPUT ledger.1.pdf + COMMAND ${BASH} -c "${_cmd} -mandoc -Tpdf ${CMAKE_CURRENT_SOURCE_DIR}/ledger.1 > ledger.1.pdf" + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/ledger.1 + VERBATIM) + list(APPEND ledger_doc_files ledger.1.pdf) else() message(FATAL_ERROR "Could not find man2html or groff. HTML version of man page cannot be built.") endif() -- cgit v1.2.3