]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/core/meson.build
man: do not recommend rescue.target for alt-↑
[thirdparty/systemd.git] / src / core / meson.build
1 libcore_la_sources = '''
2 unit.c
3 unit.h
4 unit-printf.c
5 unit-printf.h
6 job.c
7 job.h
8 manager.c
9 manager.h
10 transaction.c
11 transaction.h
12 load-fragment.c
13 load-fragment.h
14 service.c
15 service.h
16 socket.c
17 socket.h
18 busname.c
19 busname.h
20 bus-policy.c
21 bus-policy.h
22 target.c
23 target.h
24 device.c
25 device.h
26 mount.c
27 mount.h
28 automount.c
29 automount.h
30 swap.c
31 swap.h
32 timer.c
33 timer.h
34 path.c
35 path.h
36 slice.c
37 slice.h
38 scope.c
39 scope.h
40 load-dropin.c
41 load-dropin.h
42 execute.c
43 execute.h
44 dynamic-user.c
45 dynamic-user.h
46 kill.c
47 kill.h
48 dbus.c
49 dbus.h
50 dbus-manager.c
51 dbus-manager.h
52 dbus-unit.c
53 dbus-unit.h
54 dbus-job.c
55 dbus-job.h
56 dbus-service.c
57 dbus-service.h
58 dbus-socket.c
59 dbus-socket.h
60 dbus-busname.c
61 dbus-busname.h
62 dbus-target.c
63 dbus-target.h
64 dbus-device.c
65 dbus-device.h
66 dbus-mount.c
67 dbus-mount.h
68 dbus-automount.c
69 dbus-automount.h
70 dbus-swap.c
71 dbus-swap.h
72 dbus-timer.c
73 dbus-timer.h
74 dbus-path.c
75 dbus-path.h
76 dbus-slice.c
77 dbus-slice.h
78 dbus-scope.c
79 dbus-scope.h
80 dbus-execute.c
81 dbus-execute.h
82 dbus-kill.c
83 dbus-kill.h
84 dbus-cgroup.c
85 dbus-cgroup.h
86 cgroup.c
87 cgroup.h
88 selinux-access.c
89 selinux-access.h
90 selinux-setup.c
91 selinux-setup.h
92 smack-setup.c
93 smack-setup.h
94 ima-setup.c
95 ima-setup.h
96 locale-setup.h
97 locale-setup.c
98 hostname-setup.c
99 hostname-setup.h
100 machine-id-setup.c
101 machine-id-setup.h
102 mount-setup.c
103 mount-setup.h
104 kmod-setup.c
105 kmod-setup.h
106 loopback-setup.h
107 loopback-setup.c
108 namespace.c
109 namespace.h
110 killall.h
111 killall.c
112 audit-fd.c
113 audit-fd.h
114 show-status.c
115 show-status.h
116 emergency-action.c
117 emergency-action.h
118 '''.split()
119
120 load_fragment_gperf_gperf = custom_target(
121 'load-fragment-gperf.gperf',
122 input : 'load-fragment-gperf.gperf.m4',
123 output: 'load-fragment-gperf.gperf',
124 command : [m4, '-P'] + m4_defines + ['@INPUT@'],
125 capture : true)
126
127 load_fragment_gperf_c = custom_target(
128 'load-fragment-gperf.c',
129 input : load_fragment_gperf_gperf,
130 output : 'load-fragment-gperf.c',
131 command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
132
133 awkscript = 'load-fragment-gperf-nulstr.awk'
134 load_fragment_gperf_nulstr_c = custom_target(
135 'load-fragment-gperf-nulstr.c',
136 input : [awkscript, load_fragment_gperf_gperf],
137 output : 'load-fragment-gperf-nulstr.c',
138 command : [awk, '-f', '@INPUT0@', '@INPUT1@'],
139 capture : true)
140
141 libcore = static_library(
142 'core',
143 libcore_la_sources,
144 load_fragment_gperf_c,
145 load_fragment_gperf_nulstr_c,
146 include_directories : includes,
147 link_with : [libshared_static],
148 dependencies : [threads,
149 libseccomp,
150 libpam,
151 libaudit,
152 libkmod,
153 libapparmor,
154 libmount])
155
156 systemd_sources = files('main.c')
157
158 systemd_shutdown_sources = files('''
159 shutdown.c
160 umount.c
161 umount.h
162 mount-setup.c
163 mount-setup.h
164 killall.c
165 killall.h
166 '''.split())
167
168 in_files = [['macros.systemd', rpmmacrosdir],
169 ['triggers.systemd', ''],
170 ['systemd.pc', pkgconfigdatadir]]
171
172 foreach item : in_files
173 file = item[0]
174 dir = item[1]
175
176 # If 'no', disable generation completely.
177 # If '', generate, but do not install.
178 if dir != 'no'
179 gen = configure_file(
180 input : file + '.in',
181 output : file,
182 configuration : substs)
183 if dir != ''
184 install_data(gen,
185 install_dir : dir)
186 endif
187 endif
188 endforeach
189
190 install_data('org.freedesktop.systemd1.conf',
191 install_dir : dbuspolicydir)
192 install_data('org.freedesktop.systemd1.service',
193 install_dir : dbussystemservicedir)
194
195 policy_in = configure_file(
196 input : 'org.freedesktop.systemd1.policy.in.in',
197 output : 'org.freedesktop.systemd1.policy.in',
198 configuration : substs)
199
200 custom_target(
201 'org.freedesktop.systemd1.policy',
202 input : policy_in,
203 output : 'org.freedesktop.systemd1.policy',
204 command : intltool_command,
205 install : install_polkit,
206 install_dir : polkitpolicydir)
207
208 # TODO: this might work with meson from git, see
209 # https://github.com/mesonbuild/meson/issues/1441#issuecomment-283585493
210 #
211 # i18n.merge_file(
212 # 'org.freedesktop.systemd1.policy',
213 # po_dir : po_dir,
214 # input : policy_in,
215 # output : 'org.freedesktop.systemd1.policy',
216 # install : install_polkit,
217 # install_dir : polkitpolicydir)
218
219 install_data('system.conf',
220 'user.conf',
221 install_dir : pkgsysconfdir)
222
223 meson.add_install_script('sh', '-c', mkdir_p.format(systemshutdowndir))
224 meson.add_install_script('sh', '-c', mkdir_p.format(systemsleepdir))
225 meson.add_install_script('sh', '-c', mkdir_p.format(systemgeneratordir))
226 meson.add_install_script('sh', '-c', mkdir_p.format(usergeneratordir))
227
228 meson.add_install_script('sh', '-c',
229 mkdir_p.format(join_paths(pkgsysconfdir, 'system/multi-user.target.wants')))
230 meson.add_install_script('sh', '-c',
231 mkdir_p.format(join_paths(pkgsysconfdir, 'system/getty.target.wants')))
232 meson.add_install_script('sh', '-c',
233 mkdir_p.format(join_paths(pkgsysconfdir, 'user')))
234 meson.add_install_script('sh', '-c',
235 mkdir_p.format(join_paths(sysconfdir, 'xdg/systemd')))