[libcamera-devel] [PATCH 2/3] Documentation: Add linkcheck target
Kieran Bingham
kieran.bingham at ideasonboard.com
Mon Jan 20 13:55:43 CET 2020
Sphinx provides a run-target to verify external links specified in the
documentation. This requires an active connection to be able to validate
the links.
Add a meson target to integrate the linkcheck facility into our build
and test system.
Signed-off-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
--
This can be utilised by automated checks to make sure we don't reference
any stale links.
This produces output such as the following:
libcamera/build$ ninja Documentation/linkcheck
[1/1] Generating documentation-linkcheck with a custom command.
Running Sphinx v1.8.5
making output directory...
building [mo]: targets for 0 po files that are out of date
building [linkcheck]: targets for 5 source files that are out of date
updating environment: 5 added, 0 changed, 0 removed
reading sources... [ 20%] api-html/index
reading sources... [ 40%] coding-style
reading sources... [ 60%] contributing
reading sources... [ 80%] docs
reading sources... [100%] index
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [ 20%] api-html/index
writing output... [ 40%] coding-style
(line 20) ok https://www.kernel.org/doc/html/latest/process/coding-style.html
(line 178) ok https://chromium.googlesource.com/chromium/src/+/master/styleguide/c++/c++.md#object-ownership-and-calling-conventions
(line 39) ok https://google.github.io/styleguide/cppguide.html
writing output... [ 60%] contributing
(line 29) ok https://linuxtv.org/
(line 12) ok https://lists.libcamera.org/listinfo/libcamera-devel
(line 42) ok http://www.doxygen.nl
(line 29) ok https://git.linuxtv.org/libcamera.git/
(line 42) redirect http://www.sphinx-doc.org - with Found to http://www.sphinx-doc.org/en/master/
(line 62) ok https://developercertificate.org/
(line 21) redirect https://webchat.freenode.net/?channels=%23libcamera&uio=d4 - with Found to https://webchat.freenode.net/#%23libcamera
writing output... [ 80%] docs
writing output... [100%] index
build succeeded.
Look for any errors in the above output or in Documentation/linkcheck/output.txt
---
Documentation/meson.build | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/Documentation/meson.build b/Documentation/meson.build
index 9136506f5d9c..c4e9892470de 100644
--- a/Documentation/meson.build
+++ b/Documentation/meson.build
@@ -62,4 +62,10 @@ if sphinx.found()
build_by_default : true,
install : true,
install_dir : doc_install_dir)
+
+ custom_target('documentation-linkcheck',
+ command: [sphinx, '-W', '-b', 'linkcheck', meson.current_source_dir(), '@OUTPUT@'],
+ build_always_stale: true,
+ input: docs_sources,
+ output: 'linkcheck')
endif
--
2.20.1
More information about the libcamera-devel
mailing list