summaryrefslogtreecommitdiffstats
path: root/units/meson.build
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-04-28 03:13:08 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-05-02 22:29:11 +0200
commit2c201c2140f9a75f3698e988880f00f8d0492315 (patch)
tree28f9835b7720692a60dda9b88a598994a03b396c /units/meson.build
parentmeson: add status report (diff)
downloadsystemd-2c201c2140f9a75f3698e988880f00f8d0492315.tar.xz
systemd-2c201c2140f9a75f3698e988880f00f8d0492315.zip
meson: use booleans for conf.set and drop unecessary conditionals
Using conf.set() with a boolean argument does the right thing: either #ifdef or #undef. This means that conf.set can be used unconditionally. Previously I used '1' as the placeholder value, and that needs to be changed to 'true' for consistency (under meson 1 cannot be used in boolean context). All checks need to be adjusted.
Diffstat (limited to 'units/meson.build')
-rw-r--r--units/meson.build14
1 files changed, 7 insertions, 7 deletions
diff --git a/units/meson.build b/units/meson.build
index 9411891c7f..6fb1fa29c9 100644
--- a/units/meson.build
+++ b/units/meson.build
@@ -240,8 +240,8 @@ foreach tuple : in_units
# we do this here because install_data does not accept custom_target output
conds = tuple[1].split(' ')
- install = ((conds.get(0, '') == '' or conf.get(conds[0], 0) == 1) and
- (conds.get(1, '') == '' or conf.get(conds[1], 0) == 1))
+ install = ((conds.get(0, '') == '' or conf.get(conds[0], false)) and
+ (conds.get(1, '') == '' or conf.get(conds[1], false)))
gen1 = configure_file(
input : file + '.in',
@@ -269,8 +269,8 @@ foreach tuple : m4_units
# we do this here because install_data does not accept custom_target output
conds = tuple[1].split(' ')
- install = ((conds.get(0, '') == '' or conf.get(conds[0], 0) == 1) and
- (conds.get(1, '') == '' or conf.get(conds[1], 0) == 1))
+ install = ((conds.get(0, '') == '' or conf.get(conds[0], false)) and
+ (conds.get(1, '') == '' or conf.get(conds[1], false)))
custom_target(
file,
@@ -293,8 +293,8 @@ foreach tuple : units
input = tuple.get(3, file)
conds = tuple[1].split(' ')
- install = ((conds.get(0, '') == '' or conf.get(conds[0], 0) == 1) and
- (conds.get(1, '') == '' or conf.get(conds[1], 0) == 1))
+ install = ((conds.get(0, '') == '' or conf.get(conds[0], false)) and
+ (conds.get(1, '') == '' or conf.get(conds[1], false)))
if install
install_data(input,
@@ -317,7 +317,7 @@ meson.add_install_script(meson_make_symlink,
meson.add_install_script(meson_make_symlink,
join_paths(dbussystemservicedir, 'org.freedesktop.systemd1.service'),
join_paths(dbussessionservicedir, 'org.freedesktop.systemd1.service'))
-if conf.get('HAVE_SYSV_COMPAT', 0) == 1
+if conf.get('HAVE_SYSV_COMPAT', false)
foreach i : [1, 2, 3, 4, 5]
meson.add_install_script(
'sh', '-c',