1 # SPDX-License-Identifier: LGPL-2.1-or-later
3 systemctl_sources = files(
4 'systemctl-add-dependency.c',
5 'systemctl-cancel-job.c',
6 'systemctl-clean-or-freeze.c',
7 'systemctl-compat-halt.c',
8 'systemctl-compat-runlevel.c',
9 'systemctl-compat-shutdown.c',
10 'systemctl-compat-telinit.c',
11 'systemctl-daemon-reload.c',
14 'systemctl-is-active.c',
15 'systemctl-is-enabled.c',
16 'systemctl-is-system-running.c',
18 'systemctl-list-dependencies.c',
19 'systemctl-list-jobs.c',
20 'systemctl-list-machines.c',
21 'systemctl-list-unit-files.c',
22 'systemctl-list-units.c',
23 'systemctl-log-setting.c',
26 'systemctl-preset-all.c',
27 'systemctl-reset-failed.c',
28 'systemctl-service-watchdogs.c',
29 'systemctl-set-default.c',
30 'systemctl-set-environment.c',
31 'systemctl-set-property.c',
33 'systemctl-start-special.c',
34 'systemctl-start-unit.c',
35 'systemctl-switch-root.c',
36 'systemctl-sysv-compat.c',
37 'systemctl-trivial-method.c',
43 if get_option('link-systemctl-shared')
44 systemctl_link_with = [libshared]
46 systemctl_link_with = [libsystemd_static,
51 executable_template + {
54 'sources' : systemctl_sources,
55 'link_with' : systemctl_link_with,
67 files('fuzz-systemctl-parse-argv.c'),
70 'link_with' : systemctl_link_with,
71 'c_args' : ['-DFUZZ_SYSTEMCTL_PARSE_ARGV'],
75 foreach alias : (['halt', 'poweroff', 'reboot', 'shutdown'] +
76 (conf.get('HAVE_SYSV_COMPAT') == 1 ? ['runlevel', 'telinit'] : []))
77 install_emptydir(sbindir)
78 meson.add_install_script(sh, '-c',
79 ln_s.format(bindir / 'systemctl',