]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
documentation: Add cmake option to build man pages
authorJeremy Linton <jeremy.linton@arm.com>
Thu, 15 Feb 2024 20:39:42 +0000 (14:39 -0600)
committerJeremy Linton <jeremy.linton@arm.com>
Thu, 7 Mar 2024 23:55:47 +0000 (17:55 -0600)
Man pages tend to be preferred in some circles, lets add an
option to build the vectorscan documentation that way.

Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
doc/dev-reference/CMakeLists.txt
doc/dev-reference/conf.py.in

index 449589f67d023b6aea6ad48c64125ebd18072f34..6f48e2e49ca9c04597d21cb30803b222c49e998c 100644 (file)
@@ -19,6 +19,7 @@ else()
 set(SPHINX_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/_build")
 set(SPHINX_CACHE_DIR "${CMAKE_CURRENT_BINARY_DIR}/_doctrees")
 set(SPHINX_HTML_DIR "${CMAKE_CURRENT_BINARY_DIR}/html")
+set(SPHINX_MAN_DIR "${CMAKE_CURRENT_BINARY_DIR}/man")
 
 configure_file("${CMAKE_CURRENT_SOURCE_DIR}/conf.py.in"
     "${CMAKE_CURRENT_BINARY_DIR}/conf.py" @ONLY)
@@ -32,4 +33,14 @@ add_custom_target(dev-reference
         "${SPHINX_HTML_DIR}"
     DEPENDS dev-reference-doxygen
     COMMENT "Building HTML dev reference with Sphinx")
+
+add_custom_target(dev-reference-man
+    ${SPHINX_BUILD}
+        -b man
+        -c "${CMAKE_CURRENT_BINARY_DIR}"
+        -d "${SPHINX_CACHE_DIR}"
+        "${CMAKE_CURRENT_SOURCE_DIR}"
+        "${SPHINX_MAN_DIR}"
+    DEPENDS dev-reference-doxygen
+    COMMENT "Building man page reference with Sphinx")
 endif()
index d0ef371b24d2ae8b9d83dd15c31cf1859f6e9aba..ad97f088e71703207c51aeaa71552c8948f8b75b 100644 (file)
@@ -233,7 +233,7 @@ latex_documents = [
 # (source start file, name, description, authors, manual section).
 man_pages = [
     ('index', 'hyperscan', u'Hyperscan Documentation',
-     [u'Intel Corporation'], 1)
+     [u'Intel Corporation'], 7)
 ]
 
 # If true, show URL addresses after external links.