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