From 0e00d2f21bddd8ee811dec816cff5b4f05b1f891 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Tue, 24 May 2016 12:53:21 +0800 Subject: doc,cmake: do not scan non-man pages when building man pages Signed-off-by: Kefu Chai --- doc/conf.py | 12 ++++++++++++ doc/man/CMakeLists.txt | 2 +- man/Makefile.am | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index f1fefe0bc7c..7199b1669de 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -10,6 +10,18 @@ templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' exclude_patterns = ['**/.#*', '**/*~', 'start/quick-common.rst'] +if tags.has('man'): + exclude_patterns += ['architecture.rst', 'glossary.rst', 'release*.rst', + 'api/*', + 'cephfs/*', + 'dev/*', + 'install/*', + 'mon/*', + 'rados/*', + 'radosgw/*', + 'rbd/*', + 'start/*'] + pygments_style = 'sphinx' html_theme = 'ceph' diff --git a/doc/man/CMakeLists.txt b/doc/man/CMakeLists.txt index fbb6ce6f5ea..e81631babdc 100644 --- a/doc/man/CMakeLists.txt +++ b/doc/man/CMakeLists.txt @@ -6,7 +6,7 @@ add_subdirectory(8) add_custom_command( OUTPUT ${sphinx_output} - COMMAND ${SPHINX_BUILD} -b man -d ${CMAKE_BINARY_DIR}/doc/doctrees -c ${CMAKE_SOURCE_DIR}/man ${CMAKE_CURRENT_SOURCE_DIR} ${sphinx_output_dir} + COMMAND ${SPHINX_BUILD} -b man -t man -d ${CMAKE_BINARY_DIR}/doc/doctrees -c ${CMAKE_SOURCE_DIR}/man ${CMAKE_CURRENT_SOURCE_DIR} ${sphinx_output_dir} DEPENDS ${sphinx_input}) add_custom_target( diff --git a/man/Makefile.am b/man/Makefile.am index 710d6ea005b..6a8ffea2e93 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -21,7 +21,7 @@ $(dist_man_MANS): sphinx-build.stamp # in a tree populated from dist tarball, the $(top_srcdir)/doc is not included sphinx-build.stamp: if [ -d $(top_srcdir)/doc/man ] ; then \ - ${SPHINX_BUILD} -b man -d doctrees -c $(top_srcdir)/man $(top_srcdir)/doc/man $(top_builddir)/man; \ + ${SPHINX_BUILD} -b man -t man -d doctrees -c $(top_srcdir)/man $(top_srcdir)/doc/man $(top_builddir)/man; \ fi clean-local:: -- cgit v1.2.3