Commit 62924fd7 authored by Rémy Léone's avatar Rémy Léone Committed by Jonathan Corbet

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: default avatarJani Nikula <jani.nikula@intel.com>
Tested-by: default avatarJani Nikula <jani.nikula@intel.com>
Signed-off-by: default avatarRémy Léone <remy.leone@gmail.com>
Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
parent 72f8f677
...@@ -71,6 +71,7 @@ installmandocs: mandocs ...@@ -71,6 +71,7 @@ installmandocs: mandocs
# no-op for the DocBook toolchain # no-op for the DocBook toolchain
epubdocs: epubdocs:
latexdocs: latexdocs:
linkcheckdocs:
### ###
#External programs used #External programs used
......
...@@ -69,6 +69,9 @@ quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4) ...@@ -69,6 +69,9 @@ quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4)
htmldocs: htmldocs:
@+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,html,$(var),,$(var))) @+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,html,$(var),,$(var)))
linkcheckdocs:
@$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,linkcheck,$(var),,$(var)))
latexdocs: latexdocs:
@+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,latex,$(var),latex,$(var))) @+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,latex,$(var),latex,$(var)))
...@@ -117,6 +120,7 @@ dochelp: ...@@ -117,6 +120,7 @@ dochelp:
@echo ' pdfdocs - PDF' @echo ' pdfdocs - PDF'
@echo ' epubdocs - EPUB' @echo ' epubdocs - EPUB'
@echo ' xmldocs - XML' @echo ' xmldocs - XML'
@echo ' linkcheckdocs - check for broken external links (will connect to external hosts)'
@echo ' cleandocs - clean all generated files' @echo ' cleandocs - clean all generated files'
@echo @echo
@echo ' make SPHINXDIRS="s1 s2" [target] Generate only docs of folder s1, s2' @echo ' make SPHINXDIRS="s1 s2" [target] Generate only docs of folder s1, s2'
......
...@@ -103,6 +103,7 @@ html: all ...@@ -103,6 +103,7 @@ html: all
epub: all epub: all
xml: all xml: all
latex: $(IMGPDF) all latex: $(IMGPDF) all
linkcheck:
clean: clean:
-rm -f $(DOTTGT) $(IMGTGT) ${TARGETS} 2>/dev/null -rm -f $(DOTTGT) $(IMGTGT) ${TARGETS} 2>/dev/null
......
...@@ -1444,7 +1444,7 @@ $(help-board-dirs): help-%: ...@@ -1444,7 +1444,7 @@ $(help-board-dirs): help-%:
# Documentation targets # 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) PHONY += $(DOC_TARGETS)
$(DOC_TARGETS): scripts_basic FORCE $(DOC_TARGETS): scripts_basic FORCE
$(Q)$(MAKE) $(build)=scripts build_docproc build_check-lc_ctype $(Q)$(MAKE) $(build)=scripts build_docproc build_check-lc_ctype
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment