41566e2502
This patch adds support for the `linkcheck` Sphinx builder, so that we can easily check for broken links in the documentation. It can be run like this: ninja linkcheck Or, using the Makefile shim: make linkcheck All Zephyr Github issues links are ignored, since we have lots of these URLs and they quickly hit GH rate limit. They have small chance to be incorrect, so we should be ok. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
34 lines
812 B
Makefile
34 lines
812 B
Makefile
# ------------------------------------------------------------------------------
|
|
# Makefile for documentation build
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
BUILDDIR ?= _build
|
|
DOC_TAG ?= development
|
|
SPHINXOPTS ?= -j auto
|
|
LATEXMKOPTS ?= -halt-on-error -no-shell-escape
|
|
DT_TURBO_MODE ?= 0
|
|
|
|
# ------------------------------------------------------------------------------
|
|
# Documentation targets
|
|
|
|
.PHONY: configure clean html html-fast latex pdf doxygen
|
|
|
|
html-fast:
|
|
${MAKE} html DT_TURBO_MODE=1
|
|
|
|
html latex pdf linkcheck doxygen: configure
|
|
cmake --build ${BUILDDIR} --target $@
|
|
|
|
configure:
|
|
cmake \
|
|
-GNinja \
|
|
-B${BUILDDIR} \
|
|
-S. \
|
|
-DDOC_TAG=${DOC_TAG} \
|
|
-DSPHINXOPTS="${SPHINXOPTS}" \
|
|
-DLATEXMKOPTS="${LATEXMKOPTS}" \
|
|
-DDT_TURBO_MODE=${DT_TURBO_MODE}
|
|
|
|
clean:
|
|
cmake --build ${BUILDDIR} --target clean
|