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.
This commit is contained in:
Gerald Combs 2021-10-20 09:32:37 -07:00 committed by Wireshark GitLab Utility
parent da1d1c30f4
commit 44bd3a7d79
2 changed files with 6 additions and 20 deletions

View File

@ -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)

View File

@ -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}