summaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
authorAnita Zhang <the.anitazha@gmail.com>2019-10-26 00:46:21 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-10-26 11:15:56 +0200
commit7bc9ea513a422b452d515da9435d6cd2e3827cd1 (patch)
tree0c50250b30da5c5ca103562c80285092f36b0286 /meson.build
parentMerge pull request #13846 from keszybz/sleep-config-fixups (diff)
downloadsystemd-7bc9ea513a422b452d515da9435d6cd2e3827cd1.tar.xz
systemd-7bc9ea513a422b452d515da9435d6cd2e3827cd1.zip
meson: expand ternary in functions to if statements
Per https://github.com/mesonbuild/meson/issues/5003, ternary doesn't always work as function args with older versions of meson. Expand out ternary statements to stay compatible with older versions (< 0.49).
Diffstat (limited to '')
-rw-r--r--meson.build7
1 files changed, 4 insertions, 3 deletions
diff --git a/meson.build b/meson.build
index dc1fde60ee..0001504d53 100644
--- a/meson.build
+++ b/meson.build
@@ -796,8 +796,8 @@ conf.set_quoted('SYSTEMD_DEFAULT_LOCALE', default_locale)
conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
service_watchdog = get_option('service-watchdog')
-substs.set('SERVICE_WATCHDOG',
- service_watchdog == '' ? '' : 'WatchdogSec=' + service_watchdog)
+watchdog_value = service_watchdog == '' ? '' : 'WatchdogSec=' + service_watchdog
+substs.set('SERVICE_WATCHDOG', watchdog_value)
substs.set('SUSHELL', get_option('debug-shell'))
substs.set('DEBUGTTY', get_option('debug-tty'))
@@ -3069,6 +3069,7 @@ run_target(
command : [meson_check_api_docs_sh, libsystemd.full_path(), libudev.full_path()])
############################################################
+watchdog_opt = service_watchdog == '' ? 'disabled' : service_watchdog
status = [
'@0@ @1@'.format(meson.project_name(), meson.project_version()),
@@ -3118,7 +3119,7 @@ status = [
'default net.naming-scheme setting: @0@'.format(default_net_naming_scheme),
'default KillUserProcesses setting: @0@'.format(kill_user_processes),
'default locale: @0@'.format(default_locale),
- 'systemd service watchdog: @0@'.format(service_watchdog == '' ? 'disabled' : service_watchdog)]
+ 'systemd service watchdog: @0@'.format(watchdog_opt)]
alt_dns_servers = '\n '.join(dns_servers.split(' '))
alt_ntp_servers = '\n '.join(ntp_servers.split(' '))