Build documentation as part of every build. This ensures any syntax errors are caught early.
In addition, a 'check-docs' target is added to validates all external links. The nitpick ('-n') flag is added to ensure all possible warnings are raised. Signed-off-by: Stephen Finucane <step...@that.guru> Cc: Ben Pfaff <b...@ovn.org> --- v2: - Use 'htmldocs' target to validate docs, rather than 'check-docs' - Don't silence output of 'check-docs' target --- Documentation/automake.mk | 9 +++++++-- Documentation/conf.py | 2 ++ Makefile.am | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Documentation/automake.mk b/Documentation/automake.mk index 98adca7..cb41d11 100644 --- a/Documentation/automake.mk +++ b/Documentation/automake.mk @@ -96,9 +96,14 @@ SPHINXBUILDDIR = $(builddir)/Documentation/_build # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -W -d $(SPHINXBUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(SPHINXSRCDIR) +ALLSPHINXOPTS = -W -n -d $(SPHINXBUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(SPHINXSRCDIR) -.PHONY: htmldocs htmldocs: rm -rf $(SPHINXBUILDDIR)/* $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(SPHINXBUILDDIR)/html +ALL_LOCAL += htmldocs +.PHONY: htmldocs + +check-docs: + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(SPHINXBUILDDIR)/linkcheck +.PHONY: check-docs diff --git a/Documentation/conf.py b/Documentation/conf.py index 63f5877..06f50bc 100644 --- a/Documentation/conf.py +++ b/Documentation/conf.py @@ -113,6 +113,8 @@ pygments_style = 'sphinx' # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = False +# If true, check the validity of #anchors in links. +linkcheck_anchors = False # -- Options for HTML output ---------------------------------------------- diff --git a/Makefile.am b/Makefile.am index 9c429b2..74839e1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -177,10 +177,10 @@ SUFFIXES += .xml sbindir='$(sbindir)' $(AM_v_at)mv $@.tmp $@ -.PHONY: clean-pycov clean-pycov: cd $(srcdir) && rm -f $(PYCOV_CLEAN_FILES) CLEAN_LOCAL += clean-pycov +.PHONY: clean-pycov # If we're checked out from a Git repository, make sure that every # file that is in Git is distributed. -- 2.9.3 _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev