chiark / gitweb /
Drop my copyright headers
[elogind.git] / shell-completion / bash / meson.build
1 # SPDX-License-Identifier: LGPL-2.1+
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 = join_paths(datadir, 'bash-completion/completions')
10         endif
11
12         message('bash completions: @0@'.format(bashcompletiondir))
13 endif
14
15 if bashcompletiondir != 'no'
16 #if 0 /// elogind has a *very* short list for this...
17 #         bash_systemctl = configure_file(
18 #                 input : 'systemctl.in',
19 #                 output : 'systemctl',
20 #                 configuration : substs)
21
22 #         items = [['busctl',              ''],
23 #                  ['journalctl',          ''],
24 #                  ['systemd-analyze',     ''],
25 #                  ['systemd-cat',         ''],
26 #                  ['systemd-cgls',        ''],
27 #                  ['systemd-cgtop',       ''],
28 #                  ['systemd-delta',       ''],
29 #                  ['systemd-detect-virt', ''],
30 #                  ['systemd-nspawn',      ''],
31 #                  ['systemd-path',        ''],
32 #                  ['systemd-run',         ''],
33 #                  ['udevadm',             ''],
34 #                  ['kernel-install',      ''],
35 #                  [bash_systemctl,        ''],
36 #                  ['bootctl',             'ENABLE_EFI'],
37 #                  ['coredumpctl',         'ENABLE_COREDUMP'],
38 #                  ['hostnamectl',         'ENABLE_HOSTNAMED'],
39 #                  ['localectl',           'ENABLE_LOCALED'],
40 #                  ['loginctl',            'ENABLE_LOGIND'],
41 #                  ['machinectl',          'ENABLE_MACHINED'],
42 #                  ['networkctl',          'ENABLE_NETWORKD'],
43 #                  ['portablectl',         'ENABLE_PORTABLED'],
44 #                  ['resolvectl',          'ENABLE_RESOLVE'],
45 #                  ['systemd-resolve',     'ENABLE_RESOLVE'],
46 #                  ['timedatectl',         'ENABLE_TIMEDATED'],
47 #else
48         items = [['loginctl',            ''],
49 #endif // 0
50                 ]
51
52         foreach item : items
53                 if item[1] == '' or conf.get(item[1]) == 1
54                         install_data(item[0],
55                                      install_dir : bashcompletiondir)
56                 endif
57         endforeach
58 endif