diff options
author | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2022-02-14 11:13:06 +0100 |
---|---|---|
committer | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2022-02-14 11:13:06 +0100 |
commit | 2a96b129fbc1b65f34597a72e29cb9cc7cb208d9 (patch) | |
tree | 180f7057e0b9eb6ace503481a17cab6dd8c0eba3 /meson.build | |
parent | 9a90d530e8ff90a22f266452579a89645c6c5937 (diff) | |
download | glibmm-2a96b129fbc1b65f34597a72e29cb9cc7cb208d9.tar.gz |
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: ...).
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/meson.build b/meson.build index a2ee5ef3..0c39d85e 100644 --- a/meson.build +++ b/meson.build @@ -6,7 +6,8 @@ project('glibmm', 'cpp', default_options: [ 'cpp_std=c++17' ], - meson_version: '>= 0.54.0', # required for meson.override_dependency() + meson_version: '>= 0.55.0', # required for meson.add_dist_script(python3, ...) + # and meson.add_install_script(python3, ...) ) glibmm_api_version = '2.68' @@ -61,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 @@ -156,25 +157,28 @@ 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 endif # Check if perl is required and available. -# Done now, when the doc_reference_py script is available. doc_perl_prop = run_command( python3, doc_reference_py, 'get_script_property', '', # MMDOCTOOLDIR is not used - 'requires_perl') + 'requires_perl', + check: false, +) doc_requires_perl = true if doc_perl_prop.returncode() == 0 and doc_perl_prop.stdout() == 'false' doc_requires_perl = false @@ -265,7 +269,7 @@ 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, ) @@ -277,7 +281,7 @@ if can_add_dist_script # 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', dont_distribute, @@ -302,12 +306,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. @@ -317,12 +323,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 = { |