From 2c201c2140f9a75f3698e988880f00f8d0492315 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 27 Apr 2017 21:13:08 -0400 Subject: 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. --- tmpfiles.d/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tmpfiles.d') diff --git a/tmpfiles.d/meson.build b/tmpfiles.d/meson.build index dfbe04a976..d68d17e956 100644 --- a/tmpfiles.d/meson.build +++ b/tmpfiles.d/meson.build @@ -1,4 +1,4 @@ -enable_tmpfiles = conf.get('ENABLE_TMPFILES', 0) == 1 +enable_tmpfiles = conf.get('ENABLE_TMPFILES', false) tmpfiles = [['home.conf', ''], ['journal-nocow.conf', ''], @@ -14,7 +14,7 @@ tmpfiles = [['home.conf', ''], foreach pair : tmpfiles if not enable_tmpfiles # do nothing - elif pair[1] == '' or conf.get(pair[1], 0) == 1 + elif pair[1] == '' or conf.get(pair[1], false) install_data(pair[0], install_dir : tmpfilesdir) else message('Not installing tmpfiles.d/@0@ because @1@ is @2@' -- cgit v1.2.1