diff options
author | Petri Lehtinen <petri@digip.org> | 2009-11-03 23:07:43 +0200 |
---|---|---|
committer | Petri Lehtinen <petri@digip.org> | 2009-11-03 23:09:04 +0200 |
commit | bf01067a8a73b1a69301c99adbfa76ca836cedb7 (patch) | |
tree | 099f94877e498b4d5aedcd4b390ce1941af17d5b | |
parent | d1b07171cc1e54addfdc18b2d528487596ff535d (diff) | |
download | jansson-bf01067a8a73b1a69301c99adbfa76ca836cedb7.zip jansson-bf01067a8a73b1a69301c99adbfa76ca836cedb7.tar.gz jansson-bf01067a8a73b1a69301c99adbfa76ca836cedb7.tar.bz2 |
Build documentation in make html target
To keep the distchecks for the documentation, the documentation has to
be built in the check target instead of distcheck-hook.
While at it, rename doc/.build to doc/_build. This naming is the
default with sphinx 0.6.2.
-rw-r--r-- | Makefile.am | 5 | ||||
-rw-r--r-- | README.rst | 5 | ||||
-rw-r--r-- | doc/.gitignore | 2 | ||||
-rw-r--r-- | doc/Makefile.am | 15 | ||||
-rw-r--r-- | doc/README | 4 | ||||
-rw-r--r-- | doc/conf.py | 2 | ||||
-rw-r--r-- | doc/gettingstarted.rst | 5 |
7 files changed, 23 insertions, 15 deletions
diff --git a/Makefile.am b/Makefile.am index e64f397..185eaab 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,4 @@ EXTRA_DIST = CHANGES LICENSE README.rst SUBDIRS = doc src test -distcheck-hook: - sphinx-build -b html -W \ - $(distdir)/doc \ - $(distdir)/_build/doc/.build/html +check-local: html @@ -49,10 +49,9 @@ available at http://www.digip.org/jansson/doc/. To generate HTML documentation yourself, invoke:: - cd doc/ - sphinx-build . .build/html + make html -... and point your browser to ``.build/html/index.html``. Sphinx_ is +and point your browser to ``doc/_build/html/index.html``. Sphinx_ is required to generate the documentation. diff --git a/doc/.gitignore b/doc/.gitignore index 30bcfa4..69fa449 100644 --- a/doc/.gitignore +++ b/doc/.gitignore @@ -1 +1 @@ -.build/ +_build/ diff --git a/doc/Makefile.am b/doc/Makefile.am index b00ee56..cb3723f 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -2,6 +2,19 @@ EXTRA_DIST = \ conf.py apiref.rst gettingstarted.rst github_commits.c index.rst \ tutorial.rst ext/refcounting.py +SPHINXBUILD = sphinx-build +SPHINXOPTS = -d _build/doctrees -W + +html-local: + $(SPHINXBUILD) -b html $(SPHINXOPTS) $(srcdir) _build/html + +install-html-local: html + mkdir -p $(DESTDIR)$(htmldir) + cp -r _build/html $(DESTDIR)$(htmldir) + +uninstall-local: + rm -rf $(DESTDIR)$(htmldir) + clean-local: - rm -rf .build + rm -rf _build rm -f ext/refcounting.pyc @@ -1,5 +1,5 @@ To build the documentation, invoke - sphinx-build . .build/html + make html -in this directory. Then point your browser to .build/html/index.html. +Then point your browser to _build/html/index.html. diff --git a/doc/conf.py b/doc/conf.py index d274f54..02b4c79 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -69,7 +69,7 @@ release = '1.1.1+' # List of directories, relative to source directory, that shouldn't be searched # for source files. -exclude_trees = ['.build'] +exclude_trees = ['_build'] # The reST default role (used for this markup: `text`) to use for all documents. #default_role = None diff --git a/doc/gettingstarted.rst b/doc/gettingstarted.rst index 00dd16a..2221d07 100644 --- a/doc/gettingstarted.rst +++ b/doc/gettingstarted.rst @@ -76,10 +76,9 @@ Documentation is in the ``doc/`` subdirectory. It's written in reStructuredText_ with Sphinx_ annotations. To generate the HTML documentation, invoke:: - cd doc/ - sphinx-build . .build/html + make html -... and point your browser to ``.build/html/index.html``. Sphinx_ is +and point your browser to ``doc/_build/html/index.html``. Sphinx_ is required to generate the documentation. .. _reStructuredText: http://docutils.sourceforge.net/rst.html |