From f3d1386ae847688f852d06998cba0778df2d130f Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Fri, 10 May 2019 04:23:23 -0600 Subject: [PATCH] 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 --- doc/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 79e02e6f6dbaf2..7062375be50553 100644 --- a/doc/CMakeLists.txt +++ b/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})