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