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