[SCons] Install docs based on prior doc build

Also eliminate extra 'html' subdirectory in install destination
This commit is contained in:
Ray Speth
2025-11-13 20:59:39 -06:00
committed by Ingmar Schoegl
parent 848701bd92
commit 1dab14bbfb
2 changed files with 7 additions and 4 deletions
+2 -2
View File
@@ -1994,7 +1994,7 @@ if env['CC'] != 'cl':
VariantDir('build/platform', 'platform/posix', duplicate=0)
SConscript('build/platform/SConscript')
if env['doxygen_docs'] or env['sphinx_docs']:
if env['doxygen_docs'] or env['sphinx_docs'] or "install" in COMMAND_LINE_TARGETS:
SConscript('doc/SConscript')
# Sample programs (also used from test_problems/SConscript)
@@ -2067,7 +2067,7 @@ def postInstallMessage(target, source, env):
name=name, location=env_dict[location]
))
if env["sphinx_docs"] or env["doxygen_docs"]:
if env["installed_docs"]:
name = "HTML documentation"
install_message.append(locations_message.format(
name="HTML documentation", location=env_dict["inst_docdir"]
+5 -2
View File
@@ -133,5 +133,8 @@ if localenv['sphinx_docs']:
localenv.AlwaysBuild(sphinxdocs)
if localenv['doxygen_docs']:
localenv.Depends(sphinxdocs, docs)
install(localenv.RecursiveInstall, '$inst_docdir/html',
'#build/doc/html', exclude=['\\.map', '\\.md5'])
doc_files = install(localenv.RecursiveInstall, '$inst_docdir',
'#build/doc/html', exclude=['\\.map', '\\.md5'])
env['installed_docs'] = bool(doc_files)