forked from osmocom/wireshark
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:
parent
da1d1c30f4
commit
44bd3a7d79
|
@ -36,12 +36,6 @@ if(ASCIIDOCTOR_EXECUTABLE)
|
||||||
)
|
)
|
||||||
endfunction(set_asciidoctor_target_properties)
|
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
|
set (_asciidoctor_common_args
|
||||||
# Doesn't work with AsciidoctorJ?
|
# Doesn't work with AsciidoctorJ?
|
||||||
# --failure-level=WARN
|
# --failure-level=WARN
|
||||||
|
@ -158,8 +152,6 @@ if(ASCIIDOCTOR_EXECUTABLE)
|
||||||
DEPENDS
|
DEPENDS
|
||||||
${_input_adoc}
|
${_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(_src_file)
|
||||||
unset(_input_adoc)
|
unset(_input_adoc)
|
||||||
unset(_output_man)
|
unset(_output_man)
|
||||||
|
@ -185,8 +177,6 @@ if(ASCIIDOCTOR_EXECUTABLE)
|
||||||
DEPENDS
|
DEPENDS
|
||||||
${_input_adoc}
|
${_input_adoc}
|
||||||
)
|
)
|
||||||
add_custom_target(generate_html_man_pages DEPENDS ${_output_man})
|
|
||||||
set_manpage_target_properties(generate_html_man_pages)
|
|
||||||
unset(_src_file)
|
unset(_src_file)
|
||||||
unset(_input_adoc)
|
unset(_input_adoc)
|
||||||
unset(_output_man)
|
unset(_output_man)
|
||||||
|
|
|
@ -92,22 +92,18 @@ if(ASCIIDOCTOR_FOUND)
|
||||||
ASCIIDOCTOR2ROFFMAN(1 ${MAN1_SOURCE_FILES})
|
ASCIIDOCTOR2ROFFMAN(1 ${MAN1_SOURCE_FILES})
|
||||||
ASCIIDOCTOR2ROFFMAN(4 ${MAN4_SOURCE_FILES})
|
ASCIIDOCTOR2ROFFMAN(4 ${MAN4_SOURCE_FILES})
|
||||||
ASCIIDOCTOR2HTMLMAN(${MAN1_SOURCE_FILES} ${MAN4_SOURCE_FILES})
|
ASCIIDOCTOR2HTMLMAN(${MAN1_SOURCE_FILES} ${MAN4_SOURCE_FILES})
|
||||||
endif()
|
|
||||||
|
|
||||||
add_custom_target(manpages DEPENDS
|
add_custom_target(manpages DEPENDS
|
||||||
generate_roff_man1_pages
|
${MAN1_INSTALL_FILES}
|
||||||
generate_roff_man4_pages
|
${MAN4_INSTALL_FILES}
|
||||||
${MAN1_INSTALL_FILES}
|
)
|
||||||
${MAN4_INSTALL_FILES}
|
set_target_properties(manpages PROPERTIES FOLDER "Docs")
|
||||||
)
|
endif()
|
||||||
|
|
||||||
add_custom_target(
|
add_custom_target(
|
||||||
docs ALL
|
docs ALL
|
||||||
DEPENDS
|
DEPENDS
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/AUTHORS-SHORT
|
${CMAKE_CURRENT_BINARY_DIR}/AUTHORS-SHORT
|
||||||
generate_roff_man1_pages
|
|
||||||
generate_roff_man4_pages
|
|
||||||
generate_html_man_pages
|
|
||||||
${MAN1_INSTALL_FILES}
|
${MAN1_INSTALL_FILES}
|
||||||
${MAN4_INSTALL_FILES}
|
${MAN4_INSTALL_FILES}
|
||||||
${HTML_INSTALL_FILES}
|
${HTML_INSTALL_FILES}
|
||||||
|
|
Loading…
Reference in New Issue