zephyr/Makefile
Marc Herbert 43187e2723 doc Makefile: convert to a real Makefile to get rid of duplication
Zero user interface or functional change.

Also change undocumented cmake -H option to documented -S
https://stackoverflow.com/questions/31090821/what-does-the-h-option-means-for-cmake

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-01-11 19:27:06 -05:00

30 lines
711 B
Makefile

#
# Top level makefile for documentation build
#
BUILDDIR ?= doc/_build
DOC_TAG ?= development
SPHINXOPTS ?= -q
KCONFIG_TURBO_MODE ?= 0
# Documentation targets
# ---------------------------------------------------------------------------
clean:
rm -rf ${BUILDDIR}
htmldocs-fast:
${MAKE} htmldocs KCONFIG_TURBO_MODE=1
htmldocs pdfdocs doxygen: configure
cmake --build ${BUILDDIR} -- $@ # -v # VERBOSE=1
# Run CMake every time cause it's quick and re-configures TURBO_MODE if
# needed
.PHONY: configure
configure:
cmake -GNinja -B${BUILDDIR} -Sdoc/ -DDOC_TAG=${DOC_TAG} \
-DSPHINXOPTS=${SPHINXOPTS} \
-DKCONFIG_TURBO_MODE=${KCONFIG_TURBO_MODE}
.PHONY: clean htmldocs htmldocs-fast pdfdocs doxygen