]> git.ipfire.org Git - thirdparty/systemd.git/blob - shell-completion/bash/meson.build
tree-wide: beautify remaining copyright statements
[thirdparty/systemd.git] / shell-completion / bash / meson.build
1 # SPDX-License-Identifier: LGPL-2.1+
2 #
3 # Copyright © 2017 Zbigniew Jędrzejewski-Szmek
4
5 bashcompletiondir = get_option('bashcompletiondir')
6 if bashcompletiondir == ''
7 bash_completion = dependency('bash-completion', required : false)
8 if bash_completion.found()
9 bashcompletiondir = bash_completion.get_pkgconfig_variable('completionsdir')
10 else
11 bashcompletiondir = join_paths(datadir, 'bash-completion/completions')
12 endif
13
14 message('bash completions: @0@'.format(bashcompletiondir))
15 endif
16
17 if bashcompletiondir != 'no'
18 bash_systemctl = configure_file(
19 input : 'systemctl.in',
20 output : 'systemctl',
21 configuration : substs)
22
23 items = [['busctl', ''],
24 ['journalctl', ''],
25 ['systemd-analyze', ''],
26 ['systemd-cat', ''],
27 ['systemd-cgls', ''],
28 ['systemd-cgtop', ''],
29 ['systemd-delta', ''],
30 ['systemd-detect-virt', ''],
31 ['systemd-nspawn', ''],
32 ['systemd-path', ''],
33 ['systemd-run', ''],
34 ['udevadm', ''],
35 ['kernel-install', ''],
36 [bash_systemctl, ''],
37 ['bootctl', 'ENABLE_EFI'],
38 ['coredumpctl', 'ENABLE_COREDUMP'],
39 ['hostnamectl', 'ENABLE_HOSTNAMED'],
40 ['localectl', 'ENABLE_LOCALED'],
41 ['loginctl', 'ENABLE_LOGIND'],
42 ['machinectl', 'ENABLE_MACHINED'],
43 ['networkctl', 'ENABLE_NETWORKD'],
44 ['portablectl', 'ENABLE_PORTABLED'],
45 ['resolvectl', 'ENABLE_RESOLVE'],
46 ['systemd-resolve', 'ENABLE_RESOLVE'],
47 ['timedatectl', 'ENABLE_TIMEDATED'],
48 ]
49
50 foreach item : items
51 if item[1] == '' or conf.get(item[1]) == 1
52 install_data(item[0],
53 install_dir : bashcompletiondir)
54 endif
55 endforeach
56 endif