[pangomm/pangomm-2-46] Add dependencies to Doxygen tag files in subprojects
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pangomm/pangomm-2-46] Add dependencies to Doxygen tag files in subprojects
- Date: Tue, 18 May 2021 08:46:34 +0000 (UTC)
commit 5cb2a8f21c9cf892309dae8cd8faf7592447a987
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date: Tue May 18 10:44:38 2021 +0200
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.
docs/reference/meson.build | 13 ++++++++++++-
meson.build | 4 +++-
2 files changed, 15 insertions(+), 2 deletions(-)
---
diff --git a/docs/reference/meson.build b/docs/reference/meson.build
index 6f6e27b..13dabf0 100644
--- a/docs/reference/meson.build
+++ b/docs/reference/meson.build
@@ -12,12 +12,21 @@ tag_file_modules = [
'cairomm-1.0',
]
doxygen_tagfiles = ''
+doxygen_tag_targets = []
docinstall_flags = []
foreach module : tag_file_modules
depmod = dependency(module, required: false)
if depmod.found()
doxytagfile = depmod.get_variable(pkgconfig: 'doxytagfile', internal: 'doxytagfile', default_value: '')
if doxytagfile != ''
+ if depmod.type_name() == 'internal'
+ # Subprojects must build their tag files before doxygen is called.
+ if module.startswith('mm-common')
+ doxygen_tag_targets += subproject('mm-common').get_variable('global_tag_file_target')
+ else
+ doxygen_tag_targets += subproject(module).get_variable('global_tag_file_target')
+ endif
+ endif
htmlrefpub = depmod.get_variable(pkgconfig: 'htmlrefpub', internal: 'htmlrefpub', default_value: '')
htmlrefdir = depmod.get_variable(pkgconfig: 'htmlrefdir', internal: 'htmlrefdir', default_value: '')
if htmlrefpub == ''
@@ -51,7 +60,7 @@ doc_conf_data.set('abs_top_srcdir', project_source_root)
doc_conf_data.set('PANGOMM_MODULE_NAME', book_name)
doc_conf_data.set('DOXYGEN_TAGFILES', doxygen_tagfiles)
-configure_file(
+doxyfile = configure_file(
input: 'Doxyfile.in',
output: '@BASENAME@',
configuration: doc_conf_data,
@@ -110,6 +119,8 @@ tag_file = custom_target('html_and_tag',
src_h_files,
built_h_files,
],
+ depend_files: doxyfile,
+ depends: doxygen_tag_targets,
build_by_default: build_documentation,
install: true,
install_dir: install_reference_docdir,
diff --git a/meson.build b/meson.build
index a9ee761..0e56e6d 100644
--- a/meson.build
+++ b/meson.build
@@ -272,7 +272,7 @@ if can_add_dist_script
project_source_root,
)
# Add build scripts to the distribution directory, and delete .gitignore
- # files and an empty $MESON_DIST_ROOT/build/ directory.
+ # files and an empty $MESON_PROJECT_DIST_ROOT/build/ directory.
meson.add_dist_script(
python3.path(), dist_build_scripts_py,
project_source_root,
@@ -288,6 +288,8 @@ if meson.is_subproject()
}
if build_documentation
pkgconfig_vars += {'doxytagfile': tag_file.full_path()}
+ # May be used in a main project.
+ global_tag_file_target = tag_file
endif
pangomm_dep = declare_dependency(
dependencies: pangomm_own_dep,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]