1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-03-16 12:03:03 -05:00

Merge man page install fix from 'pre-0.78'.

This commit is contained in:
Jacob Nevins 2022-10-19 23:01:15 +01:00
commit 1a1e2f2380

View File

@ -140,12 +140,17 @@ macro(manpage title section)
DEPENDS DEPENDS
mancfg.but man-${title}.but) mancfg.but man-${title}.but)
register_manpage(${title} ${section}) register_manpage(${title} ${section})
elseif(NOT (DOCBUILDDIR STREQUAL DOCSRCDIR) elseif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${title}.${section})
AND 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} add_custom_command(OUTPUT ${title}.${section}
COMMAND ${CMAKE_COMMAND} -E copy_if_different COMMAND ${CMAKE_COMMAND} -E copy_if_different
${CMAKE_CURRENT_SOURCE_DIR}/${title}.${section} ${title}.${section} ${CMAKE_CURRENT_SOURCE_DIR}/${title}.${section} ${title}.${section}
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${title}.${section}) DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${title}.${section})
endif()
register_manpage(${title} ${section}) register_manpage(${title} ${section})
endif() endif()
endmacro() endmacro()