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