[gtkmm/gtkmm-4-0] 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: [gtkmm/gtkmm-4-0] Subprojects can use meson.add_dist_script() if meson.version() >= 0.58.0
- Date: Fri, 21 May 2021 13:42:11 +0000 (UTC)
commit 0047966ce19465b68c78aa20534c40ce8bc5340b
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date: Wed May 5 19:13:38 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 ++---
gdk/gdkmm/meson.build | 5 ++---
gtk/gtkmm/meson.build | 6 +++---
meson.build | 11 +++++++----
4 files changed, 14 insertions(+), 13 deletions(-)
---
diff --git a/docs/reference/meson.build b/docs/reference/meson.build
index 0d64c997..d52fa0c9 100644
--- a/docs/reference/meson.build
+++ b/docs/reference/meson.build
@@ -4,7 +4,7 @@
# gdkmm_hg_ccg_basenames, gtkmm_hg_ccg_basenames, gdkmm_extra_h_files,
# gtkmm_extra_h_files, gdkmm_built_h_file_targets,
# gtkmm_built_h_file_targets, install_datadir, python3,
-# doc_reference_py, build_documentation
+# doc_reference_py, build_documentation, can_add_dist_script
# Output: install_docdir, install_devhelpdir, tag_file
tag_file_modules = [
@@ -161,9 +161,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/gdk/gdkmm/meson.build b/gdk/gdkmm/meson.build
index 0e81c2a6..ba23e0fc 100644
--- a/gdk/gdkmm/meson.build
+++ b/gdk/gdkmm/meson.build
@@ -3,7 +3,7 @@
# Input: gdkmm_build_dep, gtkmm_pcname, maintainer_mode, project_source_root,
# generate_binding_py, m4_files, install_includedir, python3,
# dummy_header_py, gmmproc_dir, build_deprecated_api,
-# gmmproc_extra_m4_dirs
+# gmmproc_extra_m4_dirs, can_add_dist_script
# Output: gdkmm_hg_ccg_basenames, gdkmm_extra_h_files, built_files_root,
# gdkmm_built_h_file_targets, gdkmm_used_built_h_file_targets,
# gdkmm_library
@@ -261,9 +261,8 @@ meson.add_install_script(
gdkmm_used_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,
diff --git a/gtk/gtkmm/meson.build b/gtk/gtkmm/meson.build
index 58f7b2b9..2781faa2 100644
--- a/gtk/gtkmm/meson.build
+++ b/gtk/gtkmm/meson.build
@@ -4,7 +4,8 @@
# generate_binding_py, m4_files, gtkmm_libversion, install_includedir,
# python3, gtkmm_rc, dummy_header_py, gmmproc_dir, macos_darwin_versions,
# build_deprecated_api, gmmproc_extra_m4_dirs, is_host_windows,
-# gdkmm_library, gdkmm_used_built_h_file_targets, gtkmm_libname
+# gdkmm_library, gdkmm_used_built_h_file_targets, gtkmm_libname,
+# can_add_dist_script
# Output: gtkmm_hg_ccg_basenames, gtkmm_extra_h_files, built_files_root,
# gtkmm_built_h_file_targets, gtkmm_own_dep
@@ -509,9 +510,8 @@ meson.add_install_script(
gtkmm_used_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,
diff --git a/meson.build b/meson.build
index b8d1daed..358f8ad0 100644
--- a/meson.build
+++ b/meson.build
@@ -264,6 +264,9 @@ if is_msvc
gui_app_ldflags += '-entry:mainCRTStartup'
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('gdk')
subdir('MSVC_NMake/gdkmm')
@@ -275,9 +278,8 @@ subdir('tests')
subdir('demos/gtk-demo')
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,
@@ -298,8 +300,9 @@ if not meson.is_subproject()
'untracked' / 'build_scripts',
dont_distribute,
)
-else
- # This is a subproject.
+endif
+
+if meson.is_subproject()
gtkmm_dep = declare_dependency(
dependencies: gtkmm_own_dep,
variables: {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]