1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-22 17:35:35 +03:00
systemd/catalog/meson.build
Zbigniew Jędrzejewski-Szmek c31ba5cfe9 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 in 7c22f07cbd. 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 in 9289e093ae 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.
2023-08-24 11:17:50 +02:00

39 lines
1.1 KiB
Meson

# SPDX-License-Identifier: LGPL-2.1-or-later
in_files = [
'systemd.be.catalog',
'systemd.be@latin.catalog',
'systemd.bg.catalog',
'systemd.catalog',
'systemd.da.catalog',
'systemd.de.catalog',
'systemd.fr.catalog',
'systemd.hr.catalog',
'systemd.hu.catalog',
'systemd.it.catalog',
'systemd.ko.catalog',
'systemd.pl.catalog',
'systemd.pt_BR.catalog',
'systemd.ru.catalog',
'systemd.sr.catalog',
'systemd.zh_CN.catalog',
'systemd.zh_TW.catalog',
]
support_url = get_option('support-url')
support_sed = 's~%SUPPORT_URL%~@0@~'.format(support_url)
foreach file : in_files
catalogs += custom_target(
file,
input : file + '.in',
output: file,
command : [sed, support_sed, '@INPUT@'],
capture : true,
install : true,
install_dir : catalogdir)
endforeach
meson.add_install_script(sh, '-c',
'test -n "$DESTDIR" || @0@/journalctl --update-catalog'.format(bindir))