zephyr/doc/Makefile
Gerard Marull-Paretas da34ee9c31 doc: makefile: add support for latexmk options
Allow to override latexmk options via Makefile. Defaults match those in
the CMakeLists.txt.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-07-30 08:21:02 -04:00

34 lines
822 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
# ------------------------------------------------------------------------------
# Documentation targets
.PHONY: configure clean html html-fast latex pdf doxygen
html-fast:
${MAKE} html KCONFIG_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}
clean:
cmake --build ${BUILDDIR} --target clean