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