diff options
author | Jacob Nevins <jacobn@chiark.greenend.org.uk> | 2022-10-19 21:44:14 +0300 |
---|---|---|
committer | Jacob Nevins <jacobn@chiark.greenend.org.uk> | 2022-10-19 22:08:09 +0300 |
commit | 68c97fb22a03b51b74a3b4246570d03a1a627707 (patch) | |
tree | 0a4793e5434a2b7075c73b05d902dfd11e0cc9a0 | |
parent | 2222cd104dc5bd424fe025b98c133c91195cf9f3 (diff) |
Fix installing man pages from our tarballs.
As of the cyclic-dependency fix in b01173c6b7, building from our tarball
using the instructions in its README (using the source tree as build
tree), in the absence of Halibut, would lead to the pre-built man pages
not being installed.
(Also, a load of "Could not build man page" complaints at cmake
generation time, which is how I actually noticed.)
-rw-r--r-- | doc/CMakeLists.txt | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index fb4c0c70..79b1ba1f 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -140,12 +140,17 @@ macro(manpage title section) DEPENDS mancfg.but man-${title}.but) register_manpage(${title} ${section}) - elseif(NOT (DOCBUILDDIR STREQUAL DOCSRCDIR) - AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${title}.${section}) - add_custom_command(OUTPUT ${title}.${section} - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${CMAKE_CURRENT_SOURCE_DIR}/${title}.${section} ${title}.${section} - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${title}.${section}) + elseif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${title}.${section}) + # Our tarballs include prebuilt man pages in the source tree, so + # they can be installed from there even if Halibut isn't available. + if(NOT (DOCBUILDDIR STREQUAL DOCSRCDIR)) + # Iff the build tree isn't the source tree, they'll need copying + # to the build tree first. + add_custom_command(OUTPUT ${title}.${section} + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${CMAKE_CURRENT_SOURCE_DIR}/${title}.${section} ${title}.${section} + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${title}.${section}) + endif() register_manpage(${title} ${section}) endif() endmacro() |