doc: conf.py: build directory from environment
Get the output directory from environment variables instead of attempting to reparse the CLI arguments, as these can actually refer to a program other than `sphinx-build` (for example `sphinx-autobuild`). Signed-off-by: Jordan Yates <jordan@embeint.com>
This commit is contained in:
parent
09a67ad678
commit
2e99de8047
2 changed files with 2 additions and 4 deletions
|
@ -45,6 +45,7 @@ endif()
|
|||
set(SPHINX_ENV
|
||||
DOXYGEN_EXECUTABLE=${DOXYGEN_EXECUTABLE}
|
||||
DOT_EXECUTABLE=${DOXYGEN_DOT_EXECUTABLE}
|
||||
DOCS_HTML_DIR=${CMAKE_CURRENT_BINARY_DIR}/html
|
||||
)
|
||||
|
||||
if(DEFINED ENV{ZEPHYR_DOXYGEN_OVERLAY})
|
||||
|
|
|
@ -7,11 +7,8 @@ from pathlib import Path
|
|||
import re
|
||||
import textwrap
|
||||
|
||||
from sphinx.cmd.build import get_parser
|
||||
|
||||
args = get_parser().parse_args()
|
||||
ZEPHYR_BASE = Path(__file__).resolve().parents[1]
|
||||
ZEPHYR_BUILD = Path(args.outputdir).resolve()
|
||||
ZEPHYR_BUILD = Path(os.environ.get("DOCS_HTML_DIR")).resolve()
|
||||
|
||||
# Add the '_extensions' directory to sys.path, to enable finding Sphinx
|
||||
# extensions within.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue