[glibmm/glibmm-2-66] meson.build: Specify 'check' option in run_command()
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm/glibmm-2-66] meson.build: Specify 'check' option in run_command()
- Date: Mon, 14 Feb 2022 10:27:05 +0000 (UTC)
commit 660ac5386f399f2f96f285cbcee6eadaeea69888
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date: Mon Feb 14 10:37:19 2022 +0100
meson.build: Specify 'check' option in run_command()
The default value will be changed in future Meson releases.
Don't use deprecated python3.path() and execute(..., gui_app: ...).
docs/reference/meson.build | 4 ++--
examples/meson.build | 1 -
gio/giomm/meson.build | 5 +++--
glib/glibmm/meson.build | 10 ++++++----
meson.build | 20 +++++++++++++-------
tests/meson.build | 1 -
tools/extra_defs_gen/meson.build | 1 +
tools/meson.build | 6 +++---
8 files changed, 28 insertions(+), 20 deletions(-)
---
diff --git a/docs/reference/meson.build b/docs/reference/meson.build
index 140a6ce0..05c11302 100644
--- a/docs/reference/meson.build
+++ b/docs/reference/meson.build
@@ -154,7 +154,7 @@ devhelp_file = custom_target('devhelp',
# Install Devhelp file and html files.
meson.add_install_script(
- python3.path(), doc_reference_py, 'install_doc',
+ python3, doc_reference_py, 'install_doc',
doctool_dir,
devhelp_file.full_path(),
install_devhelpdir,
@@ -177,7 +177,7 @@ install_data(image_files, install_dir: install_image_docdir)
if can_add_dist_script
# Distribute built files and files copied by mm-common-get.
meson.add_dist_script(
- python3.path(), doc_reference_py, 'dist_doc',
+ python3, doc_reference_py, 'dist_doc',
doctool_dir,
doctool_dist_dir,
meson.current_build_dir(),
diff --git a/examples/meson.build b/examples/meson.build
index 9e048fce..9d19da96 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -79,7 +79,6 @@ foreach ex : examples
cpp_args: ['-DGLIBMM_DISABLE_DEPRECATED', '-DGIOMM_DISABLE_DEPRECATED'],
dependencies: is_multithread ? [mm_dep, thread_dep] : mm_dep,
implicit_include_directories: false,
- gui_app: false,
build_by_default: build_examples,
install: false,
)
diff --git a/gio/giomm/meson.build b/gio/giomm/meson.build
index d2e33f51..6222e04b 100644
--- a/gio/giomm/meson.build
+++ b/gio/giomm/meson.build
@@ -343,6 +343,7 @@ else # not maintainer_mode
meson.current_build_dir(),
src_untracked_giomm,
giomm_hg_ccg_basenames,
+ check: true,
)
built_cc_files = [ rel_untracked_giomm / 'wrap_init.cc' ]
@@ -372,7 +373,7 @@ endif
# Install built .h and _p.h files.
meson.add_install_script(
- python3.path(), generate_binding_py, 'install_built_h_files',
+ python3, generate_binding_py, 'install_built_h_files',
built_h_cc_dir,
install_includedir / giomm_pcname / 'giomm', # subdir below {prefix}
giomm_used_hg_ccg_basenames
@@ -381,7 +382,7 @@ meson.add_install_script(
if can_add_dist_script
# Distribute built files.
meson.add_dist_script(
- python3.path(), generate_binding_py, 'dist_built_files',
+ python3, generate_binding_py, 'dist_built_files',
built_h_cc_dir,
untracked_giomm,
giomm_hg_ccg_basenames,
diff --git a/glib/glibmm/meson.build b/glib/glibmm/meson.build
index f71c2cc0..d016bd06 100644
--- a/glib/glibmm/meson.build
+++ b/glib/glibmm/meson.build
@@ -295,12 +295,14 @@ else # not maintainer_mode
meson.current_build_dir(),
src_untracked_glibmm,
glibmm_hg_ccg_basenames,
+ check: true,
)
run_command(
python3, handle_built_files_py, 'copy_built_files',
meson.current_build_dir(),
src_untracked_glibmm,
glibmm_h_m4_files + glibmm_cc_m4_files,
+ check: true,
)
built_cc_files = [ rel_untracked_glibmm / 'wrap_init.cc' ]
@@ -330,14 +332,14 @@ endif
# Install built .h and _p.h files.
meson.add_install_script(
- python3.path(), generate_binding_py, 'install_built_h_files',
+ python3, generate_binding_py, 'install_built_h_files',
built_h_cc_dir,
install_includedir / glibmm_pcname / 'glibmm', # subdir below {prefix}
glibmm_hg_ccg_basenames
)
# Install .h files built from .m4 files.
meson.add_install_script(
- python3.path(), handle_built_files_py, 'install_built_h_files',
+ python3, handle_built_files_py, 'install_built_h_files',
built_h_cc_dir,
install_includedir / glibmm_pcname / 'glibmm', # subdir below {prefix}
glibmm_h_m4_files,
@@ -346,13 +348,13 @@ meson.add_install_script(
if can_add_dist_script
# Distribute built files.
meson.add_dist_script(
- python3.path(), generate_binding_py, 'dist_built_files',
+ python3, generate_binding_py, 'dist_built_files',
built_h_cc_dir,
untracked_glibmm,
glibmm_hg_ccg_basenames,
)
meson.add_dist_script(
- python3.path(), handle_built_files_py, 'dist_built_files',
+ python3, handle_built_files_py, 'dist_built_files',
built_h_cc_dir,
untracked_glibmm,
glibmm_h_m4_files + glibmm_cc_m4_files,
diff --git a/meson.build b/meson.build
index 69717917..2d1ed487 100644
--- a/meson.build
+++ b/meson.build
@@ -6,8 +6,8 @@ project('glibmm', 'cpp',
default_options: [
'cpp_std=c++11'
],
- meson_version: '>= 0.54.0', # required for meson.override_dependency()
- # and dep.get_variable(internal:)
+ meson_version: '>= 0.55.0', # required for meson.add_dist_script(python3, ...)
+ # and meson.add_install_script(python3, ...)
)
glibmm_api_version = '2.4'
@@ -62,7 +62,7 @@ import os
import sys
sys.exit(os.path.isdir("@0@") or os.path.isfile("@0@"))
'''.format(project_source_root / '.git')
-is_git_build = run_command(python3, '-c', cmd_py).returncode() != 0
+is_git_build = run_command(python3, '-c', cmd_py, check: false).returncode() != 0
# Are we testing a dist tarball while it's being built?
# There ought to be a better way. https://github.com/mesonbuild/meson/issues/6866
@@ -158,14 +158,16 @@ dist_build_scripts_py = script_dir / 'dist-build-scripts.py'
if maintainer_mode
# Copy files to untracked/build_scripts and untracked/docs.
run_command(mm_common_get, '--force', script_dir,
- project_source_root / 'untracked' / 'docs')
+ project_source_root / 'untracked' / 'docs',
+ check: true,
+ )
else
cmd_py = '''
import os
import sys
sys.exit(os.path.isfile("@0@"))
'''.format(generate_binding_py)
- file_exists = run_command(python3, '-c', cmd_py).returncode() != 0
+ file_exists = run_command(python3, '-c', cmd_py, check: false).returncode() != 0
if not file_exists
error('Missing files in untracked/. You must enable maintainer-mode.')
endif
@@ -253,13 +255,13 @@ subdir('docs/reference')
if can_add_dist_script
# Add a ChangeLog file to the distribution directory.
meson.add_dist_script(
- python3.path(), dist_changelog_py,
+ python3, dist_changelog_py,
project_source_root,
)
# Add build scripts to the distribution directory, and delete .gitignore
# files and an empty $MESON_PROJECT_DIST_ROOT/build/ directory.
meson.add_dist_script(
- python3.path(), dist_build_scripts_py,
+ python3, dist_build_scripts_py,
project_source_root,
'untracked' / 'build_scripts',
)
@@ -283,12 +285,14 @@ if meson.is_subproject()
project_build_root,
gmmproc_subproj_dir,
'gmmproc',
+ check: true,
)
run_command(
python3, handle_built_files_py, 'copy_built_files',
project_build_root / 'tools',
gmmproc_subproj_dir,
'generate_wrap_init.pl',
+ check: true,
)
# Copy files needed by gmmproc from source dir to build dir.
@@ -298,12 +302,14 @@ if meson.is_subproject()
project_source_root / 'tools' / 'm4',
gmmproc_subproj_dir / 'm4',
m4_basefiles,
+ check: true,
)
run_command(
python3, handle_built_files_py, 'copy_built_files',
project_source_root / 'tools' / 'pm',
gmmproc_subproj_dir / 'pm',
pm_basefiles,
+ check: true,
)
pkgconfig_vars = {
diff --git a/tests/meson.build b/tests/meson.build
index b53616b6..6a9f4cce 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -60,7 +60,6 @@ foreach ex : test_programs
cpp_args: ['-DGLIBMM_DISABLE_DEPRECATED', '-DGIOMM_DISABLE_DEPRECATED'],
dependencies: is_multithread ? [mm_dep, thread_dep] : mm_dep,
implicit_include_directories: false,
- gui_app: false,
build_by_default: true,
install: false,
)
diff --git a/tools/extra_defs_gen/meson.build b/tools/extra_defs_gen/meson.build
index 362536d3..b4f2b647 100644
--- a/tools/extra_defs_gen/meson.build
+++ b/tools/extra_defs_gen/meson.build
@@ -27,6 +27,7 @@ if meson.is_subproject()
meson.current_source_dir(),
project_build_root / 'glib' / 'glibmm_generate_extra_defs',
'generate_extra_defs.h',
+ check: true,
)
endif
diff --git a/tools/meson.build b/tools/meson.build
index 370c8f3f..6ebab821 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -10,13 +10,13 @@ install_procdir = install_libdir / glibmm_pcname / 'proc'
# Configuration data for gmmproc.
gmmproc_conf_data = configuration_data()
-gmmproc_conf_data.set('PERL', perl.found() ? perl.path() : '')
+gmmproc_conf_data.set('PERL', perl.found() ? perl.full_path() : '')
gmmproc_conf_data.set('configure_input', 'tools/gmmproc. Generated from gmmproc.in')
gmmproc_conf_data.set('prefix', install_prefix)
gmmproc_conf_data.set('exec_prefix', '${prefix}')
gmmproc_conf_data.set('libdir', '${exec_prefix}' / install_libdir)
gmmproc_conf_data.set('GLIBMM_MODULE_NAME', glibmm_pcname)
-gmmproc_conf_data.set('M4', m4.found() ? '/'.join(m4.path().split('\\')) : '')
+gmmproc_conf_data.set('M4', m4.found() ? '/'.join(m4.full_path().split('\\')) : '')
gmmproc_conf_data.set('PACKAGE_VERSION', meson.project_version())
gmmproc = configure_file(
@@ -28,7 +28,7 @@ gmmproc = configure_file(
# Configuration data for generate_wrap_init.pl.
gen_wrap_init_conf_data = configuration_data()
-gen_wrap_init_conf_data.set('PERL', perl.found() ? perl.path() : '')
+gen_wrap_init_conf_data.set('PERL', perl.found() ? perl.full_path() : '')
gen_wrap_init_conf_data.set('configure_input',
'tools/generate_wrap_init.pl. Generated from generate_wrap_init.pl.in')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]