diff options
author | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2021-05-18 09:34:43 +0200 |
---|---|---|
committer | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2021-05-18 09:34:43 +0200 |
commit | aa35dd4c7475a5ddfd40fadf78cd03015790fdbf (patch) | |
tree | 7d0f077638c582f2e6b9ea9ff0dd21805b5c71a5 | |
parent | b9caa40c3673b672cc583334a6f2a6589ee337ef (diff) | |
download | sigc++-aa35dd4c7475a5ddfd40fadf78cd03015790fdbf.tar.gz |
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.
-rw-r--r-- | docs/docs/reference/meson.build | 13 | ||||
-rw-r--r-- | meson.build | 2 |
2 files changed, 14 insertions, 1 deletions
diff --git a/docs/docs/reference/meson.build b/docs/docs/reference/meson.build index 62ff537..33aac27 100644 --- a/docs/docs/reference/meson.build +++ b/docs/docs/reference/meson.build @@ -13,6 +13,7 @@ tag_file_modules = [ 'mm-common-libstdc++', ] doxygen_tagfiles = '' +doxygen_tag_targets = [] docinstall_flags = [] foreach module : tag_file_modules depmod = dependency(module, required: false) @@ -29,6 +30,14 @@ foreach module : tag_file_modules htmlrefdir = depmod.get_variable(pkgconfig: 'htmlrefdir', default_value: '') endif 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 if htmlrefpub == '' htmlrefpub = htmlrefdir elif htmlrefdir == '' @@ -60,7 +69,7 @@ doc_conf_data.set('abs_top_srcdir', project_source_root) doc_conf_data.set('SIGCXX_API_VERSION', sigcxx_api_version) doc_conf_data.set('DOXYGEN_TAGFILES', doxygen_tagfiles) -configure_file( +doxyfile = configure_file( input: 'Doxyfile.in', output: '@BASENAME@', configuration: doc_conf_data, @@ -96,6 +105,8 @@ tag_file = custom_target('html_and_tag', '@OUTPUT@', '@INPUT@', ], + 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 b2d79fd..038814e 100644 --- a/meson.build +++ b/meson.build @@ -256,6 +256,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 sigcxx_dep = declare_dependency( dependencies: sigcxx_own_dep, |