From 1a1ab92ed9c80531a349e265f93d60b820717923 Mon Sep 17 00:00:00 2001 From: Hefee Date: Sun, 3 Dec 2017 16:52:58 +0100 Subject: [PATCH] make doc-man working again. --- CMakeLists.txt | 1 + doc/CMakeLists.txt | 10 +--------- man/CMakeLists.txt | 14 ++++++++++++++ man/index.rst | 1 + 4 files changed, 17 insertions(+), 9 deletions(-) create mode 100644 man/CMakeLists.txt create mode 100644 man/index.rst diff --git a/CMakeLists.txt b/CMakeLists.txt index 022aaccc2..fbfeecae8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -243,6 +243,7 @@ set(WITH_TESTING ${UNIT_TESTING}) if(BUILD_CLIENT) add_subdirectory(src) if(NOT BUILD_LIBRARIES_ONLY) + add_subdirectory(man) add_subdirectory(doc) add_subdirectory(doc/dev) if(IS_DIRECTORY ${CMAKE_SOURCE_DIR}/admin) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index f603eac55..e3f38803d 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -4,7 +4,6 @@ if(SPHINX_FOUND) set(SPHINX_CACHE_DIR "${CMAKE_CURRENT_BINARY_DIR}/_doctrees") # HTML output directory set(SPHINX_HTML_DIR "${CMAKE_CURRENT_BINARY_DIR}/html") - set(SPHINX_MAN_DIR "${CMAKE_CURRENT_BINARY_DIR}/man1") set(SPHINX_PDF_DIR "${CMAKE_CURRENT_BINARY_DIR}/latex") set(SPHINX_QCH_DIR "${CMAKE_CURRENT_BINARY_DIR}/qthelp") set(SPHINX_HTMLHELP_DIR "${CMAKE_CURRENT_BINARY_DIR}/htmlhelp") @@ -17,8 +16,6 @@ if(SPHINX_FOUND) install(DIRECTORY ${SPHINX_PDF_DIR} DESTINATION ${APPLICATION_DOC_DIR} OPTIONAL) install(DIRECTORY ${SPHINX_QCH_DIR} DESTINATION ${APPLICATION_DOC_DIR} OPTIONAL) - install(DIRECTORY ${SPHINX_MAN_DIR} DESTINATION ${CMAKE_INSTALL_MANDIR} OPTIONAL) - configure_file("${CMAKE_CURRENT_SOURCE_DIR}/conf.py.in" conf.py @ONLY) if(WITH_DOC) @@ -73,11 +70,6 @@ if(SPHINX_FOUND) -D html_theme=owncloud_com ${CMAKE_CURRENT_SOURCE_DIR} ${SPHINX_HTML_DIR}/com ) - add_custom_target( doc-man ${SPHINX_EXECUTABLE} - -q -c . -b man - -d ${SPHINX_CACHE_DIR}/man - ${CMAKE_CURRENT_SOURCE_DIR} - ${SPHINX_MAN_DIR} ) ## Building CHM files requires HTML Help Workshop. Since it requires wine ## with special dependencies, it's impossible to write a cmake check for it. @@ -92,4 +84,4 @@ if(SPHINX_FOUND) ${SPHINX_HTMLHELP_DIR} ) add_custom_target( doc-chm pushd ${SPHINX_HTMLHELP_DIR}; ${MSHTML_COMPILER} *.hhp; popd DEPENDS doc-chm-sphinx ) -endif(SPHINX_FOUND) +endif(SPHINX_FOUND) \ No newline at end of file diff --git a/man/CMakeLists.txt b/man/CMakeLists.txt new file mode 100644 index 000000000..f99b0dee6 --- /dev/null +++ b/man/CMakeLists.txt @@ -0,0 +1,14 @@ +if(SPHINX_FOUND) + + # Sphinx cache with pickled ReST documents + set(SPHINX_CACHE_DIR "${CMAKE_CURRENT_BINARY_DIR}/_doctrees") + + # HTML output directory + set(SPHINX_MAN_DIR "${CMAKE_CURRENT_BINARY_DIR}/man1") + install(DIRECTORY ${SPHINX_MAN_DIR} DESTINATION ${CMAKE_INSTALL_MANDIR} OPTIONAL) + add_custom_target( doc-man ${SPHINX_EXECUTABLE} + -c ${CMAKE_SOURCE_DIR}/doc -b man + -d ${SPHINX_CACHE_DIR}/man + ${CMAKE_CURRENT_SOURCE_DIR} + ${SPHINX_MAN_DIR} ) +endif(SPHINX_FOUND) diff --git a/man/index.rst b/man/index.rst new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/man/index.rst @@ -0,0 +1 @@ +