]> git.ipfire.org Git - thirdparty/systemd.git/blob - shell-completion/bash/meson.build
Merge pull request #22983 from yuwata/login-use-symlinks-under-static_node-tags
[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_pkgconfig_variable('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 ['udevadm', ''],
34 ['kernel-install', 'ENABLE_KERNEL_INSTALL'],
35 ['bootctl', 'HAVE_GNU_EFI'],
36 ['coredumpctl', 'ENABLE_COREDUMP'],
37 ['homectl', 'ENABLE_HOMED'],
38 ['hostnamectl', 'ENABLE_HOSTNAMED'],
39 ['localectl', 'ENABLE_LOCALED'],
40 ['loginctl', 'ENABLE_LOGIND'],
41 ['machinectl', 'ENABLE_MACHINED'],
42 ['networkctl', 'ENABLE_NETWORKD'],
43 ['oomctl', 'ENABLE_OOMD'],
44 ['portablectl', 'ENABLE_PORTABLED'],
45 ['resolvectl', 'ENABLE_RESOLVE'],
46 ['systemd-resolve', 'ENABLE_RESOLVE'],
47 ['timedatectl', 'ENABLE_TIMEDATED']]
48
49 foreach item : items
50 if bashcompletiondir != 'no' and (item[1] == '' or conf.get(item[1]) == 1)
51 install_data(item[0],
52 install_dir : bashcompletiondir)
53 endif
54 endforeach