]> git.ipfire.org Git - thirdparty/systemd.git/blob - shell-completion/bash/meson.build
build-sys: use #if Y instead of #ifdef Y everywhere
[thirdparty/systemd.git] / shell-completion / bash / meson.build
1 bashcompletiondir = get_option('bashcompletiondir')
2 if bashcompletiondir == ''
3 bash_completion = dependency('bash-completion', required : false)
4 if bash_completion.found()
5 bashcompletiondir = bash_completion.get_pkgconfig_variable('completionsdir')
6 else
7 bashcompletiondir = join_paths(datadir, 'bash-completion/completions')
8 endif
9
10 message('bash completions: @0@'.format(bashcompletiondir))
11 endif
12
13 if bashcompletiondir != 'no'
14 bash_systemctl = configure_file(
15 input : 'systemctl.in',
16 output : 'systemctl',
17 configuration : substs)
18
19 items = [['busctl', ''],
20 ['journalctl', ''],
21 ['systemd-analyze', ''],
22 ['systemd-cat', ''],
23 ['systemd-cgls', ''],
24 ['systemd-cgtop', ''],
25 ['systemd-delta', ''],
26 ['systemd-detect-virt', ''],
27 ['systemd-nspawn', ''],
28 ['systemd-path', ''],
29 ['systemd-run', ''],
30 ['udevadm', ''],
31 ['kernel-install', ''],
32 [bash_systemctl, ''],
33 ['bootctl', 'ENABLE_EFI'],
34 ['coredumpctl', 'ENABLE_COREDUMP'],
35 ['hostnamectl', 'ENABLE_HOSTNAMED'],
36 ['localectl', 'ENABLE_LOCALED'],
37 ['loginctl', 'ENABLE_LOGIND'],
38 ['machinectl', 'ENABLE_MACHINED'],
39 ['networkctl', 'ENABLE_NETWORKD'],
40 ['systemd-resolve', 'ENABLE_RESOLVED'],
41 ['timedatectl', 'ENABLE_TIMEDATED'],
42 ]
43
44 foreach item : items
45 if item[1] == '' or conf.get(item[1]) == 1
46 install_data(item[0],
47 install_dir : bashcompletiondir)
48 endif
49 endforeach
50 endif