Skip to content
Permalink
Browse files

doc: save ZEPHYR_BASE in more places where it's needed

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 authored and nashif committed May 10, 2019
1 parent c7e66ff commit f3d1386ae847688f852d06998cba0778df2d130f
Showing with 3 additions and 0 deletions.
  1. +3 −0 doc/CMakeLists.txt
@@ -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}
@@ -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/*/*/
@@ -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})

0 comments on commit f3d1386

Please sign in to comment.
You can’t perform that action at this time.