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