Commit f3d1386a authored by Martí Bolívar's avatar Martí Bolívar Committed by Anas Nashif
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: default avatarMarti Bolivar <marti.bolivar@nordicsemi.no>
parent c7e66ff9
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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})