]> git.ipfire.org Git - thirdparty/systemd.git/blame - shell-completion/bash/meson.build
tree-wide: drop license boilerplate
[thirdparty/systemd.git] / shell-completion / bash / meson.build
CommitLineData
3a726fcd
ZJS
1# SPDX-License-Identifier: LGPL-2.1+
2#
3# Copyright 2017 Zbigniew Jędrzejewski-Szmek
3a726fcd 4
5c23128d
ZJS
5bashcompletiondir = get_option('bashcompletiondir')
6if bashcompletiondir == ''
37efbbd8
ZJS
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
5c23128d 13
37efbbd8 14 message('bash completions: @0@'.format(bashcompletiondir))
5c23128d
ZJS
15endif
16
17if bashcompletiondir != 'no'
37efbbd8
ZJS
18 bash_systemctl = configure_file(
19 input : 'systemctl.in',
20 output : 'systemctl',
21 configuration : substs)
5c23128d 22
37efbbd8
ZJS
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'],
1ec57f33 44 ['systemd-resolve', 'ENABLE_RESOLVE'],
37efbbd8
ZJS
45 ['timedatectl', 'ENABLE_TIMEDATED'],
46 ]
5c23128d 47
37efbbd8 48 foreach item : items
349cc4a5 49 if item[1] == '' or conf.get(item[1]) == 1
37efbbd8
ZJS
50 install_data(item[0],
51 install_dir : bashcompletiondir)
52 endif
53 endforeach
5c23128d 54endif