Debian Codegraph @

shell-completion/bash/meson.build

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