Skip to content

Commit 88d8790

Browse files
committed
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: ...).
1 parent 6f9483e commit 88d8790

File tree

7 files changed

+20
-17
lines changed

7 files changed

+20
-17
lines changed

MSVC_NMake/meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ handle_built_files = project_source_root / 'tools' / 'handle-built-files.py'
2323
if can_add_dist_script
2424
# Distribute built files.
2525
meson.add_dist_script(
26-
python3.path(), handle_built_files, 'dist_gen_msvc_files',
26+
python3, handle_built_files, 'dist_gen_msvc_files',
2727
meson.current_build_dir(),
2828
untracked_msvc_nmake,
2929
project_build_root / 'sigc++config.h',

docs/manual/meson.build

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ if xmllint.found()
3131
validate,
3232
meson.current_source_dir() / 'can_use_xmllint.xml',
3333
meson.current_build_dir() / 'can_use_xmllint.stamp',
34+
check: false,
3435
).returncode() == 0
3536
if not can_parse_and_validate
3637
# The DocBook V5.0 package is called docbook5-xml in Ubuntu,
@@ -100,7 +101,7 @@ endif
100101
if can_add_dist_script
101102
# Distribute built files.
102103
meson.add_dist_script(
103-
python3.path(), tutorial_custom_cmd, 'dist_doc',
104+
python3, tutorial_custom_cmd, 'dist_doc',
104105
doc_dist_dir,
105106
meson.current_build_dir(),
106107
meson.current_source_dir() / sigc_manual_xml,

docs/reference/meson.build

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ devhelp_file = custom_target('devhelp',
145145

146146
# Install Devhelp file and html files.
147147
meson.add_install_script(
148-
python3.path(), doc_reference, 'install_doc',
148+
python3, doc_reference, 'install_doc',
149149
doctool_dir,
150150
devhelp_file.full_path(),
151151
install_devhelpdir,
@@ -156,7 +156,7 @@ meson.add_install_script(
156156
if can_add_dist_script
157157
# Distribute built files and files copied by mm-common-get.
158158
meson.add_dist_script(
159-
python3.path(), doc_reference, 'dist_doc',
159+
python3, doc_reference, 'dist_doc',
160160
doctool_dir,
161161
doctool_dist_dir,
162162
meson.current_build_dir(),

examples/meson.build

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ foreach ex : examples
2323
cpp_args: '-DSIGCXX_DISABLE_DEPRECATED',
2424
dependencies: sigcxx_own_dep,
2525
implicit_include_directories: false,
26-
gui_app: false,
2726
build_by_default: build_examples
2827
)
2928
endforeach

meson.build

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ project('libsigc++', 'cpp',
77
'cpp_std=c++11',
88
'warning_level=0',
99
],
10-
meson_version: '>= 0.54.0', # required for meson.override_dependency()
11-
# and dep.get_variable(internal:)
10+
meson_version: '>= 0.55.0', # required for meson.add_dist_script(python3, ...)
11+
# and meson.add_install_script(python3, ...)
1212
)
1313

1414
sigcxx_api_version = '2.0'
@@ -56,7 +56,7 @@ import os
5656
import sys
5757
sys.exit(os.path.isdir("@0@") or os.path.isfile("@0@"))
5858
'''.format(project_source_root / '.git')
59-
is_git_build = run_command(python3, '-c', cmd_py).returncode() != 0
59+
is_git_build = run_command(python3, '-c', cmd_py, check: false).returncode() != 0
6060

6161
# Are we testing a dist tarball while it's being built?
6262
# 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'
127127
if maintainer_mode
128128
# Copy files to untracked/build_scripts and untracked/docs.
129129
run_command(mm_common_get, '--force', script_dir,
130-
project_source_root / 'untracked' / 'docs')
130+
project_source_root / 'untracked' / 'docs',
131+
check: true,
132+
)
131133
else
132134
cmd_py = '''
133135
import os
134136
import sys
135137
sys.exit(os.path.isfile("@0@"))
136138
'''.format(doc_reference)
137-
file_exists = run_command(python3, '-c', cmd_py).returncode() != 0
139+
file_exists = run_command(python3, '-c', cmd_py, check: false).returncode() != 0
138140
if not file_exists
139141
warning('Missing files in untracked/. You may have to enable maintainer-mode.')
140142
endif
@@ -144,7 +146,9 @@ endif
144146
doc_perl_prop = run_command(
145147
python3, doc_reference, 'get_script_property',
146148
'', # MMDOCTOOLDIR is not used
147-
'requires_perl')
149+
'requires_perl',
150+
check: false,
151+
)
148152
if not (doc_perl_prop.returncode() == 0 and doc_perl_prop.stdout() == 'false')
149153
# Perl is required, if documentation shall be built.
150154
perl = find_program('perl', required: build_documentation)
@@ -246,13 +250,13 @@ subdir('docs/manual')
246250
if can_add_dist_script
247251
# Add a ChangeLog file to the distribution directory.
248252
meson.add_dist_script(
249-
python3.path(), dist_changelog,
253+
python3, dist_changelog,
250254
project_source_root,
251255
)
252256
# Add build scripts to the distribution directory, and delete .gitignore
253257
# files and an empty $MESON_PROJECT_DIST_ROOT/build/ directory.
254258
meson.add_dist_script(
255-
python3.path(), dist_build_scripts,
259+
python3, dist_build_scripts,
256260
project_source_root,
257261
'untracked' / 'build_scripts',
258262
)

sigc++/meson.build

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ else # not maintainer_mode
141141
meson.current_build_dir(),
142142
src_untracked_sigcxx,
143143
built_h_files + built_cc_files,
144+
check: true,
144145
)
145146

146147
untracked_built_cc_files = []
@@ -167,7 +168,7 @@ endif
167168

168169
# Install built .h files.
169170
meson.add_install_script(
170-
python3.path(), handle_built_files, 'install_built_h_files',
171+
python3, handle_built_files, 'install_built_h_files',
171172
built_h_cc_dir,
172173
install_includedir / sigcxx_pcname / 'sigc++', # subdir below {prefix}
173174
built_h_files,
@@ -176,7 +177,7 @@ meson.add_install_script(
176177
if can_add_dist_script
177178
# Distribute built files.
178179
meson.add_dist_script(
179-
python3.path(), handle_built_files, 'dist_built_files',
180+
python3, handle_built_files, 'dist_built_files',
180181
built_h_cc_dir,
181182
untracked_sigcxx,
182183
built_h_files + built_cc_files,

tests/meson.build

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ foreach ex : test_programs
5959
exe_file = executable(ex_name, ex_sources,
6060
dependencies: sigcxx_own_dep,
6161
implicit_include_directories: false,
62-
gui_app: false,
6362
build_by_default: true
6463
)
6564

@@ -81,7 +80,6 @@ if can_benchmark
8180
exe_file = executable(ex_name, ex_sources,
8281
dependencies: [sigcxx_own_dep, benchmark_dep],
8382
implicit_include_directories: false,
84-
gui_app: false,
8583
build_by_default: do_benchmark
8684
)
8785

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy