[pangomm] Subprojects can use meson.add_dist_script() if meson.version() >= 0.58.0
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pangomm] Subprojects can use meson.add_dist_script() if meson.version() >= 0.58.0
- Date: Wed, 5 May 2021 16:26:56 +0000 (UTC)
commit 9a14621dbf947749faa1f138e2d5757f9caf70bc
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date: Wed May 5 18:17:30 2021 +0200
Subprojects can use meson.add_dist_script() if meson.version() >= 0.58.0
Call add_dist_script() in a subproject, if meson.version() >= 0.58.0.
docs/reference/meson.build | 5 ++---
meson.build | 11 +++++++----
pango/pangomm/meson.build | 6 +++---
3 files changed, 12 insertions(+), 10 deletions(-)
---
diff --git a/docs/reference/meson.build b/docs/reference/meson.build
index bfc85a9..1812be7 100644
--- a/docs/reference/meson.build
+++ b/docs/reference/meson.build
@@ -2,7 +2,7 @@
# Input: built_files_root, project_source_root, pangomm_pcname, python3,
# hg_ccg_basenames, extra_h_files, built_h_file_targets, install_datadir,
-# doc_reference_py
+# doc_reference_py, can_add_dist_script
# Output: install_docdir, install_devhelpdir, tag_file
tag_file_modules = [
@@ -149,9 +149,8 @@ endforeach
install_data(image_files, install_dir: install_image_docdir)
-if not meson.is_subproject()
+if can_add_dist_script
# Distribute built files and files copied by mm-common-get.
- # (add_dist_script() is not allowed in a subproject)
meson.add_dist_script(
python3.path(), doc_reference_py, 'dist_doc',
doctool_dir,
diff --git a/meson.build b/meson.build
index e1dba25..c25f548 100644
--- a/meson.build
+++ b/meson.build
@@ -218,15 +218,17 @@ if is_msvc
endforeach
endif
+# add_dist_script() is not allowed in a subproject if meson.version() < 0.58.0.
+can_add_dist_script = not meson.is_subproject() or meson.version().version_compare('>= 0.58.0')
+
subdir('tools/extra_defs_gen')
subdir('pango')
subdir('MSVC_NMake/pangomm')
subdir('pango/pangomm')
subdir('docs/reference')
-if not meson.is_subproject()
+if can_add_dist_script
# Add a ChangeLog file to the distribution directory.
- # (add_dist_script() is not allowed in a subproject)
meson.add_dist_script(
python3.path(), dist_changelog_py,
project_source_root,
@@ -238,8 +240,9 @@ if not meson.is_subproject()
project_source_root,
'untracked' / 'build_scripts',
)
-else
- # This is a subproject.
+endif
+
+if meson.is_subproject()
pangomm_dep = declare_dependency(
dependencies: pangomm_own_dep,
variables: {
diff --git a/pango/pangomm/meson.build b/pango/pangomm/meson.build
index d64a530..e6c869a 100644
--- a/pango/pangomm/meson.build
+++ b/pango/pangomm/meson.build
@@ -2,7 +2,8 @@
# Input: pangomm_build_dep, pangomm_pcname, maintainer_mode, project_source_root,
# generate_binding_py, m4_files, pangomm_libversion, install_includedir,
-# python3, pangomm_rc, dummy_header_py, gmmproc_dir, msvc14x_toolset_ver
+# python3, pangomm_rc, dummy_header_py, gmmproc_dir, msvc14x_toolset_ver,
+# can_add_dist_script
# Output: hg_ccg_basenames, extra_h_files, built_h_file_targets, built_files_root,
# pangomm_own_dep
@@ -222,9 +223,8 @@ meson.add_install_script(
hg_ccg_basenames
)
-if not meson.is_subproject()
+if can_add_dist_script
# Distribute built files.
- # (add_dist_script() is not allowed in a subproject)
meson.add_dist_script(
python3.path(), generate_binding_py, 'dist_built_files',
built_h_cc_dir,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]