]>
Commit | Line | Data |
---|---|---|
1 | # This file is part of systemd. | |
2 | # | |
3 | # Copyright 2010 Lennart Poettering | |
4 | # | |
5 | # systemd is free software; you can redistribute it and/or modify it | |
6 | # under the terms of the GNU General Public License as published by | |
7 | # the Free Software Foundation; either version 2 of the License, or | |
8 | # (at your option) any later version. | |
9 | # | |
10 | # systemd 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 | # General Public License for more details. | |
14 | # | |
15 | # You should have received a copy of the GNU General Public License | |
16 | # along with systemd; If not, see <http://www.gnu.org/licenses/>. | |
17 | ||
18 | ACLOCAL_AMFLAGS = -I m4 | |
19 | ||
20 | # Dirs of external packages | |
21 | dbuspolicydir=@dbuspolicydir@ | |
22 | dbussessionservicedir=@dbussessionservicedir@ | |
23 | dbussystemservicedir=@dbussystemservicedir@ | |
24 | dbusinterfacedir=@dbusinterfacedir@ | |
25 | udevrulesdir=@udevrulesdir@ | |
26 | pamlibdir=@pamlibdir@ | |
27 | pkgconfigdatadir=$(datadir)/pkgconfig | |
28 | ||
29 | # Our own, non-special dirs | |
30 | pkgsysconfdir=$(sysconfdir)/systemd | |
31 | sessionunitdir=$(pkgdatadir)/session | |
32 | ||
33 | # And these are the special ones for / | |
34 | rootdir=@rootdir@ | |
35 | rootbindir=$(rootdir)/bin | |
36 | rootlibexecdir=$(rootdir)/lib/systemd | |
37 | systemunitdir=$(rootdir)/lib/systemd/system | |
38 | ||
39 | AM_CPPFLAGS = \ | |
40 | -include $(top_builddir)/config.h \ | |
41 | -DSYSTEM_CONFIG_FILE=\"$(pkgsysconfdir)/system.conf\" \ | |
42 | -DSYSTEM_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/system\" \ | |
43 | -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" \ | |
44 | -DSYSTEM_SYSVINIT_PATH=\"$(SYSTEM_SYSVINIT_PATH)\" \ | |
45 | -DSYSTEM_SYSVRCND_PATH=\"$(SYSTEM_SYSVRCND_PATH)\" \ | |
46 | -DSESSION_CONFIG_FILE=\"$(pkgsysconfdir)/session.conf\" \ | |
47 | -DSESSION_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/session\" \ | |
48 | -DSESSION_DATA_UNIT_PATH=\"$(sessionunitdir)\" \ | |
49 | -DCGROUP_AGENT_PATH=\"$(rootlibexecdir)/systemd-cgroups-agent\" \ | |
50 | -DSYSTEMD_BINARY_PATH=\"$(rootbindir)/systemd\" \ | |
51 | -DSYSTEMCTL_BINARY_PATH=\"$(rootbindir)/systemctl\" \ | |
52 | -DRUNTIME_DIR=\"$(localstatedir)/run\" \ | |
53 | -I $(top_srcdir)/src | |
54 | ||
55 | rootbin_PROGRAMS = \ | |
56 | systemd \ | |
57 | systemctl \ | |
58 | systemd-notify | |
59 | ||
60 | bin_PROGRAMS = \ | |
61 | systemd-install \ | |
62 | systemd-cgls | |
63 | ||
64 | if HAVE_GTK | |
65 | bin_PROGRAMS += \ | |
66 | systemadm | |
67 | endif | |
68 | ||
69 | rootlibexec_PROGRAMS = \ | |
70 | systemd-logger \ | |
71 | systemd-cgroups-agent \ | |
72 | systemd-initctl | |
73 | ||
74 | noinst_PROGRAMS = \ | |
75 | test-engine \ | |
76 | test-job-type \ | |
77 | test-ns \ | |
78 | test-loopback \ | |
79 | test-daemon \ | |
80 | test-cgroup | |
81 | ||
82 | if HAVE_PAM | |
83 | pamlib_LTLIBRARIES = \ | |
84 | pam_systemd.la | |
85 | endif | |
86 | ||
87 | dist_pkgsysconf_DATA = \ | |
88 | src/system.conf | |
89 | ||
90 | dist_dbuspolicy_DATA = \ | |
91 | src/org.freedesktop.systemd1.conf | |
92 | ||
93 | dist_dbussystemservice_DATA = \ | |
94 | src/org.freedesktop.systemd1.service | |
95 | ||
96 | dist_udevrules_DATA = \ | |
97 | src/99-systemd.rules | |
98 | ||
99 | dbusinterface_DATA = \ | |
100 | org.freedesktop.systemd1.Manager.xml \ | |
101 | org.freedesktop.systemd1.Job.xml \ | |
102 | org.freedesktop.systemd1.Unit.xml \ | |
103 | org.freedesktop.systemd1.Service.xml \ | |
104 | org.freedesktop.systemd1.Socket.xml \ | |
105 | org.freedesktop.systemd1.Timer.xml \ | |
106 | org.freedesktop.systemd1.Target.xml \ | |
107 | org.freedesktop.systemd1.Device.xml \ | |
108 | org.freedesktop.systemd1.Mount.xml \ | |
109 | org.freedesktop.systemd1.Automount.xml \ | |
110 | org.freedesktop.systemd1.Snapshot.xml \ | |
111 | org.freedesktop.systemd1.Swap.xml \ | |
112 | org.freedesktop.systemd1.Path.xml | |
113 | ||
114 | dist_systemunit_DATA = \ | |
115 | units/emergency.service \ | |
116 | units/emergency.target \ | |
117 | units/basic.target \ | |
118 | units/getty.target \ | |
119 | units/halt.target \ | |
120 | units/local-fs.target \ | |
121 | units/network.target \ | |
122 | units/nss-lookup.target \ | |
123 | units/mail-transfer-agent.target \ | |
124 | units/poweroff.target \ | |
125 | units/reboot.target \ | |
126 | units/rescue.target \ | |
127 | units/rpcbind.target \ | |
128 | units/rtc-set.target \ | |
129 | units/shutdown.target \ | |
130 | units/umount.target \ | |
131 | units/sigpwr.target \ | |
132 | units/sockets.target \ | |
133 | units/swap.target \ | |
134 | units/dbus.target \ | |
135 | units/systemd-initctl.socket \ | |
136 | units/systemd-logger.socket \ | |
137 | units/dev-hugepages.automount \ | |
138 | units/dev-hugepages.mount \ | |
139 | units/dev-mqueue.automount \ | |
140 | units/dev-mqueue.mount \ | |
141 | units/proc-sys-fs-binfmt_misc.automount \ | |
142 | units/proc-sys-fs-binfmt_misc.mount \ | |
143 | units/sys-kernel-debug.automount \ | |
144 | units/sys-kernel-debug.mount \ | |
145 | units/sys-kernel-security.automount \ | |
146 | units/sys-kernel-security.mount \ | |
147 | units/var-lock.mount \ | |
148 | units/var-run.mount | |
149 | ||
150 | nodist_systemunit_DATA = \ | |
151 | units/sysinit.target \ | |
152 | units/getty@.service \ | |
153 | units/graphical.target \ | |
154 | units/remote-fs.target \ | |
155 | units/multi-user.target \ | |
156 | units/systemd-initctl.service \ | |
157 | units/systemd-logger.service \ | |
158 | units/syslog.target | |
159 | ||
160 | dist_sessionunit_DATA = \ | |
161 | units/session/default.target | |
162 | ||
163 | nodist_sessionunit_DATA = \ | |
164 | units/session/remote-fs.target \ | |
165 | units/session/exit.service | |
166 | ||
167 | EXTRA_DIST = \ | |
168 | units/sysinit.target.m4 \ | |
169 | units/getty@.service.m4 \ | |
170 | units/graphical.target.m4 \ | |
171 | units/multi-user.target.m4 \ | |
172 | units/remote-fs.target.m4 \ | |
173 | units/systemd-initctl.service.in \ | |
174 | units/systemd-logger.service.in \ | |
175 | units/syslog.target.in \ | |
176 | units/session/exit.service.in \ | |
177 | systemd.pc.in | |
178 | ||
179 | if TARGET_FEDORA | |
180 | dist_systemunit_DATA += \ | |
181 | units/fedora/halt.service \ | |
182 | units/fedora/killall.service \ | |
183 | units/fedora/poweroff.service \ | |
184 | units/fedora/prefdm.service \ | |
185 | units/fedora/rc-local.service \ | |
186 | units/fedora/reboot.service \ | |
187 | units/fedora/sysinit.service \ | |
188 | units/fedora/single.service | |
189 | endif | |
190 | ||
191 | if TARGET_SUSE | |
192 | dist_systemunit_DATA += \ | |
193 | units/suse/halt.service \ | |
194 | units/suse/poweroff.service \ | |
195 | units/suse/reboot.service | |
196 | endif | |
197 | ||
198 | if TARGET_GENTOO | |
199 | dist_systemunit_DATA += \ | |
200 | units/gentoo/halt.service \ | |
201 | units/gentoo/killall.service \ | |
202 | units/gentoo/poweroff.service \ | |
203 | units/gentoo/reboot.service \ | |
204 | units/gentoo/xdm.service | |
205 | endif | |
206 | ||
207 | if TARGET_ARCH | |
208 | dist_systemunit_DATA += \ | |
209 | units/arch/sysinit.service \ | |
210 | units/arch/rc-local.service \ | |
211 | units/arch/halt.service \ | |
212 | units/arch/poweroff.service \ | |
213 | units/arch/reboot.service | |
214 | endif | |
215 | ||
216 | dist_doc_DATA = \ | |
217 | README \ | |
218 | LICENSE \ | |
219 | DISTRO_PORTING \ | |
220 | src/sd-daemon.h \ | |
221 | src/sd-daemon.c | |
222 | ||
223 | pkgconfigdata_DATA = \ | |
224 | systemd.pc | |
225 | ||
226 | noinst_LTLIBRARIES = \ | |
227 | libsystemd-basic.la \ | |
228 | libsystemd-core.la | |
229 | ||
230 | libsystemd_basic_la_SOURCES = \ | |
231 | src/util.c \ | |
232 | src/hashmap.c \ | |
233 | src/set.c \ | |
234 | src/strv.c \ | |
235 | src/conf-parser.c \ | |
236 | src/socket-util.c \ | |
237 | src/log.c \ | |
238 | src/ratelimit.c | |
239 | ||
240 | libsystemd_core_la_SOURCES = \ | |
241 | src/unit.c \ | |
242 | src/job.c \ | |
243 | src/manager.c \ | |
244 | src/path-lookup.c \ | |
245 | src/load-fragment.c \ | |
246 | src/service.c \ | |
247 | src/automount.c \ | |
248 | src/mount.c \ | |
249 | src/swap.c \ | |
250 | src/device.c \ | |
251 | src/target.c \ | |
252 | src/snapshot.c \ | |
253 | src/socket.c \ | |
254 | src/timer.c \ | |
255 | src/path.c \ | |
256 | src/load-dropin.c \ | |
257 | src/execute.c \ | |
258 | src/dbus.c \ | |
259 | src/dbus-manager.c \ | |
260 | src/dbus-unit.c \ | |
261 | src/dbus-job.c \ | |
262 | src/dbus-service.c \ | |
263 | src/dbus-socket.c \ | |
264 | src/dbus-timer.c \ | |
265 | src/dbus-target.c \ | |
266 | src/dbus-mount.c \ | |
267 | src/dbus-automount.c \ | |
268 | src/dbus-swap.c \ | |
269 | src/dbus-snapshot.c \ | |
270 | src/dbus-device.c \ | |
271 | src/dbus-execute.c \ | |
272 | src/dbus-path.c \ | |
273 | src/cgroup.c \ | |
274 | src/mount-setup.c \ | |
275 | src/hostname-setup.c \ | |
276 | src/loopback-setup.c \ | |
277 | src/kmod-setup.c \ | |
278 | src/modprobe-setup.c \ | |
279 | src/utmp-wtmp.c \ | |
280 | src/specifier.c \ | |
281 | src/unit-name.c \ | |
282 | src/fdset.c \ | |
283 | src/namespace.c \ | |
284 | src/tcpwrap.c \ | |
285 | src/cgroup-util.c | |
286 | ||
287 | libsystemd_core_la_CFLAGS = \ | |
288 | $(AM_CFLAGS) \ | |
289 | $(DBUS_CFLAGS) \ | |
290 | $(UDEV_CFLAGS) | |
291 | ||
292 | libsystemd_core_la_LIBADD = \ | |
293 | libsystemd-basic.la \ | |
294 | $(DBUS_LIBS) \ | |
295 | $(UDEV_LIBS) \ | |
296 | $(LIBWRAP_LIBS) \ | |
297 | $(PAM_LIBS) | |
298 | ||
299 | # This is needed because automake is buggy in how it generates the | |
300 | # rules for C programs, but not Vala programs. We therefore can't | |
301 | # list the .h files as dependencies if we want make dist to work. | |
302 | ||
303 | EXTRA_DIST += \ | |
304 | ${libsystemd_basic_la_SOURCES:.c=.h} \ | |
305 | ${libsystemd_core_la_SOURCES:.c=.h} \ | |
306 | src/macro.h \ | |
307 | src/ioprio.h \ | |
308 | src/missing.h \ | |
309 | src/list.h \ | |
310 | src/securebits.h \ | |
311 | src/linux/auto_dev-ioctl.h \ | |
312 | src/initreq.h \ | |
313 | src/sd-daemon.h \ | |
314 | src/special.h \ | |
315 | src/dbus-common.h \ | |
316 | src/bus-errors.h \ | |
317 | src/cgroup-show.h | |
318 | ||
319 | MANPAGES = \ | |
320 | man/systemd.1 \ | |
321 | man/systemctl.1 \ | |
322 | man/systemadm.1 \ | |
323 | man/systemd-install.1 \ | |
324 | man/systemd-cgls.1 \ | |
325 | man/systemd-notify.1 \ | |
326 | man/sd_notify.3 \ | |
327 | man/sd_booted.3 \ | |
328 | man/sd_listen_fds.3 \ | |
329 | man/sd_is_fifo.3 \ | |
330 | man/systemd.unit.5 \ | |
331 | man/systemd.service.5 \ | |
332 | man/systemd.socket.5 \ | |
333 | man/systemd.mount.5 \ | |
334 | man/systemd.automount.5 \ | |
335 | man/systemd.swap.5 \ | |
336 | man/systemd.timer.5 \ | |
337 | man/systemd.path.5 \ | |
338 | man/systemd.target.5 \ | |
339 | man/systemd.device.5 \ | |
340 | man/systemd.snapshot.5 \ | |
341 | man/systemd.exec.5 \ | |
342 | man/daemon.7 \ | |
343 | man/sd-daemon.7 \ | |
344 | man/runlevel.8 \ | |
345 | man/telinit.8 \ | |
346 | man/halt.8 \ | |
347 | man/shutdown.8 \ | |
348 | man/pam_systemd.8 \ | |
349 | man/systemd.conf.5 | |
350 | ||
351 | MANPAGES_ALIAS = \ | |
352 | man/reboot.8 \ | |
353 | man/poweroff.8 \ | |
354 | man/sd_is_socket.3 \ | |
355 | man/sd_is_socket_unix.3 \ | |
356 | man/sd_is_socket_inet.3 \ | |
357 | man/sd_notifyf.3 \ | |
358 | man/init.1 | |
359 | ||
360 | man/reboot.8: man/halt.8 | |
361 | man/poweroff.8: man/halt.8 | |
362 | man/sd_is_socket.3: man/sd_is_fifo.3 | |
363 | man/sd_is_socket_unix.3: man/sd_is_fifo.3 | |
364 | man/sd_is_socket_inet.3: man/sd_is_fifo.3 | |
365 | man/sd_notifyf.3: man/sd_notify.3 | |
366 | man/init.1: man/systemd.1 | |
367 | ||
368 | dist_man_MANS = \ | |
369 | $(MANPAGES) \ | |
370 | $(MANPAGES_ALIAS) | |
371 | ||
372 | nodist_man_MANS = \ | |
373 | man/systemd.special.7 | |
374 | ||
375 | XML_FILES = \ | |
376 | ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}} | |
377 | ||
378 | XML_IN_FILES = \ | |
379 | ${patsubst %.1,%.xml.in,${patsubst %.3,%.xml.in,${patsubst %.5,%.xml.in,${patsubst %.7,%.xml.in,${patsubst %.8,%.xml.in,$(nodist_man_MANS)}}}}} | |
380 | ||
381 | dist_noinst_DATA = \ | |
382 | ${XML_FILES:.xml=.html} | |
383 | ||
384 | nodist_noinst_DATA = \ | |
385 | ${XML_IN_FILES:.xml.in=.html} | |
386 | ||
387 | EXTRA_DIST += \ | |
388 | $(XML_FILES) \ | |
389 | $(XML_IN_FILES) \ | |
390 | ${nodist_man_MANS:=.in} \ | |
391 | ${XML_IN_FILES:.xml.in=.html.in} | |
392 | ||
393 | systemd_SOURCES = \ | |
394 | src/main.c | |
395 | ||
396 | systemd_CFLAGS = \ | |
397 | $(AM_CFLAGS) \ | |
398 | $(DBUS_CFLAGS) \ | |
399 | $(UDEV_CFLAGS) | |
400 | ||
401 | systemd_LDADD = \ | |
402 | libsystemd-core.la | |
403 | ||
404 | test_engine_SOURCES = \ | |
405 | src/test-engine.c | |
406 | ||
407 | test_engine_CFLAGS = $(systemd_CFLAGS) | |
408 | test_engine_LDADD = $(systemd_LDADD) | |
409 | ||
410 | test_job_type_SOURCES = \ | |
411 | src/test-job-type.c | |
412 | ||
413 | test_job_type_CFLAGS = $(systemd_CFLAGS) | |
414 | test_job_type_LDADD = $(systemd_LDADD) | |
415 | ||
416 | test_ns_SOURCES = \ | |
417 | src/test-ns.c | |
418 | ||
419 | test_ns_CFLAGS = $(systemd_CFLAGS) | |
420 | test_ns_LDADD = $(systemd_LDADD) | |
421 | ||
422 | test_loopback_SOURCES = \ | |
423 | src/test-loopback.c \ | |
424 | src/loopback-setup.c | |
425 | ||
426 | test_loopback_LDADD = \ | |
427 | libsystemd-basic.la | |
428 | ||
429 | test_daemon_SOURCES = \ | |
430 | src/test-daemon.c \ | |
431 | src/sd-daemon.c | |
432 | ||
433 | test_daemon_LDADD = \ | |
434 | libsystemd-basic.la | |
435 | ||
436 | test_cgroup_SOURCES = \ | |
437 | src/test-cgroup.c \ | |
438 | src/cgroup-util.c | |
439 | ||
440 | test_cgroup_CFLAGS = \ | |
441 | $(AM_CFLAGS) | |
442 | ||
443 | test_cgroup_LDADD = \ | |
444 | libsystemd-basic.la | |
445 | ||
446 | systemd_logger_SOURCES = \ | |
447 | src/logger.c \ | |
448 | src/sd-daemon.c \ | |
449 | src/tcpwrap.c | |
450 | ||
451 | systemd_logger_LDADD = \ | |
452 | libsystemd-basic.la \ | |
453 | $(LIBWRAP_LIBS) | |
454 | ||
455 | systemd_initctl_SOURCES = \ | |
456 | src/initctl.c \ | |
457 | src/sd-daemon.c \ | |
458 | src/dbus-common.c | |
459 | ||
460 | systemd_initctl_CFLAGS = \ | |
461 | $(AM_CFLAGS) \ | |
462 | $(DBUS_CFLAGS) | |
463 | ||
464 | systemd_initctl_LDADD = \ | |
465 | libsystemd-basic.la \ | |
466 | $(DBUS_LIBS) | |
467 | ||
468 | systemd_cgroups_agent_SOURCES = \ | |
469 | src/cgroups-agent.c | |
470 | ||
471 | systemd_cgroups_agent_CFLAGS = \ | |
472 | $(AM_CFLAGS) \ | |
473 | $(DBUS_CFLAGS) | |
474 | ||
475 | systemd_cgroups_agent_LDADD = \ | |
476 | libsystemd-basic.la \ | |
477 | $(DBUS_LIBS) | |
478 | ||
479 | systemctl_SOURCES = \ | |
480 | src/systemctl.c \ | |
481 | src/utmp-wtmp.c \ | |
482 | src/dbus-common.c \ | |
483 | src/cgroup-show.c \ | |
484 | src/cgroup-util.c | |
485 | ||
486 | systemctl_CFLAGS = \ | |
487 | $(AM_CFLAGS) \ | |
488 | $(DBUS_CFLAGS) | |
489 | ||
490 | systemctl_LDADD = \ | |
491 | libsystemd-basic.la \ | |
492 | $(DBUS_LIBS) | |
493 | ||
494 | systemd_notify_SOURCES = \ | |
495 | src/notify.c \ | |
496 | src/sd-daemon.c | |
497 | ||
498 | systemd_notify_LDADD = \ | |
499 | libsystemd-basic.la | |
500 | ||
501 | systemd_install_SOURCES = \ | |
502 | src/install.c \ | |
503 | src/path-lookup.c \ | |
504 | src/dbus-common.c \ | |
505 | src/sd-daemon.c | |
506 | ||
507 | systemd_install_LDADD = \ | |
508 | libsystemd-basic.la \ | |
509 | $(DBUS_LIBS) | |
510 | ||
511 | systemd_install_CFLAGS = \ | |
512 | $(AM_CFLAGS) \ | |
513 | $(DBUS_CFLAGS) | |
514 | ||
515 | systemd_cgls_SOURCES = \ | |
516 | src/systemd-cgls.c \ | |
517 | src/cgroup-show.c \ | |
518 | src/cgroup-util.c | |
519 | ||
520 | systemd_cgls_CFLAGS = \ | |
521 | $(AM_CFLAGS) | |
522 | ||
523 | systemd_cgls_LDADD = \ | |
524 | libsystemd-basic.la | |
525 | ||
526 | systemadm_SOURCES = \ | |
527 | src/systemadm.vala \ | |
528 | src/systemd-interfaces.vala | |
529 | ||
530 | systemadm_CFLAGS = \ | |
531 | $(AM_CFLAGS) \ | |
532 | $(DBUSGLIB_CFLAGS) \ | |
533 | $(GTK_CFLAGS) \ | |
534 | -Wno-unused-variable \ | |
535 | -Wno-unused-function \ | |
536 | -Wno-shadow \ | |
537 | -Wno-format-nonliteral | |
538 | ||
539 | systemadm_VALAFLAGS = \ | |
540 | --pkg=dbus-glib-1 \ | |
541 | --pkg=posix \ | |
542 | --pkg=gtk+-2.0 \ | |
543 | -g | |
544 | ||
545 | systemadm_LDADD = \ | |
546 | $(DBUSGLIB_LIBS) \ | |
547 | $(GTK_LIBS) | |
548 | ||
549 | pam_systemd_la_SOURCES = \ | |
550 | src/pam-module.c \ | |
551 | src/cgroup-util.c \ | |
552 | src/sd-daemon.c | |
553 | ||
554 | pam_systemd_la_CFLAGS = \ | |
555 | $(AM_CFLAGS) | |
556 | -fvisibility=hidden | |
557 | ||
558 | pam_systemd_la_LDFLAGS = \ | |
559 | -module \ | |
560 | -export-dynamic \ | |
561 | -avoid-version \ | |
562 | -shared \ | |
563 | -export-symbols-regex '^pam_sm_.*' | |
564 | ||
565 | pam_systemd_la_LIBADD = \ | |
566 | libsystemd-basic.la \ | |
567 | $(PAM_LIBS) | |
568 | ||
569 | SED_PROCESS = \ | |
570 | $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \ | |
571 | $(SED) -e 's,@rootlibexecdir\@,$(rootlibexecdir),g' \ | |
572 | -e 's,@SPECIAL_SYSLOG_SERVICE\@,$(SPECIAL_SYSLOG_SERVICE),g' \ | |
573 | -e 's,@SYSTEMCTL\@,$(rootbindir)/systemctl,g' \ | |
574 | -e 's,@pkgsysconfdir\@,$(pkgsysconfdir),g' \ | |
575 | -e 's,@pkgdatadir\@,$(pkgdatadir),g' \ | |
576 | -e 's,@systemunitdir\@,$(systemunitdir),g' \ | |
577 | -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \ | |
578 | -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \ | |
579 | -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' \ | |
580 | -e 's,@prefix\@,$(prefix),g' \ | |
581 | < $< > $@ | |
582 | ||
583 | units/%: units/%.in Makefile | |
584 | $(SED_PROCESS) | |
585 | ||
586 | man/%: man/%.in Makefile | |
587 | $(SED_PROCESS) | |
588 | ||
589 | %.pc: %.pc.in Makefile | |
590 | $(SED_PROCESS) | |
591 | ||
592 | M4_PROCESS_SYSTEM = \ | |
593 | $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \ | |
594 | $(M4) -P $(M4_DISTRO_FLAG) -DFOR_SYSTEM=1 < $< > $@ | |
595 | ||
596 | M4_PROCESS_SESSION = \ | |
597 | $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \ | |
598 | $(M4) -P $(M4_DISTRO_FLAG) -DFOR_SESSION=1 < $< > $@ | |
599 | ||
600 | units/%: units/%.m4 Makefile | |
601 | $(M4_PROCESS_SYSTEM) | |
602 | ||
603 | units/session/%: units/%.m4 Makefile | |
604 | $(M4_PROCESS_SESSION) | |
605 | ||
606 | CLEANFILES = \ | |
607 | $(nodist_systemunit_DATA) \ | |
608 | $(nodist_sessionunit_DATA) \ | |
609 | $(nodist_man_MANS) \ | |
610 | ${XML_IN_FILES:.xml.in=.html} \ | |
611 | $(pkgconfigdata_DATA) | |
612 | ||
613 | if HAVE_VALAC | |
614 | CLEANFILES += \ | |
615 | ${systemadm_SOURCES:.vala=.c} | |
616 | endif | |
617 | ||
618 | if HAVE_XSLTPROC | |
619 | XSLTPROC_FLAGS = \ | |
620 | --nonet \ | |
621 | --param funcsynopsis.style "'ansi'" | |
622 | ||
623 | XSLTPROC_PROCESS_MAN = \ | |
624 | $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \ | |
625 | $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< | |
626 | ||
627 | XSLTPROC_PROCESS_MAN_IN = \ | |
628 | $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \ | |
629 | $(XSLTPROC) -o ${@:.in=} $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< && \ | |
630 | mv ${@:.in=} $@ | |
631 | ||
632 | XSLTPROC_PROCESS_HTML = \ | |
633 | $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \ | |
634 | $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $< | |
635 | ||
636 | XSLTPROC_PROCESS_HTML_IN = \ | |
637 | $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \ | |
638 | $(XSLTPROC) -o ${@:.in=} $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $< && \ | |
639 | mv ${@:.in=} $@ | |
640 | ||
641 | man/%.1: man/%.xml | |
642 | $(XSLTPROC_PROCESS_MAN) | |
643 | ||
644 | man/%.1.in: man/%.xml.in | |
645 | $(XSLTPROC_PROCESS_MAN) | |
646 | ||
647 | man/%.3: man/%.xml | |
648 | $(XSLTPROC_PROCESS_MAN) | |
649 | ||
650 | man/%.3.in: man/%.xml.in | |
651 | $(XSLTPROC_PROCESS_MAN) | |
652 | ||
653 | man/%.5: man/%.xml | |
654 | $(XSLTPROC_PROCESS_MAN) | |
655 | ||
656 | man/%.5.in: man/%.xml.in | |
657 | $(XSLTPROC_PROCESS_MAN) | |
658 | ||
659 | man/%.7: man/%.xml | |
660 | $(XSLTPROC_PROCESS_MAN) | |
661 | ||
662 | man/%.7.in: man/%.xml.in | |
663 | $(XSLTPROC_PROCESS_MAN_IN) | |
664 | ||
665 | man/%.8: man/%.xml | |
666 | $(XSLTPROC_PROCESS_MAN) | |
667 | ||
668 | man/%.8.in: man/%.xml.in | |
669 | $(XSLTPROC_PROCESS_MAN_IN) | |
670 | ||
671 | man/%.html: man/%.xml | |
672 | $(XSLTPROC_PROCESS_HTML) | |
673 | ||
674 | man/%.html.in: man/%.xml.in | |
675 | $(XSLTPROC_PROCESS_HTML_IN) | |
676 | ||
677 | CLEANFILES += \ | |
678 | $(dist_man_MANS) \ | |
679 | ${nodist_man_MANS:=.in} \ | |
680 | ${XML_FILES:.xml=.html} \ | |
681 | ${XML_IN_FILES:.xml.in=.html.in} | |
682 | endif | |
683 | ||
684 | org.freedesktop.systemd1.%.xml: systemd | |
685 | $(AM_V_GEN)SYSTEMD_SKIP_API_MOUNTS=1 ./systemd --introspect=${@:.xml=} > $@ | |
686 | ||
687 | CLEANFILES += \ | |
688 | $(dbusinterface_DATA) | |
689 | ||
690 | install-data-hook: | |
691 | $(MKDIR_P) -m 0755 \ | |
692 | $(DESTDIR)$(systemunitdir) \ | |
693 | $(DESTDIR)$(sessionunitdir) \ | |
694 | $(DESTDIR)$(systemunitdir)/sockets.target.wants \ | |
695 | $(DESTDIR)$(systemunitdir)/sysinit.target.wants \ | |
696 | $(DESTDIR)$(pkgsysconfdir)/system \ | |
697 | $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants \ | |
698 | $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants \ | |
699 | $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants \ | |
700 | $(DESTDIR)$(pkgsysconfdir)/session \ | |
701 | $(DESTDIR)$(sysconfdir)/xdg/systemd | |
702 | $(MKDIR_P) -m 0755 $(DESTDIR)/cgroup || \ | |
703 | echo "Don't forget to create /cgroup! Couldn't create it for you, continuing anyway." | |
704 | ( cd $(DESTDIR)$(sysconfdir)/xdg/systemd/ && \ | |
705 | rm -f session && \ | |
706 | $(LN_S) $(pkgsysconfdir)/session session ) | |
707 | ( cd $(DESTDIR)$(systemunitdir)/sockets.target.wants && \ | |
708 | rm -f systemd-initctl.socket systemd-logger.socket && \ | |
709 | $(LN_S) ../systemd-logger.socket systemd-logger.socket && \ | |
710 | $(LN_S) ../systemd-initctl.socket systemd-initctl.socket ) | |
711 | ( cd $(DESTDIR)$(sessionunitdir) && \ | |
712 | rm -f shutdown.target sockets.target local-fs.target swap.target && \ | |
713 | $(LN_S) $(systemunitdir)/shutdown.target shutdown.target && \ | |
714 | $(LN_S) $(systemunitdir)/sockets.target sockets.target && \ | |
715 | $(LN_S) $(systemunitdir)/local-fs.target local-fs.target && \ | |
716 | $(LN_S) $(systemunitdir)/swap.target swap.target ) | |
717 | ( cd $(DESTDIR)$(systemunitdir) && \ | |
718 | rm -f runlevel0.target runlevel1.target runlevel6.target && \ | |
719 | $(LN_S) poweroff.target runlevel0.target && \ | |
720 | $(LN_S) rescue.target runlevel1.target && \ | |
721 | $(LN_S) reboot.target runlevel6.target ) | |
722 | ( cd $(DESTDIR)$(pkgsysconfdir)/system && \ | |
723 | rm -f default.target ctrl-alt-del.target kbrequest.target && \ | |
724 | $(LN_S) $(systemunitdir)/graphical.target default.target && \ | |
725 | $(LN_S) $(systemunitdir)/reboot.target ctrl-alt-del.target && \ | |
726 | $(LN_S) $(systemunitdir)/rescue.target kbrequest.target && \ | |
727 | rm -f runlevel2.target runlevel3.target runlevel4.target runlevel5.target && \ | |
728 | $(LN_S) $(systemunitdir)/multi-user.target runlevel2.target && \ | |
729 | $(LN_S) $(systemunitdir)/multi-user.target runlevel3.target && \ | |
730 | $(LN_S) $(systemunitdir)/multi-user.target runlevel4.target && \ | |
731 | $(LN_S) $(systemunitdir)/graphical.target runlevel5.target ) | |
732 | ( cd $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants && \ | |
733 | rm -f getty@tty1.service getty@tty2.service getty@tty3.service getty@tty4.service getty@tty5.service getty@tty6.service && \ | |
734 | $(LN_S) $(systemunitdir)/getty@.service getty@tty1.service && \ | |
735 | $(LN_S) $(systemunitdir)/getty@.service getty@tty2.service && \ | |
736 | $(LN_S) $(systemunitdir)/getty@.service getty@tty3.service && \ | |
737 | $(LN_S) $(systemunitdir)/getty@.service getty@tty4.service && \ | |
738 | $(LN_S) $(systemunitdir)/getty@.service getty@tty5.service && \ | |
739 | $(LN_S) $(systemunitdir)/getty@.service getty@tty6.service ) | |
740 | ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \ | |
741 | rm -f getty.target remote-fs.target && \ | |
742 | $(LN_S) $(systemunitdir)/getty.target getty.target && \ | |
743 | $(LN_S) $(systemunitdir)/remote-fs.target remote-fs.target ) | |
744 | ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \ | |
745 | rm -f dev-hugepages.automount \ | |
746 | dev-mqueue.automount \ | |
747 | proc-sys-fs-binfmt_misc.automount \ | |
748 | sys-kernel-debug.automount \ | |
749 | sys-kernel-security.automount && \ | |
750 | $(LN_S) ../dev-hugepages.automount dev-hugepages.automount && \ | |
751 | $(LN_S) ../dev-mqueue.automount dev-mqueue.automount && \ | |
752 | $(LN_S) ../proc-sys-fs-binfmt_misc.automount proc-sys-fs-binfmt_misc.automount && \ | |
753 | $(LN_S) ../sys-kernel-debug.automount sys-kernel-debug.automount && \ | |
754 | $(LN_S) ../sys-kernel-security.automount sys-kernel-security.automount ) | |
755 | ( cd $(DESTDIR)$(dbussessionservicedir) && \ | |
756 | rm -f org.freedesktop.systemd1.service && \ | |
757 | $(LN_S) ../system-services/org.freedesktop.systemd1.service org.freedesktop.systemd1.service ) | |
758 | if TARGET_FEDORA | |
759 | $(MKDIR_P) -m 0755 \ | |
760 | $(DESTDIR)$(SYSTEM_SYSVINIT_PATH) \ | |
761 | $(DESTDIR)$(systemunitdir)/rescue.target.wants | |
762 | ( cd $(DESTDIR)$(pkgsysconfdir)/system && \ | |
763 | rm -f display-manager.service && \ | |
764 | $(LN_S) $(systemunitdir)/prefdm.service display-manager.service ) | |
765 | ( cd $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants && \ | |
766 | rm -f prefdm.service && \ | |
767 | $(LN_S) $(systemunitdir)/prefdm.service prefdm.service ) | |
768 | ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \ | |
769 | rm -f rc-local.service && \ | |
770 | $(LN_S) $(systemunitdir)/rc-local.service rc-local.service ) | |
771 | ( cd $(DESTDIR)$(systemunitdir)/rescue.target.wants && \ | |
772 | rm -f single.service && \ | |
773 | $(LN_S) $(systemunitdir)/single.service single.service ) | |
774 | ( cd $(DESTDIR)$(systemunitdir) && \ | |
775 | rm -f local.service && \ | |
776 | $(LN_S) rc-local.service local.service ) | |
777 | ( cd $(DESTDIR)$(SYSTEM_SYSVINIT_PATH) && \ | |
778 | $(LN_S) halt reboot > /dev/null 2>&1 || true ) | |
779 | endif | |
780 | if TARGET_GENTOO | |
781 | ( cd $(DESTDIR)$(pkgsysconfdir)/system && \ | |
782 | rm -f display-manager.service && \ | |
783 | $(LN_S) $(systemunitdir)/xdm.service display-manager.service ) | |
784 | ( cd $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants && \ | |
785 | rm -f xdm.service && \ | |
786 | $(LN_S) $(systemunitdir)/xdm.service xdm.service ) | |
787 | endif | |
788 | ||
789 | DISTCHECK_CONFIGURE_FLAGS = \ | |
790 | --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \ | |
791 | --with-dbussessionservicedir=$$dc_install_base/$(dbussessionservicedir) \ | |
792 | --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \ | |
793 | --with-dbusinterfacedir=$$dc_install_base/$(dbusinterfacedir) \ | |
794 | --with-udevrulesdir=$$dc_install_base/$(udevrulesdir) \ | |
795 | --with-pamlibdir=$$dc_install_base/$(pamlibdir) \ | |
796 | --with-rootdir=$$dc_install_base/$(rootdir) | |
797 | ||
798 | upload: all distcheck | |
799 | cp -v systemd-$(VERSION).tar.bz2 /home/lennart/cvs.fedora/systemd/devel/ | |
800 | scp systemd-$(VERSION).tar.bz2 fdo:/srv/www.freedesktop.org/www/software/systemd/ | |
801 | scp man/*.html tango:public/systemd-man/ | |
802 | ||
803 | git-tag: | |
804 | git tag "v$(VERSION)" -m "systemd $(VERSION)" |