mirror of
https://github.com/systemd/systemd.git
synced 2024-11-23 02:03:37 +08:00
meson: use 'sh' variable everywhere
We went back-and-forth a bit on this. Very old meson would print a message about detecting the program if a quoted argument was used, leading to a lot of noise. So we started to convert various places to use the variable, but then it turned out that meson < 0.56.2 doesn't handle this correctly and we reverted to using strings everywhere in7c22f07cbd
. Then at some point we stopped supporting old meson and over time we started using the variable in various places again, somewhat inconsistently. Then most calls to 'sh' were removed in9289e093ae
when install_emptydir() builtin started being used. Now meson allows either the string or variable to be used, and doesn't print a message if the string is used. Let's use the variable everywhere. For 'sh', we could do either, but for other variables, we _do_ want the detection to happen, for example for git, find, awk, which might not be installed and we want to detect that early, before we start the build. It would be ugly to use quotes for some programs, but not for others. Also, a string is still refused for test(), so we couldn't use the string version even if we didn't care about detection.
This commit is contained in:
parent
799cd3100b
commit
c31ba5cfe9
@ -34,5 +34,5 @@ foreach file : in_files
|
||||
install_dir : catalogdir)
|
||||
endforeach
|
||||
|
||||
meson.add_install_script('sh', '-c',
|
||||
meson.add_install_script(sh, '-c',
|
||||
'test -n "$DESTDIR" || @0@/journalctl --update-catalog'.format(bindir))
|
||||
|
@ -53,7 +53,7 @@ if conf.get('ENABLE_HWDB') == 1
|
||||
if install_sysconfdir
|
||||
install_emptydir(sysconfdir / 'udev/hwdb.d')
|
||||
|
||||
meson.add_install_script('sh', '-c',
|
||||
meson.add_install_script(sh, '-c',
|
||||
'test -n "$DESTDIR" || @0@/systemd-hwdb update'.format(bindir))
|
||||
endif
|
||||
|
||||
|
@ -2707,7 +2707,7 @@ foreach dict : modules
|
||||
if is_nss
|
||||
# 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', 'rm $DESTDIR@0@/lib@1@.so'.format(libdir, name),
|
||||
meson.add_install_script(sh, '-c', 'rm $DESTDIR@0@/lib@1@.so'.format(libdir, name),
|
||||
install_tag : 'nss')
|
||||
endif
|
||||
|
||||
|
@ -188,12 +188,12 @@ if get_option('create-log-dirs')
|
||||
install_mode : [ 'rwxr-xr-x', 'root', 'root' ])
|
||||
if get_option('adm-group')
|
||||
meson.add_install_script(
|
||||
'sh', '-c',
|
||||
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',
|
||||
sh, '-c',
|
||||
'setfacl -nm g:wheel:rx,d:g:wheel:rx $DESTDIR/var/log/journal || :')
|
||||
endif
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user