From a6effb4d23137be7204bbaeff159344f51a04649 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Sat, 13 Feb 2016 14:36:12 +0100 Subject: [PATCH] doc: fix out-of-tree doc builds Fixes multiple errors while making docs: Could not import extension sphinxcontrib.rubydomain (exception: No module named 'sphinxcontrib') and ../../doc/sources/index.rst:15: WARNING: toctree contains reference to nonexisting document 'nghttp.1' ../../doc/sources/index.rst:15: WARNING: toctree contains reference to nonexisting document 'nghttpd.1' ../../doc/sources/index.rst:15: WARNING: toctree contains reference to nonexisting document 'nghttpx.1' ../../doc/sources/index.rst:15: WARNING: toctree contains reference to nonexisting document 'h2load.1' ../../doc/sources/index.rst:15: WARNING: toctree contains reference to nonexisting document 'programmers-guide' --- doc/Makefile.am | 14 +++++++++----- doc/conf.py.in | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/doc/Makefile.am b/doc/Makefile.am index 0e6a9abc..a9ea4349 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -145,15 +145,18 @@ APIDOCS= \ nghttp2_submit_window_update.rst \ nghttp2_version.rst -EXTRA_DIST = \ - mkapiref.py \ +RST_FILES = \ README.rst \ programmers-guide.rst \ - $(APIDOCS) \ nghttp.1.rst \ nghttpd.1.rst \ nghttpx.1.rst \ - h2load.1.rst \ + h2load.1.rst + +EXTRA_DIST = \ + mkapiref.py \ + $(RST_FILES) \ + $(APIDOCS) \ sources/index.rst \ sources/tutorial-client.rst \ sources/tutorial-server.rst \ @@ -227,7 +230,8 @@ help: apiref.rst: \ $(top_builddir)/lib/includes/nghttp2/nghttp2ver.h \ - $(top_builddir)/lib/includes/nghttp2/nghttp2.h + $(top_srcdir)/lib/includes/nghttp2/nghttp2.h + for i in $(RST_FILES); do [ -e $(builddir)/$$i ] || cp $(srcdir)/$$i $(builddir); done $(PYTHON) $(top_srcdir)/doc/mkapiref.py \ apiref.rst macros.rst enums.rst types.rst . $^ diff --git a/doc/conf.py.in b/doc/conf.py.in index 9c192827..0cc5a5a9 100644 --- a/doc/conf.py.in +++ b/doc/conf.py.in @@ -41,7 +41,7 @@ import sys, os # documentation root, use os.path.abspath to make it absolute, like shown here. #sys.path.insert(0, os.path.abspath('.')) -sys.path.append(os.path.abspath('_exts')) +sys.path.append(os.path.abspath('@top_srcdir@/doc/_exts')) # -- General configuration -----------------------------------------------------