summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2018-05-02 13:56:28 +0900
committerSven Eden <yamakuzure@gmx.net>2018-08-24 16:47:08 +0200
commit031ec29c2d9cfab381bad7a8bad6308da2130649 (patch)
tree8cc267429446adeb6742a52cd2f191194f89446b
parent2a1b82313e98211e7b96210920ae5fd2687c42de (diff)
meson: use array type option
Array type option is supported since 0.44.0.
-rw-r--r--meson.build22
-rw-r--r--meson_options.txt4
2 files changed, 12 insertions, 14 deletions
diff --git a/meson.build b/meson.build
index 51e19835c..6533e38c7 100644
--- a/meson.build
+++ b/meson.build
@@ -881,27 +881,24 @@ conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
# substs.set('DEBUGTTY', get_option('debug-tty'))
#endif // 0
-debug = get_option('debug')
enable_debug_hashmap = false
enable_debug_mmap_cache = false
#if 1 /// additional elogind debug mode
enable_debug_elogind = false
#endif // 1
-if debug != ''
- foreach name : debug.split(',')
- if name == 'hashmap'
- enable_debug_hashmap = true
- elif name == 'mmap-cache'
- enable_debug_mmap_cache = true
#if 1 /// additional elogind debug mode
elif name == 'elogind'
enable_debug_elogind = true
#endif // 1
- else
- message('unknown debug option "@0@", ignoring'.format(name))
- endif
- endforeach
-endif
+foreach name : get_option('debug')
+ if name == 'hashmap'
+ enable_debug_hashmap = true
+ elif name == 'mmap-cache'
+ enable_debug_mmap_cache = true
+ else
+ message('unknown debug option "@0@", ignoring'.format(name))
+ endif
+endforeach
conf.set10('ENABLE_DEBUG_HASHMAP', enable_debug_hashmap)
conf.set10('ENABLE_DEBUG_MMAP_CACHE', enable_debug_mmap_cache)
#if 1 /// additional elogind debug mode
@@ -1912,6 +1909,7 @@ exe = executable('elogind-inhibit',
public_programs += [exe]
executable('elogind-user-runtime-dir',
executable('elogind-user-runtime-dir',
+executable('elogind-user-runtime-dir',
user_runtime_dir_sources,
include_directories : includes,
link_with : [libshared, liblogind_core],
diff --git a/meson_options.txt b/meson_options.txt
index fa8e95d0d..fe8a5c972 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -70,8 +70,8 @@ option('kexec-path', type : 'string', description : 'path to kexec')
# description : 'path to debug shell binary')
# option('debug-tty', type : 'string', value : '/dev/tty9',
# description : 'specify the tty device for debug shell')
-# option('debug', type : 'string',
-# description : 'enable extra debugging (hashmap,mmap-cache)')
+# option('debug', type : 'array', choices : ['hashmap', 'mmap-cache'], value : [],
+# description : 'enable extra debugging')
# option('memory-accounting-default', type : 'boolean',
# description : 'enable MemoryAccounting= by default')
#else