summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjell Ahlstedt <kjellahlstedt@gmail.com>2022-02-11 15:33:06 +0100
committerKjell Ahlstedt <kjellahlstedt@gmail.com>2022-02-11 15:33:06 +0100
commit88d8790c07e0cb82a78085702a3fd52713bc3d1a (patch)
tree0c8fd3de1b6caf0deb5c1233237f1d633e860e41
parent6f9483e111bba31eade429016afa03218f3a3ff3 (diff)
downloadsigc++-88d8790c07e0cb82a78085702a3fd52713bc3d1a.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--MSVC_NMake/meson.build2
-rw-r--r--docs/manual/meson.build3
-rw-r--r--docs/reference/meson.build4
-rw-r--r--examples/meson.build1
-rw-r--r--meson.build20
-rw-r--r--sigc++/meson.build5
-rw-r--r--tests/meson.build2
7 files changed, 20 insertions, 17 deletions
diff --git a/MSVC_NMake/meson.build b/MSVC_NMake/meson.build
index f9ddc35..09078b3 100644
--- a/MSVC_NMake/meson.build
+++ b/MSVC_NMake/meson.build
@@ -23,7 +23,7 @@ handle_built_files = project_source_root / 'tools' / 'handle-built-files.py'
if can_add_dist_script
# Distribute built files.
meson.add_dist_script(
- python3.path(), handle_built_files, 'dist_gen_msvc_files',
+ python3, handle_built_files, 'dist_gen_msvc_files',
meson.current_build_dir(),
untracked_msvc_nmake,
project_build_root / 'sigc++config.h',
diff --git a/docs/manual/meson.build b/docs/manual/meson.build
index d2f97b9..2442ddf 100644
--- a/docs/manual/meson.build
+++ b/docs/manual/meson.build
@@ -31,6 +31,7 @@ if xmllint.found()
validate,
meson.current_source_dir() / 'can_use_xmllint.xml',
meson.current_build_dir() / 'can_use_xmllint.stamp',
+ check: false,
).returncode() == 0
if not can_parse_and_validate
# The DocBook V5.0 package is called docbook5-xml in Ubuntu,
@@ -100,7 +101,7 @@ endif
if can_add_dist_script
# Distribute built files.
meson.add_dist_script(
- python3.path(), tutorial_custom_cmd, 'dist_doc',
+ python3, tutorial_custom_cmd, 'dist_doc',
doc_dist_dir,
meson.current_build_dir(),
meson.current_source_dir() / sigc_manual_xml,
diff --git a/docs/reference/meson.build b/docs/reference/meson.build
index 59d41e8..eeb1ad1 100644
--- a/docs/reference/meson.build
+++ b/docs/reference/meson.build
@@ -145,7 +145,7 @@ devhelp_file = custom_target('devhelp',
# Install Devhelp file and html files.
meson.add_install_script(
- python3.path(), doc_reference, 'install_doc',
+ python3, doc_reference, 'install_doc',
doctool_dir,
devhelp_file.full_path(),
install_devhelpdir,
@@ -156,7 +156,7 @@ meson.add_install_script(
if can_add_dist_script
# Distribute built files and files copied by mm-common-get.
meson.add_dist_script(
- python3.path(), doc_reference, 'dist_doc',
+ python3, doc_reference, 'dist_doc',
doctool_dir,
doctool_dist_dir,
meson.current_build_dir(),
diff --git a/examples/meson.build b/examples/meson.build
index 3779f72..c55bfdd 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -23,7 +23,6 @@ foreach ex : examples
cpp_args: '-DSIGCXX_DISABLE_DEPRECATED',
dependencies: sigcxx_own_dep,
implicit_include_directories: false,
- gui_app: false,
build_by_default: build_examples
)
endforeach
diff --git a/meson.build b/meson.build
index 2c8b829..ad6ee38 100644
--- a/meson.build
+++ b/meson.build
@@ -7,8 +7,8 @@ project('libsigc++', 'cpp',
'cpp_std=c++11',
'warning_level=0',
],
- 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, ...)
)
sigcxx_api_version = '2.0'
@@ -56,7 +56,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
@@ -127,14 +127,16 @@ tutorial_custom_cmd = project_source_root / 'tools' / 'tutorial-custom-cmd.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(doc_reference)
- 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
warning('Missing files in untracked/. You may have to enable maintainer-mode.')
endif
@@ -144,7 +146,9 @@ endif
doc_perl_prop = run_command(
python3, doc_reference, 'get_script_property',
'', # MMDOCTOOLDIR is not used
- 'requires_perl')
+ 'requires_perl',
+ check: false,
+)
if not (doc_perl_prop.returncode() == 0 and doc_perl_prop.stdout() == 'false')
# Perl is required, if documentation shall be built.
perl = find_program('perl', required: build_documentation)
@@ -246,13 +250,13 @@ subdir('docs/manual')
if can_add_dist_script
# Add a ChangeLog file to the distribution directory.
meson.add_dist_script(
- python3.path(), dist_changelog,
+ python3, dist_changelog,
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,
+ python3, dist_build_scripts,
project_source_root,
'untracked' / 'build_scripts',
)
diff --git a/sigc++/meson.build b/sigc++/meson.build
index 37ec079..7f38251 100644
--- a/sigc++/meson.build
+++ b/sigc++/meson.build
@@ -141,6 +141,7 @@ else # not maintainer_mode
meson.current_build_dir(),
src_untracked_sigcxx,
built_h_files + built_cc_files,
+ check: true,
)
untracked_built_cc_files = []
@@ -167,7 +168,7 @@ endif
# Install built .h files.
meson.add_install_script(
- python3.path(), handle_built_files, 'install_built_h_files',
+ python3, handle_built_files, 'install_built_h_files',
built_h_cc_dir,
install_includedir / sigcxx_pcname / 'sigc++', # subdir below {prefix}
built_h_files,
@@ -176,7 +177,7 @@ meson.add_install_script(
if can_add_dist_script
# Distribute built files.
meson.add_dist_script(
- python3.path(), handle_built_files, 'dist_built_files',
+ python3, handle_built_files, 'dist_built_files',
built_h_cc_dir,
untracked_sigcxx,
built_h_files + built_cc_files,
diff --git a/tests/meson.build b/tests/meson.build
index c0998a1..7e9a2b3 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -59,7 +59,6 @@ foreach ex : test_programs
exe_file = executable(ex_name, ex_sources,
dependencies: sigcxx_own_dep,
implicit_include_directories: false,
- gui_app: false,
build_by_default: true
)
@@ -81,7 +80,6 @@ if can_benchmark
exe_file = executable(ex_name, ex_sources,
dependencies: [sigcxx_own_dep, benchmark_dep],
implicit_include_directories: false,
- gui_app: false,
build_by_default: do_benchmark
)