]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: call find_program() once and reuse the variable everywhere
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 14 May 2021 12:16:17 +0000 (14:16 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 14 May 2021 12:21:27 +0000 (14:21 +0200)
Meson 0.58 has gotten quite bad with emitting a message every time
a quoted command is used:
Program /home/zbyszek/src/systemd-work/tools/meson-make-symlink.sh found: YES (/home/zbyszek/src/systemd-work/tools/meson-make-symlink.sh)
Program sh found: YES (/usr/bin/sh)
Program sh found: YES (/usr/bin/sh)
Program sh found: YES (/usr/bin/sh)
Program sh found: YES (/usr/bin/sh)
Program sh found: YES (/usr/bin/sh)
Program sh found: YES (/usr/bin/sh)
Program xsltproc found: YES (/usr/bin/xsltproc)
Configuring custom-entities.ent using configuration
Message: Skipping bootctl.1 because ENABLE_EFI is false
Program ln found: YES (/usr/bin/ln)
Program ln found: YES (/usr/bin/ln)
Program ln found: YES (/usr/bin/ln)
Program ln found: YES (/usr/bin/ln)
Program ln found: YES (/usr/bin/ln)
Program ln found: YES (/usr/bin/ln)
Message: Skipping journal-remote.conf.5 because HAVE_MICROHTTPD is false
Message: Skipping journal-upload.conf.5 because HAVE_MICROHTTPD is false
Program ln found: YES (/usr/bin/ln)
Program ln found: YES (/usr/bin/ln)
Message: Skipping loader.conf.5 because ENABLE_EFI is false
Program ln found: YES (/usr/bin/ln)
Program ln found: YES (/usr/bin/ln)
Program ln found: YES (/usr/bin/ln)
Program ln found: YES (/usr/bin/ln)
Program ln found: YES (/usr/bin/ln)
Program ln found: YES (/usr/bin/ln)
Program ln found: YES (/usr/bin/ln)
Program ln found: YES (/usr/bin/ln)
Program ln found: YES (/usr/bin/ln)
Program ln found: YES (/usr/bin/ln)
Program ln found: YES (/usr/bin/ln)
Program ln found: YES (/usr/bin/ln)
Program ln found: YES (/usr/bin/ln)
Program ln found: YES (/usr/bin/ln)
Program ln found: YES (/usr/bin/ln)
Program ln found: YES (/usr/bin/ln)
Program ln found: YES (/usr/bin/ln)
Program ln found: YES (/usr/bin/ln)
Program ln found: YES (/usr/bin/ln)
Program ln found: YES (/usr/bin/ln)
Program ln found: YES (/usr/bin/ln)
Program ln found: YES (/usr/bin/ln)
...

Let's suffer one message only for each command. Hopefully we can silence
even this when https://github.com/mesonbuild/meson/issues/8642 is
resolved.

18 files changed:
catalog/meson.build
hwdb.d/meson.build
man/meson.build
meson.build
network/meson.build
src/boot/efi/meson.build
src/core/meson.build
src/journal-remote/meson.build
src/journal/meson.build
src/kernel-install/meson.build
src/locale/meson.build
src/test/meson.build
src/udev/meson.build
sysctl.d/meson.build
test/fuzz/meson.build
test/meson.build
tmpfiles.d/meson.build
units/meson.build

index d61fc2cbf6ee95a8233b824246dce6203b364cc1..d34e413d4f14e6d2ad6ff4dd8413892104415f71 100644 (file)
@@ -29,6 +29,5 @@ foreach file : in_files
                 install_dir : catalogdir)
 endforeach
 
-meson.add_install_script('sh', '-c',
-                         'test -n "$DESTDIR" || @0@/journalctl --update-catalog'
-                         .format(rootbindir))
+meson.add_install_script(sh, '-c',
+                         'test -n "$DESTDIR" || @0@/journalctl --update-catalog'.format(rootbindir))
index 6a16268816bd75fb3adeac27ec6818fb9575ffd9..f43bcbbea700c7b497c1c790a48ca0777497a8c3 100644 (file)
@@ -47,12 +47,10 @@ if conf.get('ENABLE_HWDB') == 1
                      install_dir : udevhwdbdir)
 
         if install_sysconfdir
-                meson.add_install_script('sh', '-c',
-                                         mkdir_p.format(join_paths(sysconfdir, 'udev/hwdb.d')))
+                meson.add_install_script(sh, '-c', mkdir_p.format(join_paths(sysconfdir, 'udev/hwdb.d')))
 
-                meson.add_install_script('sh', '-c',
-                                         'test -n "$DESTDIR" || @0@/systemd-hwdb update'
-                                         .format(rootbindir))
+                meson.add_install_script(sh, '-c',
+                                         'test -n "$DESTDIR" || @0@/systemd-hwdb update'.format(rootbindir))
         endif
 
         if want_tests != 'false'
index f9c4b83dc8150a839591edd9b859a92605d6920c..2e3b858f4f3461c5fd6fb3ab32662818ecb4ca92 100644 (file)
@@ -70,7 +70,7 @@ foreach tuple : xsltproc.found() ? manpages : []
                         link = custom_target(
                                 htmlalias,
                                 output : htmlalias,
-                                command : ['ln', '-fs', html, '@OUTPUT@'])
+                                command : [ln, '-fs', html, '@OUTPUT@'])
                         if want_html
                                 dst = join_paths(docdir, 'html', htmlalias)
                                 cmd = 'ln -fs @0@ $DESTDIR@1@'.format(html, dst)
@@ -148,7 +148,7 @@ foreach tuple : xsltproc.found() ? [['systemd.directives', '7', systemd_directiv
                         htmlalias,
                         input : p2,
                         output : htmlalias,
-                        command : ['ln', '-fs', html, '@OUTPUT@'])
+                        command : [ln, '-fs', html, '@OUTPUT@'])
                 if want_html
                         dst = join_paths(docdir, 'html', htmlalias)
                         cmd = 'ln -fs @0@ $DESTDIR@1@'.format(html, dst)
@@ -176,15 +176,14 @@ man = custom_target(
         'man',
         output : 'man',
         depends : man_pages,
-        command : ['echo'])
+        command : [echo])
 
 html = custom_target(
         'html',
         output : 'html',
         depends : html_pages,
-        command : ['echo'])
+        command : [echo])
 
-rsync = find_program('rsync', required : false)
 if rsync.found()
         run_target(
                 'doc-sync',
index ee94d5c354d347c32772d089309111b61e817277..5c7f3648f50ac7f3bf6b6fc65bed3afd7ffb6d3f 100644 (file)
@@ -600,17 +600,22 @@ endif
 
 versiondep = declare_dependency(sources: version_h)
 
+sh = find_program('sh')
+echo = find_program('echo')
+test = find_program('test')
 sed = find_program('sed')
 awk = find_program('awk')
 m4 = find_program('m4')
 stat = find_program('stat')
+ln = find_program('ln')
 git = find_program('git', required : false)
 env = find_program('env')
 perl = find_program('perl', required : false)
+rsync = find_program('rsync', required : false)
+meson_make_symlink = find_program('tools/meson-make-symlink.sh')
+test_efi_create_disk_sh = find_program('test/test-efi-create-disk.sh')
 
-meson_make_symlink = project_source_root + '/tools/meson-make-symlink.sh'
 mkdir_p = 'mkdir -p $DESTDIR/@0@'
-test_efi_create_disk_sh = find_program('test/test-efi-create-disk.sh')
 splash_bmp = files('test/splash.bmp')
 
 # if -Dxxx-path option is found, use that. Otherwise, check in $PATH,
@@ -644,7 +649,7 @@ endforeach
 
 conf.set_quoted('TELINIT', get_option('telinit-path'))
 
-if run_command('ln', '--relative', '--help').returncode() != 0
+if run_command(ln, '--relative', '--help').returncode() != 0
         error('ln does not support --relative (added in coreutils 8.16)')
 endif
 
@@ -658,7 +663,7 @@ const char * in_word_set(const char *, @0@);
 @1@
 '''
 gperf_snippet_format = 'echo foo,bar | @0@ -L ANSI-C'
-gperf_snippet = run_command('sh', '-c', gperf_snippet_format.format(gperf.path()))
+gperf_snippet = run_command(sh, '-c', gperf_snippet_format.format(gperf.path()))
 gperf_test = gperf_test_format.format('size_t', gperf_snippet.stdout())
 if cc.compiles(gperf_test)
         gperf_len_type = 'size_t'
@@ -718,11 +723,11 @@ conf.set_quoted('DEFAULT_NET_NAMING_SCHEME', default_net_naming_scheme)
 
 time_epoch = get_option('time-epoch')
 if time_epoch == -1
-        time_epoch = run_command('sh', ['-c', 'echo "$SOURCE_DATE_EPOCH"']).stdout().strip()
+        time_epoch = run_command(sh, '-c', 'echo "$SOURCE_DATE_EPOCH"').stdout().strip()
         if time_epoch == '' and git.found() and run_command('test', '-e', '.git').returncode() == 0
                 # If we're in a git repository, use the creation time of the latest git tag.
-                latest_tag = run_command('git', 'describe', '--abbrev=0', '--tags').stdout().strip()
-                time_epoch = run_command('git', 'log', '--no-show-signature', '-1', '--format=%at', latest_tag).stdout()
+                latest_tag = run_command(git, 'describe', '--abbrev=0', '--tags').stdout().strip()
+                time_epoch = run_command(git, 'log', '--no-show-signature', '-1', '--format=%at', latest_tag).stdout()
         endif
         if time_epoch == ''
                 NEWS = files('NEWS')
@@ -1865,7 +1870,7 @@ foreach tuple : [['myhostname', 'ENABLE_NSS_MYHOSTNAME'],
 
                 # We cannot use shared_module because it does not support version suffix.
                 # Unfortunately shared_library insists on creating the symlink…
-                meson.add_install_script('sh', '-c',
+                meson.add_install_script(sh, '-c',
                                          'rm $DESTDIR@0@/libnss_@1@.so'
                                          .format(rootlibdir, module))
 
@@ -2801,11 +2806,9 @@ if conf.get('ENABLE_BINFMT') == 1
                 install : true,
                 install_dir : rootlibexecdir)
 
-        meson.add_install_script('sh', '-c',
-                                 mkdir_p.format(binfmtdir))
+        meson.add_install_script(sh, '-c', mkdir_p.format(binfmtdir))
         if install_sysconfdir
-                meson.add_install_script('sh', '-c',
-                                         mkdir_p.format(join_paths(sysconfdir, 'binfmt.d')))
+                meson.add_install_script(sh, '-c', mkdir_p.format(join_paths(sysconfdir, 'binfmt.d')))
         endif
 endif
 
@@ -3269,11 +3272,9 @@ if conf.get('HAVE_KMOD') == 1
                 install : true,
                 install_dir : rootlibexecdir)
 
-        meson.add_install_script('sh', '-c',
-                                 mkdir_p.format(modulesloaddir))
+        meson.add_install_script(sh, '-c', mkdir_p.format(modulesloaddir))
         if install_sysconfdir
-                meson.add_install_script('sh', '-c',
-                                         mkdir_p.format(join_paths(sysconfdir, 'modules-load.d')))
+                meson.add_install_script(sh, '-c', mkdir_p.format(join_paths(sysconfdir, 'modules-load.d')))
         endif
 endif
 
@@ -3351,10 +3352,10 @@ executable(
 custom_target(
         'systemd-runtest.env',
         output : 'systemd-runtest.env',
-        command : ['sh', '-c', '{ ' +
-                               'echo SYSTEMD_TEST_DATA=@0@; '.format(join_paths(project_source_root, 'test')) +
-                               'echo SYSTEMD_CATALOG_DIR=@0@; '.format(join_paths(project_build_root, 'catalog')) +
-                               '} >@OUTPUT@'],
+        command : [sh, '-c',
+                   '{ echo SYSTEMD_TEST_DATA=@0@; echo SYSTEMD_CATALOG_DIR=@1@; } >@OUTPUT@'.format(
+                           join_paths(project_source_root, 'test'),
+                           join_paths(project_build_root, 'catalog'))],
         build_by_default : true)
 
 test_cflags = ['-DTEST_CODE=1']
@@ -3546,8 +3547,8 @@ install_data('LICENSE.GPL2',
              'docs/GVARIANT-SERIALIZATION.md',
              install_dir : docdir)
 
-meson.add_install_script('sh', '-c', mkdir_p.format(systemdstatedir))
-meson.add_install_script('sh', '-c', 'touch $DESTDIR@0@'.format(prefixdir))
+meson.add_install_script(sh, '-c', mkdir_p.format(systemdstatedir))
+meson.add_install_script(sh, '-c', 'touch $DESTDIR@0@'.format(prefixdir))
 
 ############################################################
 
@@ -3595,7 +3596,7 @@ foreach tuple : sanitizers
                                                 name,
                                                 output : name,
                                                 depends : build,
-                                                command : [env, 'ln', '-fs',
+                                                command : [ln, '-fs',
                                                            join_paths(build.full_path(), b),
                                                            '@OUTPUT@'],
                                                 build_by_default : true)
@@ -3622,9 +3623,8 @@ endforeach
 
 if git.found()
         all_files = run_command(
-                'env', '-u', 'GIT_WORK_TREE',
-                git,
-                '--git-dir=@0@/.git'.format(project_source_root),
+                env, '-u', 'GIT_WORK_TREE',
+                git, '--git-dir=@0@/.git'.format(project_source_root),
                 'ls-files', ':/*.[ch]')
 
         all_files = files(all_files.stdout().split())
@@ -3648,16 +3648,16 @@ endif
 if git.found()
         git_head = run_command(
                 git,
-                ['--git-dir=@0@/.git'.format(project_source_root),
-                 'rev-parse', 'HEAD']).stdout().strip()
+                '--git-dir=@0@/.git'.format(project_source_root),
+                'rev-parse', 'HEAD').stdout().strip()
         git_head_short = run_command(
                 git,
-                ['--git-dir=@0@/.git'.format(project_source_root),
-                 'rev-parse', '--short=7', 'HEAD']).stdout().strip()
+                '--git-dir=@0@/.git'.format(project_source_root),
+                'rev-parse', '--short=7', 'HEAD').stdout().strip()
 
         run_target(
                 'git-snapshot',
-                command : ['git', 'archive',
+                command : [git, 'archive',
                            '-o', '@0@/systemd-@1@.tar.gz'.format(project_source_root,
                                                                  git_head_short),
                            '--prefix', 'systemd-@0@/'.format(git_head),
@@ -3694,7 +3694,7 @@ endif
 custom_target(
         'update-man-rules',
         output : 'update-man-rules',
-        command : ['sh', '-c',
+        command : [sh, '-c',
                    'cd @0@ && '.format(meson.build_root()) +
                    'python3 @0@/tools/update-man-rules.py $(find @0@ -wholename "*/man/*.xml") >t && '.format(project_source_root) +
                    'mv t @0@/man/rules/meson.build'.format(meson.current_source_dir())],
index b0e60f72176b38716565ae5e784a4da0517aba2c..7287dcf07733886849bb69922ef34c0734883ad6 100644 (file)
@@ -11,7 +11,7 @@ if conf.get('ENABLE_NETWORKD') == 1
                      install_dir : networkdir)
 
         if install_sysconfdir
-                meson.add_install_script('sh', '-c',
+                meson.add_install_script(sh, '-c',
                                          mkdir_p.format(join_paths(sysconfdir, 'systemd/network')))
         endif
 endif
index 26e6dc79fc223600ea67edf4fda0359cf61998f5..192d40d3abdbe8a65564a4ec489d08c99a4c3cf4 100644 (file)
@@ -72,14 +72,14 @@ if conf.get('ENABLE_EFI') == 1 and get_option('gnu-efi') != 'false'
         if efi_libdir == ''
                 # New location first introduced with gnu-efi 3.0.11
                 efi_libdir = join_paths('/usr/lib/gnuefi', EFI_MACHINE_TYPE_NAME)
-                cmd = run_command('test', '-e', efi_libdir)
+                cmd = run_command(test, '-e', efi_libdir)
 
                 if cmd.returncode() != 0
                         # Fall back to the old approach
                         cmd = run_command(efi_cc + ['-print-multi-os-directory'])
                         if cmd.returncode() == 0
                                 path = join_paths('/usr/lib', cmd.stdout().strip())
-                                cmd = run_command('realpath', '-e', path)
+                                cmd = run_command(env, 'realpath', '-e', path)
                                 if cmd.returncode() == 0
                                         efi_libdir = cmd.stdout().strip()
                                 endif
@@ -116,7 +116,8 @@ if have_gnu_efi
                 foreach sbatvar : sbatvars
                         value = get_option(sbatvar[0])
                         if value == '' or value == 'auto'
-                                value = run_command('sh', '-c', 'if [ -e /etc/os-release ]; then . /etc/os-release; else . /usr/lib/os-release; fi; echo $' + sbatvar[1]).stdout().strip()
+                                cmd = 'if [ -e /etc/os-release ]; then . /etc/os-release; else . /usr/lib/os-release; fi; echo $@0@'.format(sbatvar[1])
+                                value = run_command(sh, '-c', cmd).stdout().strip()
                         endif
                         if value == ''
                                 error('Required @0@ option not set and autodetection failed'.format(sbatvar[0]))
@@ -156,7 +157,7 @@ if have_gnu_efi
         efi_lds = ''
         foreach location : efi_location_map
                 if efi_lds == ''
-                        cmd = run_command('test', '-f', location[0])
+                        cmd = run_command(test, '-f', location[0])
                         if cmd.returncode() == 0
                                 efi_lds = location[0]
                                 efi_crt0 = location[1]
index c5c9e8cbe81ac9b661d82c4255fb222426a74701..3720c083aaf1dd55453ad9a2e57ad6a07ec2fdde 100644 (file)
@@ -203,15 +203,15 @@ policy = configure_file(
 install_data(policy,
              install_dir : polkitpolicydir)
 
-meson.add_install_script('sh', '-c', mkdir_p.format(systemshutdowndir))
-meson.add_install_script('sh', '-c', mkdir_p.format(systemsleepdir))
-meson.add_install_script('sh', '-c', mkdir_p.format(systemgeneratordir))
-meson.add_install_script('sh', '-c', mkdir_p.format(usergeneratordir))
+meson.add_install_script(sh, '-c', mkdir_p.format(systemshutdowndir))
+meson.add_install_script(sh, '-c', mkdir_p.format(systemsleepdir))
+meson.add_install_script(sh, '-c', mkdir_p.format(systemgeneratordir))
+meson.add_install_script(sh, '-c', mkdir_p.format(usergeneratordir))
 
 if install_sysconfdir
-        meson.add_install_script('sh', '-c', mkdir_p.format(join_paths(pkgsysconfdir, 'system')))
-        meson.add_install_script('sh', '-c', mkdir_p.format(join_paths(pkgsysconfdir, 'user')))
-        meson.add_install_script('sh', '-c', mkdir_p.format(join_paths(sysconfdir, 'xdg/systemd')))
+        meson.add_install_script(sh, '-c', mkdir_p.format(join_paths(pkgsysconfdir, 'system')))
+        meson.add_install_script(sh, '-c', mkdir_p.format(join_paths(pkgsysconfdir, 'user')))
+        meson.add_install_script(sh, '-c', mkdir_p.format(join_paths(sysconfdir, 'xdg/systemd')))
 endif
 
 ############################################################
index c42d85bc4b23ceedb286b123ae3e1b4c5615b268..eea4174dd8b2f96d9e04eb87d46b923f363dc710 100644 (file)
@@ -67,9 +67,9 @@ if conf.get('ENABLE_REMOTE') == 1 and conf.get('HAVE_MICROHTTPD') == 1
                      install_dir : join_paths(pkgdatadir, 'gatewayd'))
 
         if get_option('create-log-dirs')
-                meson.add_install_script('sh', '-c',
+                meson.add_install_script(sh, '-c',
                                          mkdir_p.format('/var/log/journal/remote'))
-                meson.add_install_script('sh', '-c',
+                meson.add_install_script(sh, '-c',
                                          '''chown 0:0 $DESTDIR/var/log/journal/remote &&
                                             chmod 755 $DESTDIR/var/log/journal/remote || :''')
         endif
index 171e2767368375a29199c98686ec1b634ee9671a..474bdff727e8dc54871f51d1c8fdc19ea5ccecac 100644 (file)
@@ -56,22 +56,17 @@ if install_sysconfdir_samples
 endif
 
 if get_option('create-log-dirs')
-        meson.add_install_script(
-                'sh', '-c',
-                mkdir_p.format('/var/log/journal'))
-        meson.add_install_script(
-                'sh', '-c',
-                '''chown 0:0 $DESTDIR/var/log/journal &&
-                   chmod 755 $DESTDIR/var/log/journal || :''')
+        meson.add_install_script(sh, '-c', mkdir_p.format('/var/log/journal'))
+        meson.add_install_script(sh, '-c',
+                                 '''chown 0:0 $DESTDIR/var/log/journal &&
+                                    chmod 755 $DESTDIR/var/log/journal || :''')
         if get_option('adm-group')
-                meson.add_install_script(
-                        'sh', '-c',
-                        'setfacl -nm g:adm:rx,d:g:adm:rx $DESTDIR/var/log/journal || :')
+                meson.add_install_script(sh, '-c',
+                                         'setfacl -nm g:adm:rx,d:g:adm:rx $DESTDIR/var/log/journal || :')
         endif
         if get_option('wheel-group')
-                meson.add_install_script(
-                        'sh', '-c',
-                        'setfacl -nm g:wheel:rx,d:g:wheel:rx $DESTDIR/var/log/journal || :')
+                meson.add_install_script(sh, '-c',
+                                         'setfacl -nm g:wheel:rx,d:g:wheel:rx $DESTDIR/var/log/journal || :')
         endif
 endif
 
index 4117188f147463913050a1a465e815b9316d076a..36b289df55c4897fe959bf71eaf93981eebc509f 100644 (file)
@@ -14,7 +14,7 @@ if want_kernel_install
                      install_dir : kernelinstalldir)
 
         if install_sysconfdir
-                meson.add_install_script('sh', '-c',
+                meson.add_install_script(sh, '-c',
                                          mkdir_p.format(join_paths(sysconfdir, 'kernel/install.d')))
         endif
 
index 4cbf2d278cf032b18a4e41d52b42fa034bc4eb07..757d4457e93ec2152e93bc57d84e6bfc3e7df06f 100644 (file)
@@ -20,7 +20,7 @@ endif
 # If you know a way that allows the same variables to be used
 # in sources list and concatenated to a string for test_env,
 # let me know.
-kbd_model_map = join_paths(meson.current_source_dir(),  'kbd-model-map')
+kbd_model_map = join_paths(meson.current_source_dir(), 'kbd-model-map')
 language_fallback_map = join_paths(meson.current_source_dir(), 'language-fallback-map')
 
 if conf.get('ENABLE_LOCALED') == 1
index 2b8bdcc0645f89cb6458fef58ce0e77c1076232f..9b11324c7b58e066ca625ac9164866955f191387 100644 (file)
@@ -11,7 +11,7 @@ test_hashmap_ordered_c = custom_target(
 
 test_include_dir = include_directories('.')
 
-path = run_command('sh', ['-c', 'echo "$PATH"']).stdout().strip()
+path = run_command(sh, '-c', 'echo "$PATH"').stdout().strip()
 test_env = environment()
 test_env.set('SYSTEMD_KBD_MODEL_MAP', kbd_model_map)
 test_env.set('SYSTEMD_LANGUAGE_FALLBACK_MAP', language_fallback_map)
index fd74e28682ffa5f63cfa623d0e985b88e5f9a505..16774ef6ca677398ea214b9cc66754f9b72931a5 100644 (file)
@@ -165,8 +165,7 @@ configure_file(
         install_dir : pkgconfigdatadir == 'no' ? '' : pkgconfigdatadir)
 
 if install_sysconfdir
-        meson.add_install_script('sh', '-c',
-                                 mkdir_p.format(join_paths(sysconfdir, 'udev/rules.d')))
+        meson.add_install_script(sh, '-c', mkdir_p.format(join_paths(sysconfdir, 'udev/rules.d')))
 endif
 
 fuzzers += [
index 7e3482af62a99589b21f8b2060e1d8980a01a1f4..ec0eecf65c48317898b60439135e0f0a8d50f7f6 100644 (file)
@@ -28,6 +28,5 @@ foreach file : in_files
 endforeach
 
 if install_sysconfdir
-        meson.add_install_script('sh', '-c',
-                                 mkdir_p.format(join_paths(sysconfdir, 'sysctl.d')))
+        meson.add_install_script(sh, '-c', mkdir_p.format(join_paths(sysconfdir, 'sysctl.d')))
 endif
index fc8033dbbee9e270386d0270aae40dd561c02a17..8ae8e23fa577681b8a6bb63867f2d80b25fe9a3a 100644 (file)
@@ -22,14 +22,11 @@ sanitize_address_undefined = custom_target(
 sanitizers = [['address,undefined', sanitize_address_undefined]]
 
 if git.found()
-        out = run_command(
-                'env', '-u', 'GIT_WORK_TREE',
-                git,
-                '--git-dir=@0@/.git'.format(project_source_root),
-                'ls-files', ':/test/fuzz/*/*')
+        out = run_command(env, '-u', 'GIT_WORK_TREE',
+                          git, '--git-dir=@0@/.git'.format(project_source_root),
+                          'ls-files', ':/test/fuzz/*/*')
 else
-        out = run_command(
-                'sh', '-c', 'ls @0@/test/fuzz/*/*'.format(project_source_root))
+        out = run_command(sh, '-c', 'ls @0@/test/fuzz/*/*'.format(project_source_root))
 endif
 
 fuzz_regression_tests = []
index ee6733fca4b5a32617adf5eda58debe3406ad3d1..b1d5bf9a85253367adc90d9b1379905b321612ed 100644 (file)
@@ -131,13 +131,12 @@ if want_tests != 'false' and dmi_arches.contains(host_machine.cpu_family())
 
         if git.found()
                 out = run_command(
-                        'env', '-u', 'GIT_WORK_TREE',
-                        git,
-                        '--git-dir=@0@/.git'.format(project_source_root),
+                        env, '-u', 'GIT_WORK_TREE',
+                        git, '--git-dir=@0@/.git'.format(project_source_root),
                         'ls-files', ':/test/dmidecode-dumps/*.bin')
         else
                 out = run_command(
-                        'sh', '-c', 'ls @0@/test/dmidecode-dumps/*.bin'.format(project_source_root))
+                        sh, '-c', 'ls @0@/test/dmidecode-dumps/*.bin'.format(project_source_root))
         endif
 
         foreach p : out.stdout().split()
index d5d4bbc9ea4e59471c58861a2f397603d7e3f44e..3b2c5ab376a3ebe7cff84bcab752c5944658e2b5 100644 (file)
@@ -57,7 +57,5 @@ foreach file : m4_files
 endforeach
 
 if enable_tmpfiles and install_sysconfdir
-        meson.add_install_script(
-                'sh', '-c',
-                mkdir_p.format(join_paths(sysconfdir, 'tmpfiles.d')))
+        meson.add_install_script(sh, '-c', mkdir_p.format(join_paths(sysconfdir, 'tmpfiles.d')))
 endif
index fe8e95ff91dc824f7fa8d3da18f9da43089e4c52..a0fbe3e15a7bd2d18f9aab2412fdf4ffc2e055c7 100644 (file)
@@ -348,9 +348,8 @@ meson.add_install_script(meson_make_symlink,
 if conf.get('HAVE_SYSV_COMPAT') == 1
         foreach i : [1, 2, 3, 4, 5]
                 meson.add_install_script(
-                        'sh', '-c',
-                        mkdir_p
-                        .format(join_paths(systemunitdir, 'runlevel@0@.target.wants'.format(i))))
+                        sh, '-c',
+                        mkdir_p.format(join_paths(systemunitdir, 'runlevel@0@.target.wants'.format(i))))
         endforeach
 endif