Skip to content

Commit

Permalink
doc: save ZEPHYR_BASE in more places where it's needed
Browse files Browse the repository at this point in the history
This fixes a corner case.

The ZEPHYR_BASE variable might be set in the environment at generation
time, but unset at build time. Save it in the cmake -E env calls to
scripts that need it.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
  • Loading branch information
mbolivar-nordic authored and nashif committed May 12, 2019
1 parent c7e66ff commit f3d1386
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions doc/CMakeLists.txt
Expand Up @@ -99,6 +99,7 @@ configure_file(${DOXYFILE_IN} ${DOXYFILE_OUT} @ONLY)
# workaround for this limitation.
set(EXTRACT_CONTENT_COMMAND
${CMAKE_COMMAND} -E env
ZEPHYR_BASE=${ZEPHYR_BASE}
${PYTHON_EXECUTABLE} scripts/extract_content.py
# Ignore any files in the output directory.
--ignore ${CMAKE_CURRENT_BINARY_DIR}
Expand Down Expand Up @@ -187,6 +188,7 @@ add_custom_target(
COMMAND ${CMAKE_COMMAND} -E make_directory ${RST_OUT}/doc/reference/kconfig
COMMAND ${CMAKE_COMMAND} -E env
PYTHONPATH="${ZEPHYR_BASE}/scripts/kconfig${SEP}$ENV{PYTHONPATH}"
ZEPHYR_BASE=${ZEPHYR_BASE}
srctree=${ZEPHYR_BASE}
KERNELVERSION=${KERNELVERSION}
BOARD_DIR=boards/*/*/
Expand All @@ -212,6 +214,7 @@ set(CONF_DIR ${ZEPHYR_BASE}/.known-issues/doc)
#
set(SPHINX_BUILD_HTML_COMMAND
${CMAKE_COMMAND} -E env
ZEPHYR_BASE=${ZEPHYR_BASE}
ZEPHYR_BUILD=${CMAKE_CURRENT_BINARY_DIR}
${SPHINXBUILD} -w ${SPHINX_LOG} -N -t ${DOC_TAG} -b html ${ALLSPHINXOPTS} ${RST_OUT}/doc ${SPHINX_OUTPUT_DIR_HTML})

Expand Down

0 comments on commit f3d1386

Please sign in to comment.