Skip to content

Commit 02ad7ef

Browse files
kartbennashif
authored andcommitted
doc: Add build env variable to know if doxygen has run
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]>
1 parent be2993b commit 02ad7ef

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

doc/_extensions/zephyr/api_overview.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@ def sync_contents(app: Sphinx) -> None:
141141
else:
142142
doxygen_out_dir = Path(app.outdir) / "_doxygen"
143143

144+
if not app.env.doxygen_input_changed:
145+
return
146+
144147
doxygen_xml_dir = doxygen_out_dir / "xml"
145148
groups = parse_xml_dir(doxygen_xml_dir)
146149

doc/_extensions/zephyr/doxyrunner.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,8 +362,8 @@ def doxygen_build(app: Sphinx) -> None:
362362
)
363363

364364
logger.info("Checking if Doxygen needs to be run...")
365-
changed = doxygen_input_has_changed(app.env, doxyfile)
366-
if not changed:
365+
app.env.doxygen_input_changed = doxygen_input_has_changed(app.env, doxyfile)
366+
if not app.env.doxygen_input_changed:
367367
logger.info("Doxygen build will be skipped (no changes)!")
368368
return
369369

0 commit comments

Comments
 (0)