[Doc] Flatten output directory structure

Copy Doxygen output into a subdirectory of Sphinx so the Sphinx
index can be the full site index.

Partially addresses Cantera/cantera-website#229
This commit is contained in:
Ray Speth
2023-10-09 16:40:37 -04:00
committed by Ray Speth
parent 70b08041e2
commit c533ca90bb
6 changed files with 26 additions and 22 deletions
+12 -8
View File
@@ -96,17 +96,21 @@ def get_function_name(function_string):
else:
return sig
if localenv['doxygen_docs']:
docs = build(localenv.Command('#build/doc/doxygen/html/index.html',
'doxygen/Doxyfile', 'doxygen $SOURCE'))
if localenv['doxygen_docs'] or localenv['sphinx_docs']:
docs = build(localenv.Command(
'#build/doc/html/cxx/index.html', 'doxygen/Doxyfile',
[
Delete("build/doc/html/cxx"),
'doxygen $SOURCE',
Copy("build/doc/html/cxx", "build/doc/doxygen/html")
]
))
env.Depends(docs, env.Glob('#doc/doxygen/*') +
multi_glob(env, '#include/cantera', 'h') +
multi_glob(env, '#include/cantera/*', 'h') +
multi_glob(env, '#src/cantera/*', 'h', 'cpp'))
env.Alias('doxygen', docs)
install(localenv.RecursiveInstall, '$inst_docdir/doxygen/html',
'#/build/doc/doxygen/html', exclude=['\\.map', '\\.md5'])
if localenv['sphinx_docs']:
def build_sphinx(target, source, env):
@@ -114,7 +118,7 @@ if localenv['sphinx_docs']:
if env['logging'] == 'debug':
cmd.append('-v')
cmd += ('-b', 'html', '-d', 'build/doc/sphinx/doctrees', 'build/doc/sphinx',
'build/doc/sphinx/html')
'build/doc/html')
code = subprocess.call(cmd, env=env['ENV'])
if code:
raise Errors.BuildError(target, action=env['sphinx_cmd'])
@@ -251,5 +255,5 @@ if localenv['sphinx_docs']:
localenv.AlwaysBuild(sphinxdocs)
if localenv['doxygen_docs']:
localenv.Depends(sphinxdocs, docs)
install(localenv.RecursiveInstall, '$inst_docdir/sphinx/html',
'#build/doc/sphinx/html')
install(localenv.RecursiveInstall, '$inst_docdir/html',
'#build/doc/html', exclude=['\\.map', '\\.md5'])