]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
Add a target to check broken external links in the Documentation
authorRémy Léone <remy.leone@gmail.com>
Wed, 15 Feb 2017 12:16:35 +0000 (13:16 +0100)
committerJonathan Corbet <corbet@lwn.net>
Wed, 15 Feb 2017 22:22:47 +0000 (15:22 -0700)
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>
Documentation/DocBook/Makefile
Documentation/Makefile.sphinx
Documentation/media/Makefile
Makefile

index 327bf57f45992ca0b9e17d48f67fd94e0d5312e6..7b8831fb4e37d8891749de1d4759a58eb8c5c8ac 100644 (file)
@@ -71,6 +71,7 @@ installmandocs: mandocs
 # no-op for the DocBook toolchain
 epubdocs:
 latexdocs:
+linkcheckdocs:
 
 ###
 #External programs used
index 8284f3d1b022a253fa3b00a09d60d2f9ccf06881..bcf529f6cf9b258e4389377a4cf04796fb1594de 100644 (file)
@@ -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'
index 730d73db7c7a4a8c0f13480efcbe0f011071f2b0..9b3e70b2cab29ddb02a3b61878f67569410764d1 100644 (file)
@@ -103,6 +103,7 @@ html: all
 epub: all
 xml: all
 latex: $(IMGPDF) all
+linkcheck:
 
 clean:
        -rm -f $(DOTTGT) $(IMGTGT) ${TARGETS} 2>/dev/null
index ec411ba9e40f98376bb594de459e98413f0dfae9..96e29f9a9df87f7477318c8655c3035fae2134b0 100644 (file)
--- 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