chiark / gitweb /
Prep v236: Apply missing upstream updates to the build system
[elogind.git] / shell-completion / zsh / meson.build
1 # SPDX-License-Identifier: LGPL-2.1+
2 #
3 # Copyright 2017 Zbigniew JÄ™drzejewski-Szmek
4 #
5 # elogind is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU Lesser General Public License as published by
7 # the Free Software Foundation; either version 2.1 of the License, or
8 # (at your option) any later version.
9 #
10 # elogind is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # Lesser General Public License for more details.
14 #
15 # You should have received a copy of the GNU Lesser General Public License
16 # along with elogind; If not, see <http://www.gnu.org/licenses/>.
17
18 zshcompletiondir = get_option('zshcompletiondir')
19 if zshcompletiondir == ''
20         zshcompletiondir = join_paths(datadir, 'zsh/site-functions')
21
22         message('zsh completions: @0@'.format(zshcompletiondir))
23 endif
24
25 if zshcompletiondir != 'no'
26 #if 0 /// elogind has a *very* short list for this...
27 #         zsh_systemctl = configure_file(
28 #                 input : '_systemctl.in',
29 #                 output : '_systemctl',
30 #                 configuration : substs)
31
32 #         items = [['_busctl',                   ''],
33 #                  ['_journalctl',               ''],
34 #                  ['_systemd-analyze',          ''],
35 #                  ['_systemd-delta',            ''],
36 #                  ['_systemd-nspawn',           ''],
37 #                  ['_systemd',                  ''],
38 #                  ['_systemd-run',              ''],
39 #                  ['_udevadm',                  ''],
40 #                  ['_kernel-install',           ''],
41 #                  ['_sd_hosts_or_user_at_host', ''],
42 #                  ['_sd_outputmodes',           ''],
43 #                  ['_sd_unit_files',            ''],
44 #                  ['_sd_machines',              ''],
45 #                  [zsh_systemctl,               ''],
46 #                  ['_bootctl',                  'ENABLE_EFI'],
47 #                  ['_coredumpctl',              'ENABLE_COREDUMP'],
48 #                  ['_hostnamectl',              'ENABLE_HOSTNAMED'],
49 #                  ['_localectl',                'ENABLE_LOCALED'],
50 #                  ['_loginctl',                 'ENABLE_LOGIND'],
51 #                  ['_machinectl',               'ENABLE_MACHINED'],
52 #                  ['_networkctl',               'ENABLE_NETWORKD'],
53 #                  ['_systemd-inhibit',          'ENABLE_LOGIND'],
54 #                  ['_systemd-resolve',          'ENABLE_RESOLVE'],
55 #                  ['_systemd-tmpfiles',         'ENABLE_TMPFILES'],
56 #                  ['_timedatectl',              'ENABLE_TIMEDATED'],
57 #else
58         items = [['_loginctl',            ''],
59 #endif // 0
60                 ]
61
62         foreach item : items
63                 if item[1] == '' or conf.get(item[1]) == 1
64                         install_data(item[0],
65                                      install_dir : zshcompletiondir)
66                 endif
67         endforeach
68 endif