chiark / gitweb /
meson: use array type option
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 2 May 2018 04:56:28 +0000 (13:56 +0900)
committerSven Eden <yamakuzure@gmx.net>
Fri, 24 Aug 2018 14:47:08 +0000 (16:47 +0200)
Array type option is supported since 0.44.0.

meson.build
meson_options.txt

index 51e19835ccd94a9e936aa25975f50f4055c133c8..6533e38c7b950bc15b4d2e7ccfbfa632066c9749 100644 (file)
@@ -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
@@ -1911,6 +1908,7 @@ exe = executable('elogind-inhibit',
                         install_dir : rootbindir)
 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,
index fa8e95d0d8d5bb123f00932b94ca499557e41d33..fe8a5c9724d869c31b64f81fb55f5b40fe6eb7de 100644 (file)
@@ -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