From 44bd3a7d7923030be65bb5089c2cfdd1ab2290f1 Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Wed, 20 Oct 2021 09:32:37 -0700 Subject: [PATCH] CMake+Docs: Update our man page targets. Remove the generate_*_pages targets that were recently introduced, since they're not really needed. Only add the "manpages" target if we have Asciidoctor. --- cmake/modules/FindAsciidoctor.cmake | 10 ---------- doc/CMakeLists.txt | 16 ++++++---------- 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/cmake/modules/FindAsciidoctor.cmake b/cmake/modules/FindAsciidoctor.cmake index 69150a1f32..20fe94caa3 100644 --- a/cmake/modules/FindAsciidoctor.cmake +++ b/cmake/modules/FindAsciidoctor.cmake @@ -36,12 +36,6 @@ if(ASCIIDOCTOR_EXECUTABLE) ) endfunction(set_asciidoctor_target_properties) - function(set_manpage_target_properties _target) - set_target_properties(${_target} PROPERTIES - FOLDER "Docs" - ) - endfunction(set_manpage_target_properties) - set (_asciidoctor_common_args # Doesn't work with AsciidoctorJ? # --failure-level=WARN @@ -158,8 +152,6 @@ if(ASCIIDOCTOR_EXECUTABLE) DEPENDS ${_input_adoc} ) - add_custom_target(generate_roff_man${_man_section}_pages DEPENDS ${_output_man}) - set_manpage_target_properties(generate_roff_man${_man_section}_pages) unset(_src_file) unset(_input_adoc) unset(_output_man) @@ -185,8 +177,6 @@ if(ASCIIDOCTOR_EXECUTABLE) DEPENDS ${_input_adoc} ) - add_custom_target(generate_html_man_pages DEPENDS ${_output_man}) - set_manpage_target_properties(generate_html_man_pages) unset(_src_file) unset(_input_adoc) unset(_output_man) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index cd09ca6092..b6137321c6 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -92,22 +92,18 @@ if(ASCIIDOCTOR_FOUND) ASCIIDOCTOR2ROFFMAN(1 ${MAN1_SOURCE_FILES}) ASCIIDOCTOR2ROFFMAN(4 ${MAN4_SOURCE_FILES}) ASCIIDOCTOR2HTMLMAN(${MAN1_SOURCE_FILES} ${MAN4_SOURCE_FILES}) -endif() -add_custom_target(manpages DEPENDS - generate_roff_man1_pages - generate_roff_man4_pages - ${MAN1_INSTALL_FILES} - ${MAN4_INSTALL_FILES} -) + add_custom_target(manpages DEPENDS + ${MAN1_INSTALL_FILES} + ${MAN4_INSTALL_FILES} + ) + set_target_properties(manpages PROPERTIES FOLDER "Docs") +endif() add_custom_target( docs ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/AUTHORS-SHORT - generate_roff_man1_pages - generate_roff_man4_pages - generate_html_man_pages ${MAN1_INSTALL_FILES} ${MAN4_INSTALL_FILES} ${HTML_INSTALL_FILES}