Skip to content

Commit

Permalink
Out-of-tree build for sphinx documents
Browse files Browse the repository at this point in the history
The only drawback is that page source only contains include
directive. We disabled page source for now.
  • Loading branch information
tatsuhiro-t committed Feb 13, 2014
1 parent 2d8c203 commit 01ca437
Show file tree
Hide file tree
Showing 15 changed files with 35 additions and 25 deletions.
6 changes: 6 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,12 @@ AC_CONFIG_FILES([
python/Makefile
doc/Makefile
doc/conf.py
doc/index.rst
doc/package_README.rst
doc/tutorial-client.rst
doc/tutorial-server.rst
doc/nghttp2.h.rst
doc/nghttp2ver.h.rst
])
AC_OUTPUT

Expand Down
3 changes: 2 additions & 1 deletion doc/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ help:

apiref.rst: $(top_builddir)/lib/includes/nghttp2/nghttp2ver.h \
$(top_builddir)/lib/includes/nghttp2/nghttp2.h
$(PYTHON) $(builddir)/mkapiref.py --header apiref-header.rst $^ > $@
$(PYTHON) $(top_srcdir)/doc/mkapiref.py \
--header $(top_srcdir)/doc/apiref-header.rst $^ > $@

clean:
-rm apiref.rst
Expand Down
9 changes: 5 additions & 4 deletions doc/conf.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ import sys, os
extensions = []

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ['@top_srcdir@/_templates']

# The suffix of source filenames.
source_suffix = '.rst'
Expand Down Expand Up @@ -87,7 +87,7 @@ release = '@PACKAGE_VERSION@'

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['manual', 'README.rst', '*-header.rst']
exclude_patterns = ['manual', 'README.rst', '*-header.rst', 'sources']

# The reST default role (used for this markup: `text`) to use for all documents.
default_role = 'c:func'
Expand Down Expand Up @@ -126,7 +126,7 @@ html_theme = 'sphinx_rtd_theme'
#html_theme_options = {}

# Add any paths that contain custom themes here, relative to this directory.
html_theme_path = ['_themes']
html_theme_path = ['@top_srcdir@/doc/_themes']

# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
Expand Down Expand Up @@ -177,7 +177,8 @@ html_sidebars = {
#html_split_index = False

# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True
html_show_sourcelink = False
html_copy_source = False

# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#html_show_sphinx = True
Expand Down
1 change: 1 addition & 0 deletions doc/index.rst.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.. include:: @top_srcdir@/doc/sources/index.rst
4 changes: 0 additions & 4 deletions doc/nghttp2.h.rst

This file was deleted.

4 changes: 4 additions & 0 deletions doc/nghttp2.h.rst.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
nghttp2.h
=========

.. literalinclude:: @top_srcdir@/lib/includes/nghttp2/nghttp2.h
4 changes: 0 additions & 4 deletions doc/nghttp2ver.h.rst

This file was deleted.

4 changes: 4 additions & 0 deletions doc/nghttp2ver.h.rst.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
nghttp2ver.h
============

.. literalinclude:: @top_builddir@/lib/includes/nghttp2/nghttp2ver.h
1 change: 0 additions & 1 deletion doc/package_README.rst

This file was deleted.

1 change: 1 addition & 0 deletions doc/package_README.rst.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.. include:: @top_srcdir@/README.rst
File renamed without changes.
5 changes: 0 additions & 5 deletions doc/tutorial-client.rst → doc/sources/tutorial-client.rst
Original file line number Diff line number Diff line change
Expand Up @@ -482,8 +482,3 @@ remote peer), we call `nghttp2_session_terminate_session()` to
commencing the closure of the HTTP/2.0 session gracefully. If you have
some data associated for the stream to be closed, you may delete it
here.

libevent-client.c
-----------------

.. literalinclude:: ../examples/libevent-client.c
6 changes: 0 additions & 6 deletions doc/tutorial-server.rst → doc/sources/tutorial-server.rst
Original file line number Diff line number Diff line change
Expand Up @@ -587,9 +587,3 @@ is about to close::

We destroy ``http2_stream_data`` object in this function since the
stream is about to close and we no longer use that object.


libevent-server.c
-----------------

.. literalinclude:: ../examples/libevent-server.c
6 changes: 6 additions & 0 deletions doc/tutorial-client.rst.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. include:: @top_srcdir@/doc/sources/tutorial-client.rst

libevent-client.c
-----------------

.. literalinclude:: @top_srcdir@/examples/libevent-client.c
6 changes: 6 additions & 0 deletions doc/tutorial-server.rst.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. include:: @top_srcdir@/doc/sources/tutorial-server.rst

libevent-server.c
-----------------

.. literalinclude:: @top_srcdir@/examples/libevent-server.c

0 comments on commit 01ca437

Please sign in to comment.