diff options
author | Gerald Combs <gerald@wireshark.org> | 2021-08-03 13:42:20 -0700 |
---|---|---|
committer | Wireshark GitLab Utility <gerald+gitlab-utility@wireshark.org> | 2021-08-03 22:18:06 +0000 |
commit | a6e0482a6fbbfe31cfbb4530ade67231c2b59504 (patch) | |
tree | 9d79270c5919632c19ce2ef0cbb479335b2947ab /cmake/modules | |
parent | 28b65f940934313b4ae4dabdb74b2de85cad21f4 (diff) |
Docs: Give the PDF and EPUB guides descriptive filenames.
Use the document title for our PDF and EPUB filenames under the theory
that "Wireshark User’s Guide.pdf" is more obvious than "user-guide.pdf".
Diffstat (limited to 'cmake/modules')
-rw-r--r-- | cmake/modules/FindAsciidoctor.cmake | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/cmake/modules/FindAsciidoctor.cmake b/cmake/modules/FindAsciidoctor.cmake index f9d61e5c80..6b43271537 100644 --- a/cmake/modules/FindAsciidoctor.cmake +++ b/cmake/modules/FindAsciidoctor.cmake @@ -151,9 +151,10 @@ if(ASCIIDOCTOR_EXECUTABLE) ${_asciidoctor_common_args} ) - MACRO( ASCIIDOCTOR2PDF _asciidocsource ) + MACRO( ASCIIDOCTOR2PDF _title _asciidocsource ) GET_FILENAME_COMPONENT( _source_base_name ${_asciidocsource} NAME_WE ) - set( _output_pdf ${_source_base_name}.pdf ) + set(_generate_pdf "generate_${_source_base_name}_pdf") + set(_output_pdf "${_title}.pdf") ADD_CUSTOM_COMMAND( OUTPUT @@ -164,9 +165,11 @@ if(ASCIIDOCTOR_EXECUTABLE) DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_asciidocsource} ${ARGN} + ) - add_custom_target(generate_${_output_pdf} DEPENDS ${_output_pdf}) - set_asciidoctor_target_properties(generate_${_output_pdf}) + add_custom_target(${_generate_pdf} DEPENDS ${_output_pdf}) + set_asciidoctor_target_properties(${_generate_pdf}) + unset(_generate_pdf) unset(_output_pdf) ENDMACRO() @@ -198,9 +201,10 @@ if(ASCIIDOCTOR_EXECUTABLE) ${_asciidoctor_common_args} ) - MACRO(ASCIIDOCTOR2EPUB _asciidocsource) - GET_FILENAME_COMPONENT(_source_base_name ${_asciidocsource} NAME_WE ) - set(_output_epub ${_source_base_name}.epub) + MACRO(ASCIIDOCTOR2EPUB _title _asciidocsource) + GET_FILENAME_COMPONENT(_source_base_name ${_asciidocsource} NAME_WE) + set(_generate_epub "generate_${_source_base_name}_epub") + set(_output_epub "${_title}.epub") ADD_CUSTOM_COMMAND( OUTPUT @@ -212,8 +216,9 @@ if(ASCIIDOCTOR_EXECUTABLE) ${CMAKE_CURRENT_SOURCE_DIR}/${_asciidocsource} ${ARGN} ) - add_custom_target(generate_${_output_epub} DEPENDS ${_output_epub}) - set_asciidoctor_target_properties(generate_${_output_epub}) + add_custom_target(${_generate_epub} DEPENDS ${_output_epub}) + set_asciidoctor_target_properties(${_generate_epub}) + unset(_generate_epub) unset(_output_epub) ENDMACRO() |