Lines Matching +full:doxygen +full:-

6 SPDX-License-Identifier: Apache-2.0
11 This Sphinx plugin can be used to run Doxygen build as part of the Sphinx build
16 - Doxygen build is run before Sphinx reads input files
17 - Doxyfile can be optionally pre-processed so that variables can be inserted
18 - Changes in the Doxygen input files are tracked so that Doxygen build is only
20 - Synchronizes Doxygen XML output so that even if Doxygen is run only changed,
25 - https://github.com/michaeljones/breathe/issues/420
30 - ``doxyrunner_doxygen``: Path to the Doxygen binary.
31 - ``doxyrunner_doxyfile``: Path to Doxyfile.
32 - ``doxyrunner_outdir``: Doxygen build output directory (inserted to
34 - ``doxyrunner_outdir_var``: Variable representing the Doxygen build output
36 Doxygen variables reference to the output directory.
37 - ``doxyrunner_fmt``: Flag to indicate if Doxyfile should be formatted.
38 - ``doxyrunner_fmt_vars``: Format variables dictionary (name: value).
39 - ``doxyrunner_fmt_pattern``: Format pattern.
40 - ``doxyrunner_silent``: If Doxygen output should be logged or not. Note that
64 def hash_file(file: Path) -> str:
74 with open(file, encoding="utf-8") as f:
75 sha256 = hashlib.sha256(f.read().encode("utf-8"))
79 def get_doxygen_option(doxyfile: str, option: str) -> list[str]:
80 """Obtain the value of a Doxygen option.
93 option_re = re.compile(r"^\s*([A-Z0-9_]+)\s*=\s*(.*)$")
119 value = value[:-1]
138 ) -> str:
147 outdir: Output directory of the Doxygen build.
148 silent: If Doxygen should be run in quiet mode or not.
196 def doxygen_input_has_changed(env: BuildEnvironment, doxyfile: str) -> bool:
197 """Check if Doxygen input files have changed.
207 # obtain Doxygen input files and patterns
237 def process_doxygen_output(line: str, silent: bool) -> None:
238 """Process a line of Doxygen program output.
240 This function will map Doxygen output to the Sphinx logger output. Errors
245 line: Doxygen program line.
249 m = re.match(r"(.*):(\d+): ([a-z]+): (.*)", line)
263 def run_doxygen(doxygen: str, doxyfile: str, silent: bool = False) -> None:
264 """Run Doxygen build.
267 doxygen: Path to Doxygen binary.
269 silent: If Doxygen output should be logged or not.
276 p = Popen([doxygen, f_doxyfile_name], stdout=PIPE, stderr=STDOUT, encoding="utf-8")
287 raise OSError(f"Doxygen process returned non-zero ({p.returncode})")
290 def sync_doxygen(doxyfile: str, new: Path, prev: Path) -> None:
291 """Synchronize Doxygen output with a previous build.
294 actually modified in the Doxygen XML output. Latest HTML content is just
299 new: Newest Doxygen build output directory.
300 prev: Previous Doxygen build output directory.
337 def doxygen_build(app: Sphinx) -> None:
363 logger.info("Checking if Doxygen needs to be run...")
366 logger.info("Doxygen build will be skipped (no changes)!")
369 logger.info("Running Doxygen...")
376 logger.info("Syncing Doxygen output...")
382 def setup(app: Sphinx) -> dict[str, Any]:
383 app.add_config_value("doxyrunner_doxygen", "doxygen", "env")
392 app.connect("builder-inited", doxygen_build)