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