summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRémy Léone <remy.leone@gmail.com>2017-02-15 13:16:35 +0100
committerJonathan Corbet <corbet@lwn.net>2017-02-15 15:22:47 -0700
commit62924fd789c6a381b772141f78a82361f46ae397 (patch)
tree6a746a4b1a84681e0170ca8d849f55ed2ab2f076
parent72f8f677e3ec685865392846c356e08771d49f13 (diff)
downloadop-kernel-dev-62924fd789c6a381b772141f78a82361f46ae397.zip
op-kernel-dev-62924fd789c6a381b772141f78a82361f46ae397.tar.gz
Add a target to check broken external links in the Documentation
Documentation shouldn't have broken links. sphinx linkcheck builder scans all documents for external links, tries to open them with urllib2, and writes an overview which ones are broken and redirected to standard output and to output.txt in the output directory. Reviewed-by: Jani Nikula <jani.nikula@intel.com> Tested-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Rémy Léone <remy.leone@gmail.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
-rw-r--r--Documentation/DocBook/Makefile1
-rw-r--r--Documentation/Makefile.sphinx4
-rw-r--r--Documentation/media/Makefile1
-rw-r--r--Makefile2
4 files changed, 7 insertions, 1 deletions
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index 327bf57..7b8831f 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -71,6 +71,7 @@ installmandocs: mandocs
# no-op for the DocBook toolchain
epubdocs:
latexdocs:
+linkcheckdocs:
###
#External programs used
diff --git a/Documentation/Makefile.sphinx b/Documentation/Makefile.sphinx
index 8284f3d..bcf529f 100644
--- a/Documentation/Makefile.sphinx
+++ b/Documentation/Makefile.sphinx
@@ -69,6 +69,9 @@ quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4)
htmldocs:
@+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,html,$(var),,$(var)))
+linkcheckdocs:
+ @$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,linkcheck,$(var),,$(var)))
+
latexdocs:
@+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,latex,$(var),latex,$(var)))
@@ -117,6 +120,7 @@ dochelp:
@echo ' pdfdocs - PDF'
@echo ' epubdocs - EPUB'
@echo ' xmldocs - XML'
+ @echo ' linkcheckdocs - check for broken external links (will connect to external hosts)'
@echo ' cleandocs - clean all generated files'
@echo
@echo ' make SPHINXDIRS="s1 s2" [target] Generate only docs of folder s1, s2'
diff --git a/Documentation/media/Makefile b/Documentation/media/Makefile
index 730d73d..9b3e70b 100644
--- a/Documentation/media/Makefile
+++ b/Documentation/media/Makefile
@@ -103,6 +103,7 @@ html: all
epub: all
xml: all
latex: $(IMGPDF) all
+linkcheck:
clean:
-rm -f $(DOTTGT) $(IMGTGT) ${TARGETS} 2>/dev/null
diff --git a/Makefile b/Makefile
index ec411ba..96e29f9 100644
--- a/Makefile
+++ b/Makefile
@@ -1444,7 +1444,7 @@ $(help-board-dirs): help-%:
# Documentation targets
# ---------------------------------------------------------------------------
-DOC_TARGETS := xmldocs sgmldocs psdocs latexdocs pdfdocs htmldocs mandocs installmandocs epubdocs cleandocs
+DOC_TARGETS := xmldocs sgmldocs psdocs latexdocs pdfdocs htmldocs mandocs installmandocs epubdocs cleandocs linkcheckdocs
PHONY += $(DOC_TARGETS)
$(DOC_TARGETS): scripts_basic FORCE
$(Q)$(MAKE) $(build)=scripts build_docproc build_check-lc_ctype
OpenPOWER on IntegriCloud