doc: extensions: doxyrunner: make html output optional
Make HTML output optional. The extension checks the `GENERATE_HTML` option to check if active. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
parent
da9e947f7a
commit
07a5cd5322
1 changed files with 12 additions and 10 deletions
|
@ -238,24 +238,26 @@ def sync_doxygen(doxyfile: str, new: Path, prev: Path) -> None:
|
|||
prev: Previous Doxygen build output directory.
|
||||
"""
|
||||
|
||||
generate_html = get_doxygen_option(doxyfile, "GENERATE_HTML")
|
||||
if generate_html == "YES":
|
||||
html_output = get_doxygen_option(doxyfile, "HTML_OUTPUT")
|
||||
if not html_output:
|
||||
raise ValueError("No HTML_OUTPUT set in Doxyfile")
|
||||
|
||||
new_htmldir = new / html_output[0]
|
||||
prev_htmldir = prev / html_output[0]
|
||||
|
||||
if prev_htmldir.exists():
|
||||
shutil.rmtree(prev_htmldir)
|
||||
new_htmldir.rename(prev_htmldir)
|
||||
|
||||
xml_output = get_doxygen_option(doxyfile, "XML_OUTPUT")
|
||||
if not xml_output:
|
||||
raise ValueError("No XML_OUTPUT set in Doxyfile")
|
||||
|
||||
new_htmldir = new / html_output[0]
|
||||
prev_htmldir = prev / html_output[0]
|
||||
|
||||
new_xmldir = new / xml_output[0]
|
||||
prev_xmldir = prev / xml_output[0]
|
||||
|
||||
if prev_htmldir.exists():
|
||||
shutil.rmtree(prev_htmldir)
|
||||
new_htmldir.rename(prev_htmldir)
|
||||
|
||||
if prev_xmldir.exists():
|
||||
dcmp = filecmp.dircmp(new_xmldir, prev_xmldir)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue