]> git.ipfire.org Git - thirdparty/systemd.git/blob - shell-completion/bash/meson.build
Merge pull request #33377 from yuwata/strbuf-cleanups
[thirdparty/systemd.git] / shell-completion / bash / meson.build
1 # SPDX-License-Identifier: LGPL-2.1-or-later
2
3 bashcompletiondir = get_option('bashcompletiondir')
4 if bashcompletiondir == ''
5 bash_completion = dependency('bash-completion', required : false)
6 if bash_completion.found()
7 bashcompletiondir = bash_completion.get_variable(pkgconfig : 'completionsdir')
8 else
9 bashcompletiondir = datadir / 'bash-completion/completions'
10 endif
11 endif
12
13 custom_target(
14 'systemctl',
15 input : 'systemctl.in',
16 output : 'systemctl',
17 command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
18 install : bashcompletiondir != 'no',
19 install_dir : bashcompletiondir)
20
21 items = [['busctl', ''],
22 ['journalctl', ''],
23 ['systemd-analyze', ''],
24 ['systemd-cat', ''],
25 ['systemd-cgls', ''],
26 ['systemd-cgtop', ''],
27 ['systemd-delta', ''],
28 ['systemd-detect-virt', ''],
29 ['systemd-id128', ''],
30 ['systemd-nspawn', ''],
31 ['systemd-path', ''],
32 ['systemd-run', ''],
33 ['systemd-vpick', ''],
34 ['udevadm', ''],
35 ['bootctl', ''],
36 ['run0', ''],
37 ['coredumpctl', 'ENABLE_COREDUMP'],
38 ['homectl', 'ENABLE_HOMED'],
39 ['hostnamectl', 'ENABLE_HOSTNAMED'],
40 ['importctl', 'ENABLE_IMPORTD'],
41 ['kernel-install', 'ENABLE_KERNEL_INSTALL'],
42 ['localectl', 'ENABLE_LOCALED'],
43 ['loginctl', 'ENABLE_LOGIND'],
44 ['machinectl', 'ENABLE_MACHINED'],
45 ['networkctl', 'ENABLE_NETWORKD'],
46 ['oomctl', 'ENABLE_OOMD'],
47 ['portablectl', 'ENABLE_PORTABLED'],
48 ['resolvectl', 'ENABLE_RESOLVE'],
49 ['systemd-cryptenroll', 'HAVE_LIBCRYPTSETUP'],
50 ['systemd-confext', 'ENABLE_SYSEXT'],
51 ['systemd-dissect', 'HAVE_BLKID'],
52 ['systemd-resolve', 'ENABLE_RESOLVE'],
53 ['systemd-sysext', 'ENABLE_SYSEXT'],
54 ['systemd-vmspawn', 'ENABLE_VMSPAWN'],
55 ['timedatectl', 'ENABLE_TIMEDATED']]
56
57 foreach item : items
58 if bashcompletiondir != 'no' and (item[1] == '' or conf.get(item[1]) == 1)
59 install_data(item[0],
60 install_dir : bashcompletiondir)
61 endif
62 endforeach