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