Skip to content

Commit 95fb6ef

Browse files
committed
Add dependencies to Doxygen tag files in subprojects
Doxygen in a main project shall not be called before tag files have been created or updated in subprojects.
1 parent b19b4ea commit 95fb6ef

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

docs/reference/meson.build

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,27 @@
44
# sigcxx_api_version, build_documentation, source_h_files,
55
# built_h_files, install_datadir, python3, doc_reference,
66
# built_h_file_targets, can_add_dist_script
7-
# Output: install_docdir, install_devhelpdir, tag_file
87
# Output: install_docdir, install_devhelpdir, if build_documentation: tag_file
98

109
tag_file_modules = [
1110
'mm-common-libstdc++',
1211
]
1312
doxygen_tagfiles = ''
13+
doxygen_tag_targets = []
1414
docinstall_flags = []
1515
foreach module : tag_file_modules
1616
depmod = dependency(module, required: false)
1717
if depmod.found()
1818
doxytagfile = depmod.get_variable(pkgconfig: 'doxytagfile', internal: 'doxytagfile', default_value: '')
1919
if doxytagfile != ''
20+
if depmod.type_name() == 'internal'
21+
# Subprojects must build their tag files before doxygen is called.
22+
if module.startswith('mm-common')
23+
doxygen_tag_targets += subproject('mm-common').get_variable('global_tag_file_target')
24+
else
25+
doxygen_tag_targets += subproject(module).get_variable('global_tag_file_target')
26+
endif
27+
endif
2028
htmlrefpub = depmod.get_variable(pkgconfig: 'htmlrefpub', internal: 'htmlrefpub', default_value: '')
2129
htmlrefdir = depmod.get_variable(pkgconfig: 'htmlrefdir', internal: 'htmlrefdir', default_value: '')
2230
if htmlrefpub == ''
@@ -50,7 +58,7 @@ doc_conf_data.set('abs_top_srcdir', project_source_root)
5058
doc_conf_data.set('SIGCXX_API_VERSION', sigcxx_api_version)
5159
doc_conf_data.set('DOXYGEN_TAGFILES', doxygen_tagfiles)
5260

53-
configure_file(
61+
doxyfile = configure_file(
5462
input: 'Doxyfile.in',
5563
output: '@BASENAME@',
5664
configuration: doc_conf_data,
@@ -96,8 +104,9 @@ if built_h_file_targets.length() > 0
96104
blt_h_files,
97105
'@INPUT@',
98106
],
107+
depend_files: doxyfile,
108+
depends: built_h_file_targets + doxygen_tag_targets,
99109
build_by_default: build_documentation,
100-
depends: built_h_file_targets,
101110
install: true,
102111
install_dir: install_reference_docdir,
103112
)
@@ -112,6 +121,8 @@ else
112121
'@OUTPUT@',
113122
'@INPUT@',
114123
],
124+
depend_files: doxyfile,
125+
depends: doxygen_tag_targets,
115126
build_by_default: build_documentation,
116127
install: true,
117128
install_dir: install_reference_docdir,

meson.build

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,8 @@ if meson.is_subproject()
256256
}
257257
if build_documentation
258258
pkgconfig_vars += {'doxytagfile': tag_file.full_path()}
259+
# May be used in a main project.
260+
global_tag_file_target = tag_file
259261
endif
260262
sigcxx_dep = declare_dependency(
261263
dependencies: sigcxx_own_dep,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy