summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjell Ahlstedt <kjellahlstedt@gmail.com>2022-02-14 11:13:06 +0100
committerKjell Ahlstedt <kjellahlstedt@gmail.com>2022-02-14 11:13:06 +0100
commit2a96b129fbc1b65f34597a72e29cb9cc7cb208d9 (patch)
tree180f7057e0b9eb6ace503481a17cab6dd8c0eba3
parent9a90d530e8ff90a22f266452579a89645c6c5937 (diff)
downloadglibmm-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: ...).
-rw-r--r--docs/reference/meson.build4
-rw-r--r--examples/meson.build1
-rw-r--r--gio/giomm/meson.build5
-rw-r--r--glib/glibmm/meson.build10
-rw-r--r--meson.build24
-rw-r--r--tests/meson.build2
-rw-r--r--tools/extra_defs_gen/meson.build1
-rw-r--r--tools/meson.build6
8 files changed, 31 insertions, 22 deletions
diff --git a/docs/reference/meson.build b/docs/reference/meson.build
index 923577be..6e30c875 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 5f2089a8..f2c47417 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -69,7 +69,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 2f2193e3..fc508246 100644
--- a/gio/giomm/meson.build
+++ b/gio/giomm/meson.build
@@ -346,6 +346,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' ]
@@ -375,7 +376,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
@@ -384,7 +385,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 29f55bdd..df5580b2 100644
--- a/glib/glibmm/meson.build
+++ b/glib/glibmm/meson.build
@@ -281,12 +281,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' ]
@@ -316,14 +318,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,
@@ -332,13 +334,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 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 = {
diff --git a/tests/meson.build b/tests/meson.build
index 4d1135dc..ec8e17e2 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -62,7 +62,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,
)
@@ -79,7 +78,6 @@ foreach ex : test_programs
'-DGLIBMM_TEST_THAT_COMPILATION_FAILS=' + suffix],
dependencies: mm_dep,
implicit_include_directories: false,
- gui_app: false,
build_by_default: false,
install: false,
)
diff --git a/tools/extra_defs_gen/meson.build b/tools/extra_defs_gen/meson.build
index 92849a39..6fecead8 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')