diff options
author | Alexis Hildebrandt <afh@surryhill.net> | 2023-04-25 11:41:06 +0200 |
---|---|---|
committer | Alexis Hildebrandt <afh@surryhill.net> | 2023-04-25 21:25:54 +0200 |
commit | c38c23dcab5d7e5e389ea5527301017571cfce24 (patch) | |
tree | 0f2447c0be2c231dddf40dd92be4ed07566f5ce6 /doc/CMakeLists.txt | |
parent | 209f6f4a52c923ce8424a0ffcc57cbf0c1a25aea (diff) | |
download | fork-ledger-c38c23dcab5d7e5e389ea5527301017571cfce24.tar.gz fork-ledger-c38c23dcab5d7e5e389ea5527301017571cfce24.tar.bz2 fork-ledger-c38c23dcab5d7e5e389ea5527301017571cfce24.zip |
doc: Generate Ledger Python module documentation
using pydoc when building web docs.
Diffstat (limited to 'doc/CMakeLists.txt')
-rw-r--r-- | doc/CMakeLists.txt | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 58034f63..ef93c293 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -170,7 +170,17 @@ if (BUILD_WEB_DOCS) 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.") + message(WARNING "Could not find man2html or groff. HTML version of man page will not be built.") + endif() + + if (USE_PYTHON AND Python_EXECUTABLE) + add_custom_command(OUTPUT ledger.html + COMMAND ${CMAKE_COMMAND} -E env + PYTHONPATH=${CMAKE_BINARY_DIR} + ${Python_EXECUTABLE} -m pydoc -w ledger + DEPENDS ${CMAKE_BINARY_DIR}/${_ledger_python_module_name} + VERBATIM) + list(APPEND ledger_doc_files ledger.html) endif() endif(BUILD_WEB_DOCS) |