[ovs-dev] [PATCH 2/2] make: Add 'doc-check' target
Stephen Finucane
stephen at that.guru
Fri Dec 23 23:04:12 UTC 2016
This does basic validation of the syntax and validates all external
links.
The nitpick ('-n') flag is added to ensure all possible warnings are
raised.
Signed-off-by: Stephen Finucane <stephen at that.guru>
Cc: Ben Pfaff <blp at ovn.org>
---
Documentation/automake.mk | 7 ++++++-
Documentation/conf.py | 2 ++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/Documentation/automake.mk b/Documentation/automake.mk
index 98adca7..b27ad13 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
+
+.PHONY: docs-check
+ALL_LOCAL += docs-check
+docs-check:
+ $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) -q $(SPHINXBUILDDIR)/linkcheck
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 ----------------------------------------------
--
2.9.3
More information about the dev
mailing list