zephyr/doc/Makefile
Gerard Marull-Paretas 5986d882bb doc: add support for DT_TURBO_MODE
Similar to Kconfig turbo mode, add a Devicetree bindings turbo mode. In
this mode, the Devicetree bindings pages are not generated. Instead, a
page with dummy symbols is created. This takes ~1K pages out of the
build, resulting in faster builds. This mode can be useful while in
development or CI PRs.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 20:47:10 -05:00

36 lines
894 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
KCONFIG_TURBO_MODE ?= 0
DT_TURBO_MODE ?= 0
# ------------------------------------------------------------------------------
# Documentation targets
.PHONY: configure clean html html-fast latex pdf doxygen
html-fast:
${MAKE} html KCONFIG_TURBO_MODE=1 DT_TURBO_MODE=1
html latex pdf doxygen: configure
cmake --build ${BUILDDIR} --target $@
configure:
cmake \
-GNinja \
-B${BUILDDIR} \
-S. \
-DDOC_TAG=${DOC_TAG} \
-DSPHINXOPTS="${SPHINXOPTS}" \
-DLATEXMKOPTS="${LATEXMKOPTS}" \
-DKCONFIG_TURBO_MODE=${KCONFIG_TURBO_MODE} \
-DDT_TURBO_MODE=${DT_TURBO_MODE}
clean:
cmake --build ${BUILDDIR} --target clean