Skip to content

Commit

Permalink
doc: Add build env variable to know if doxygen has run
Browse files Browse the repository at this point in the history
Some extensions may be able to run faster if they can check if Doxygen
contents has changed from one build to the other

Signed-off-by: Benjamin Cabé <[email protected]>
  • Loading branch information
kartben authored and nashif committed Jun 17, 2024
1 parent be2993b commit 02ad7ef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions doc/_extensions/zephyr/api_overview.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ def sync_contents(app: Sphinx) -> None:
else:
doxygen_out_dir = Path(app.outdir) / "_doxygen"

if not app.env.doxygen_input_changed:
return

doxygen_xml_dir = doxygen_out_dir / "xml"
groups = parse_xml_dir(doxygen_xml_dir)

Expand Down
4 changes: 2 additions & 2 deletions doc/_extensions/zephyr/doxyrunner.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,8 +362,8 @@ def doxygen_build(app: Sphinx) -> None:
)

logger.info("Checking if Doxygen needs to be run...")
changed = doxygen_input_has_changed(app.env, doxyfile)
if not changed:
app.env.doxygen_input_changed = doxygen_input_has_changed(app.env, doxyfile)
if not app.env.doxygen_input_changed:
logger.info("Doxygen build will be skipped (no changes)!")
return

Expand Down

0 comments on commit 02ad7ef

Please sign in to comment.