summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Finucane <stephen@that.guru>2017-01-02 11:47:38 +0000
committerBen Pfaff <blp@ovn.org>2017-01-04 08:47:28 -0800
commit099cf485b579f1950034f306e18f005d98fa8a30 (patch)
tree24c20ead6b58f6174cf90eed6b9f3ed62d5e3437
parente25d4af1e690d1091089aefb5b9fde31825252d4 (diff)
downloadopenvswitch-099cf485b579f1950034f306e18f005d98fa8a30.tar.gz
make: Validate documents on build
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 <stephen@that.guru> [blp@ovn.org folded in changes for --enable-silent-rules] Signed-off-by: Ben Pfaff <blp@ovn.org>
-rw-r--r--Documentation/automake.mk14
-rw-r--r--Documentation/conf.py2
-rw-r--r--Makefile.am2
3 files changed, 14 insertions, 4 deletions
diff --git a/Documentation/automake.mk b/Documentation/automake.mk
index 98adca74d..691806658 100644
--- a/Documentation/automake.mk
+++ b/Documentation/automake.mk
@@ -96,9 +96,17 @@ 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
+sphinx_verbose = $(sphinx_verbose_@AM_V@)
+sphinx_verbose_ = $(sphinx_verbose_@AM_DEFAULT_V@)
+sphinx_verbose_0 = -q
htmldocs:
rm -rf $(SPHINXBUILDDIR)/*
- $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(SPHINXBUILDDIR)/html
+ $(AM_V_GEN)$(SPHINXBUILD) $(sphinx_verbose) -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 c0b68c15a..389ef706a 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -119,6 +119,8 @@ exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
# 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 9c429b232..74839e148 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.