chiark / gitweb /
logind: implement SetUserLinger() D-Bus call
[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 polkitpolicydir=$(datadir)/polkit-1/actions
29 bashcompletiondir=$(sysconfdir)/bash_completion.d
30
31 # Our own, non-special dirs
32 pkgsysconfdir=$(sysconfdir)/systemd
33 userunitdir=$(prefix)/lib/systemd/user
34 tmpfilesdir=$(prefix)/lib/tmpfiles.d
35 usergeneratordir=$(pkglibexecdir)/user-generators
36
37 # And these are the special ones for /
38 rootdir=@rootdir@
39 rootbindir=$(rootdir)/bin
40 rootlibexecdir=$(rootdir)/lib/systemd
41 systemgeneratordir=$(rootlibexecdir)/system-generators
42 systemshutdowndir=$(rootlibexecdir)/system-shutdown
43 systemunitdir=$(rootdir)/lib/systemd/system
44
45 AM_CPPFLAGS = \
46         -include $(top_builddir)/config.h \
47         -DSYSTEM_CONFIG_FILE=\"$(pkgsysconfdir)/system.conf\" \
48         -DSYSTEM_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/system\" \
49         -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" \
50         -DSYSTEM_SYSVINIT_PATH=\"$(SYSTEM_SYSVINIT_PATH)\" \
51         -DSYSTEM_SYSVRCND_PATH=\"$(SYSTEM_SYSVRCND_PATH)\" \
52         -DUSER_CONFIG_FILE=\"$(pkgsysconfdir)/user.conf\" \
53         -DUSER_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/user\" \
54         -DUSER_DATA_UNIT_PATH=\"$(userunitdir)\" \
55         -DSYSTEMD_CGROUP_AGENT_PATH=\"$(rootlibexecdir)/systemd-cgroups-agent\" \
56         -DSYSTEMD_BINARY_PATH=\"$(rootbindir)/systemd\" \
57         -DSYSTEMD_SHUTDOWN_BINARY_PATH=\"$(rootlibexecdir)/systemd-shutdown\" \
58         -DSYSTEMCTL_BINARY_PATH=\"$(rootbindir)/systemctl\" \
59         -DSYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH=\"$(rootbindir)/systemd-tty-ask-password-agent\" \
60         -DSYSTEMD_STDIO_BRIDGE_BINARY_PATH=\"$(bindir)/systemd-stdio-bridge\" \
61         -DRUNTIME_DIR=\"/run\" \
62         -DRANDOM_SEED=\"$(localstatedir)/lib/random-seed\" \
63         -DSYSTEMD_CRYPTSETUP_PATH=\"$(rootlibexecdir)/systemd-cryptsetup\" \
64         -DSYSTEM_GENERATOR_PATH=\"$(systemgeneratordir)\" \
65         -DUSER_GENERATOR_PATH=\"$(usergeneratordir)\" \
66         -DSYSTEM_SHUTDOWN_PATH=\"$(systemshutdowndir)\" \
67         -I $(top_srcdir)/src
68
69 if TARGET_GENTOO
70 AM_CPPFLAGS += \
71         -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
72         -DKBD_SETFONT=\"/usr/bin/setfont\" \
73         -DDEFAULT_FONT=\"LatArCyrHeb-16\"
74 else
75 if TARGET_ARCH
76 AM_CPPFLAGS += \
77         -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
78         -DKBD_SETFONT=\"/usr/bin/setfont\" \
79         -DDEFAULT_FONT=\"LatArCyrHeb-16\"
80 else
81 if TARGET_FRUGALWARE
82 AM_CPPFLAGS += \
83         -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
84         -DKBD_SETFONT=\"/usr/bin/setfont\" \
85         -DDEFAULT_FONT=\"LatArCyrHeb-16\"
86 else
87 if TARGET_MANDRIVA
88 AM_CPPFLAGS += \
89         -DKBD_LOADKEYS=\"/bin/loadkeys\" \
90         -DKBD_SETFONT=\"/bin/setfont\" \
91         -DDEFAULT_FONT=\"LatArCyrHeb-16\"
92 else
93 if TARGET_MEEGO
94 AM_CPPFLAGS += \
95         -DKBD_LOADKEYS=\"/bin/loadkeys\" \
96         -DKBD_SETFONT=\"/bin/setfont\" \
97         -DDEFAULT_FONT=\"LatArCyrHeb-16\"
98 else
99 if TARGET_ANGSTROM
100 AM_CPPFLAGS += \
101         -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
102         -DKBD_SETFONT=\"/usr/bin/setfont\" \
103         -DDEFAULT_FONT=\"LatArCyrHeb-16\"
104 else
105 AM_CPPFLAGS += \
106         -DKBD_LOADKEYS=\"/bin/loadkeys\" \
107         -DKBD_SETFONT=\"/bin/setfont\" \
108         -DDEFAULT_FONT=\"latarcyrheb-sun16\"
109 endif
110 endif
111 endif
112 endif
113 endif
114 endif
115
116 rootbin_PROGRAMS = \
117         systemd \
118         systemctl \
119         systemd-notify \
120         systemd-ask-password \
121         systemd-tty-ask-password-agent \
122         systemd-tmpfiles \
123         systemd-machine-id-setup
124
125 bin_PROGRAMS = \
126         systemd-cgls \
127         systemd-stdio-bridge \
128         systemd-nspawn
129
130 dist_bin_SCRIPTS = \
131         src/systemd-analyze
132
133 if HAVE_GTK
134 bin_PROGRAMS += \
135         systemadm \
136         systemd-gnome-ask-password-agent
137 endif
138
139 rootlibexec_PROGRAMS = \
140         systemd-logger \
141         systemd-cgroups-agent \
142         systemd-initctl \
143         systemd-update-utmp \
144         systemd-random-seed \
145         systemd-shutdownd \
146         systemd-shutdown \
147         systemd-modules-load \
148         systemd-remount-api-vfs \
149         systemd-kmsg-syslogd \
150         systemd-vconsole-setup \
151         systemd-reply-password \
152         systemd-readahead-collect \
153         systemd-readahead-replay \
154         systemd-user-sessions \
155         systemd-fsck \
156         systemd-quotacheck \
157         systemd-timestamp \
158         systemd-ac-power \
159         systemd-detect-virt \
160         systemd-sysctl \
161         systemd-hostnamed \
162         systemd-localed \
163         systemd-timedated \
164         systemd-logind \
165         systemd-uaccess
166
167 if ENABLE_BINFMT
168 rootlibexec_PROGRAMS += \
169         systemd-binfmt
170 endif
171
172 systemgenerator_PROGRAMS = \
173         systemd-getty-generator
174
175 if HAVE_LIBCRYPTSETUP
176 rootlibexec_PROGRAMS += \
177         systemd-cryptsetup
178
179 systemgenerator_PROGRAMS += \
180         systemd-cryptsetup-generator
181 endif
182
183 noinst_PROGRAMS = \
184         test-engine \
185         test-job-type \
186         test-ns \
187         test-loopback \
188         test-hostname \
189         test-daemon \
190         test-cgroup \
191         test-env-replace \
192         test-strv
193
194 if HAVE_PAM
195 pamlib_LTLIBRARIES = \
196         pam_systemd.la
197 endif
198
199 dist_pkgsysconf_DATA = \
200         src/system.conf
201
202 dist_dbuspolicy_DATA = \
203         src/org.freedesktop.systemd1.conf \
204         src/org.freedesktop.hostname1.conf \
205         src/org.freedesktop.locale1.conf \
206         src/org.freedesktop.timedate1.conf \
207         src/org.freedesktop.login1.conf
208
209 dist_dbussystemservice_DATA = \
210         src/org.freedesktop.systemd1.service \
211         src/org.freedesktop.hostname1.service \
212         src/org.freedesktop.locale1.service \
213         src/org.freedesktop.timedate1.service \
214         src/org.freedesktop.login1.service
215
216 dist_udevrules_DATA = \
217         src/99-systemd.rules
218
219 dbusinterface_DATA = \
220         org.freedesktop.systemd1.Manager.xml \
221         org.freedesktop.systemd1.Job.xml \
222         org.freedesktop.systemd1.Unit.xml \
223         org.freedesktop.systemd1.Service.xml \
224         org.freedesktop.systemd1.Socket.xml \
225         org.freedesktop.systemd1.Timer.xml \
226         org.freedesktop.systemd1.Target.xml \
227         org.freedesktop.systemd1.Device.xml \
228         org.freedesktop.systemd1.Mount.xml \
229         org.freedesktop.systemd1.Automount.xml \
230         org.freedesktop.systemd1.Snapshot.xml \
231         org.freedesktop.systemd1.Swap.xml \
232         org.freedesktop.systemd1.Path.xml \
233         org.freedesktop.hostname1.xml \
234         org.freedesktop.locale1.xml \
235         org.freedesktop.timedate1.xml
236
237 dist_bashcompletion_DATA = \
238         src/systemctl-bash-completion.sh
239
240 dist_tmpfiles_DATA = \
241         tmpfiles.d/systemd.conf \
242         tmpfiles.d/x11.conf
243
244 if HAVE_SYSV_COMPAT
245 dist_tmpfiles_DATA += \
246         tmpfiles.d/legacy.conf
247 endif
248
249 dist_systemunit_DATA = \
250         units/graphical.target \
251         units/multi-user.target \
252         units/emergency.service \
253         units/emergency.target \
254         units/sysinit.target \
255         units/basic.target \
256         units/getty.target \
257         units/halt.target \
258         units/kexec.target \
259         units/local-fs.target \
260         units/remote-fs.target \
261         units/cryptsetup.target \
262         units/network.target \
263         units/nss-lookup.target \
264         units/mail-transfer-agent.target \
265         units/http-daemon.target \
266         units/poweroff.target \
267         units/reboot.target \
268         units/rescue.target \
269         units/rpcbind.target \
270         units/time-sync.target \
271         units/shutdown.target \
272         units/final.target \
273         units/umount.target \
274         units/sigpwr.target \
275         units/sockets.target \
276         units/swap.target \
277         units/systemd-initctl.socket \
278         units/systemd-logger.socket \
279         units/systemd-shutdownd.socket \
280         units/syslog.socket \
281         units/dev-hugepages.automount \
282         units/dev-hugepages.mount \
283         units/dev-mqueue.automount \
284         units/dev-mqueue.mount \
285         units/sys-kernel-debug.automount \
286         units/sys-kernel-debug.mount \
287         units/sys-kernel-security.automount \
288         units/sys-kernel-security.mount \
289         units/var-run.mount \
290         units/media.mount \
291         units/remount-rootfs.service \
292         units/printer.target \
293         units/sound.target \
294         units/bluetooth.target \
295         units/smartcard.target \
296         units/systemd-readahead-done.timer \
297         units/systemd-tmpfiles-clean.timer \
298         units/quotaon.service \
299         units/systemd-ask-password-wall.path \
300         units/systemd-ask-password-console.path \
301         units/syslog.target
302
303 if HAVE_SYSV_COMPAT
304 dist_systemunit_DATA += \
305         units/var-lock.mount
306 endif
307
308 if ENABLE_BINFMT
309 dist_systemunit_DATA += \
310         units/proc-sys-fs-binfmt_misc.automount \
311         units/proc-sys-fs-binfmt_misc.mount
312 endif
313
314 nodist_systemunit_DATA = \
315         units/getty@.service \
316         units/serial-getty@.service \
317         units/console-shell.service \
318         units/systemd-initctl.service \
319         units/systemd-logger.service \
320         units/systemd-shutdownd.service \
321         units/systemd-hostnamed.service \
322         units/systemd-localed.service \
323         units/systemd-timedated.service \
324         units/systemd-logind.service \
325         units/systemd-kmsg-syslogd.service \
326         units/systemd-modules-load.service \
327         units/systemd-vconsole-setup.service \
328         units/systemd-remount-api-vfs.service \
329         units/systemd-update-utmp-runlevel.service \
330         units/systemd-update-utmp-shutdown.service \
331         units/systemd-random-seed-save.service \
332         units/systemd-random-seed-load.service \
333         units/systemd-readahead-collect.service \
334         units/systemd-readahead-replay.service \
335         units/systemd-readahead-done.service \
336         units/systemd-tmpfiles-setup.service \
337         units/systemd-tmpfiles-clean.service \
338         units/systemd-user-sessions.service \
339         units/systemd-ask-password-wall.service \
340         units/systemd-ask-password-console.service \
341         units/systemd-sysctl.service \
342         units/halt.service \
343         units/poweroff.service \
344         units/reboot.service \
345         units/kexec.service \
346         units/fsck@.service \
347         units/fsck-root.service \
348         units/quotacheck.service \
349         units/rescue.service
350
351 if ENABLE_BINFMT
352 nodist_systemunit_DATA += \
353         units/systemd-binfmt.service
354 endif
355
356 dist_userunit_DATA = \
357         units/user/default.target \
358         units/user/exit.target
359
360 nodist_userunit_DATA = \
361         units/user/exit.service
362
363 EXTRA_DIST = \
364         units/getty@.service.m4 \
365         units/serial-getty@.service.m4 \
366         units/console-shell.service.m4 \
367         units/rescue.service.m4 \
368         units/systemd-initctl.service.in \
369         units/systemd-logger.service.in \
370         units/systemd-shutdownd.service.in \
371         units/systemd-hostnamed.service.in \
372         units/systemd-localed.service.in \
373         units/systemd-timedated.service.in \
374         units/systemd-logind.service.in \
375         units/systemd-kmsg-syslogd.service.in \
376         units/systemd-modules-load.service.in \
377         units/systemd-vconsole-setup.service.in \
378         units/systemd-remount-api-vfs.service.in \
379         units/systemd-update-utmp-runlevel.service.in \
380         units/systemd-update-utmp-shutdown.service.in \
381         units/systemd-random-seed-save.service.in \
382         units/systemd-random-seed-load.service.in \
383         units/systemd-readahead-collect.service.in \
384         units/systemd-readahead-replay.service.in \
385         units/systemd-readahead-done.service.in \
386         units/systemd-tmpfiles-setup.service.in \
387         units/systemd-tmpfiles-clean.service.in \
388         units/systemd-user-sessions.service.in \
389         units/systemd-ask-password-wall.service.in \
390         units/systemd-ask-password-console.service.in \
391         units/systemd-sysctl.service.in \
392         units/halt.service.in \
393         units/poweroff.service.in \
394         units/reboot.service.in \
395         units/kexec.service.in \
396         units/user/exit.service.in \
397         units/fsck@.service.in \
398         units/fsck-root.service.in \
399         units/quotacheck.service.in \
400         systemd.pc.in \
401         introspect.awk \
402         src/org.freedesktop.systemd1.policy.in
403
404 if ENABLE_BINFMT
405 EXTRA_DIST += \
406         units/systemd-binfmt.service.in
407 endif
408
409 if TARGET_FEDORA
410 dist_systemunit_DATA += \
411         units/fedora/prefdm.service \
412         units/fedora/rc-local.service \
413         units/fedora/halt-local.service
414 endif
415
416 if TARGET_MANDRIVA
417 dist_systemunit_DATA += \
418         units/mandriva/prefdm.service \
419         units/fedora/rc-local.service \
420         units/fedora/halt-local.service
421 endif
422
423 if TARGET_FRUGALWARE
424 dist_systemunit_DATA += \
425         units/frugalware/display-manager.service
426 endif
427
428 if HAVE_PLYMOUTH
429 dist_systemunit_DATA += \
430         units/plymouth-start.service \
431         units/plymouth-read-write.service \
432         units/plymouth-quit.service \
433         units/plymouth-quit-wait.service \
434         units/plymouth-reboot.service \
435         units/plymouth-kexec.service \
436         units/plymouth-poweroff.service \
437         units/plymouth-halt.service \
438         units/systemd-ask-password-plymouth.path
439
440 nodist_systemunit_DATA += \
441         units/systemd-ask-password-plymouth.service
442
443 EXTRA_DIST += \
444         units/systemd-ask-password-plymouth.service.in
445 endif
446
447 dist_doc_DATA = \
448         README \
449         LICENSE \
450         DISTRO_PORTING \
451         src/sd-daemon.h \
452         src/sd-daemon.c \
453         src/sd-readahead.h \
454         src/sd-readahead.c
455
456 pkgconfigdata_DATA = \
457         systemd.pc
458
459 nodist_polkitpolicy_DATA = \
460         src/org.freedesktop.systemd1.policy
461
462 dist_polkitpolicy_DATA = \
463         src/org.freedesktop.hostname1.policy \
464         src/org.freedesktop.locale1.policy \
465         src/org.freedesktop.timedate1.policy \
466         src/org.freedesktop.login1.policy
467
468 noinst_LTLIBRARIES = \
469         libsystemd-basic.la \
470         libsystemd-core.la \
471         libsystemd-daemon.la
472
473 libsystemd_basic_la_SOURCES = \
474         src/util.c \
475         src/label.c \
476         src/hashmap.c \
477         src/set.c \
478         src/strv.c \
479         src/conf-parser.c \
480         src/socket-util.c \
481         src/log.c \
482         src/ratelimit.c \
483         src/exit-status.c
484
485 libsystemd_basic_la_CFLAGS = \
486         $(AM_CFLAGS) \
487         $(SELINUX_CFLAGS)
488
489 libsystemd_basic_la_LIBADD = \
490         $(SELINUX_LIBS)
491
492 libsystemd_core_la_SOURCES = \
493         src/unit.c \
494         src/job.c \
495         src/manager.c \
496         src/path-lookup.c \
497         src/load-fragment.c \
498         src/service.c \
499         src/automount.c \
500         src/mount.c \
501         src/swap.c \
502         src/device.c \
503         src/target.c \
504         src/snapshot.c \
505         src/socket.c \
506         src/timer.c \
507         src/path.c \
508         src/load-dropin.c \
509         src/execute.c \
510         src/utmp-wtmp.c \
511         src/dbus.c \
512         src/dbus-manager.c \
513         src/dbus-unit.c \
514         src/dbus-job.c \
515         src/dbus-service.c \
516         src/dbus-socket.c \
517         src/dbus-timer.c \
518         src/dbus-target.c \
519         src/dbus-mount.c \
520         src/dbus-automount.c \
521         src/dbus-swap.c \
522         src/dbus-snapshot.c \
523         src/dbus-device.c \
524         src/dbus-execute.c \
525         src/dbus-path.c \
526         src/cgroup.c \
527         src/mount-setup.c \
528         src/hostname-setup.c \
529         src/selinux-setup.c \
530         src/loopback-setup.c \
531         src/kmod-setup.c \
532         src/locale-setup.c \
533         src/machine-id-setup.c \
534         src/specifier.c \
535         src/unit-name.c \
536         src/fdset.c \
537         src/namespace.c \
538         src/tcpwrap.c \
539         src/cgroup-util.c \
540         src/condition.c \
541         src/dbus-common.c
542
543 libsystemd_core_la_CFLAGS = \
544         $(AM_CFLAGS) \
545         $(DBUS_CFLAGS) \
546         $(UDEV_CFLAGS) \
547         $(LIBWRAP_CFLAGS) \
548         $(PAM_CFLAGS) \
549         $(AUDIT_CFLAGS)
550
551 libsystemd_core_la_LIBADD = \
552         libsystemd-basic.la \
553         $(DBUS_LIBS) \
554         $(UDEV_LIBS) \
555         $(LIBWRAP_LIBS) \
556         $(PAM_LIBS) \
557         $(AUDIT_LIBS)
558
559 libsystemd_daemon_la_SOURCES = \
560         src/sd-daemon.c
561
562 # This is needed because automake is buggy in how it generates the
563 # rules for C programs, but not Vala programs.  We therefore can't
564 # list the .h files as dependencies if we want make dist to work.
565
566 EXTRA_DIST += \
567         ${libsystemd_basic_la_SOURCES:.c=.h} \
568         ${libsystemd_core_la_SOURCES:.c=.h} \
569         ${libsystemd_daemon_la_SOURCES:.c=.h} \
570         src/macro.h \
571         src/def.h \
572         src/ioprio.h \
573         src/missing.h \
574         src/list.h \
575         src/securebits.h \
576         src/linux/auto_dev-ioctl.h \
577         src/linux/fanotify.h \
578         src/initreq.h \
579         src/sd-readahead.h \
580         src/special.h \
581         src/dbus-common.h \
582         src/bus-errors.h \
583         src/cgroup-show.h \
584         src/build.h \
585         src/shutdownd.h \
586         src/umount.h \
587         src/readahead-common.h \
588         src/ask-password-api.h
589
590 MANPAGES = \
591         man/systemd.1 \
592         man/systemctl.1 \
593         man/systemadm.1 \
594         man/systemd-cgls.1 \
595         man/systemd-nspawn.1 \
596         man/systemd-tmpfiles.8 \
597         man/systemd-notify.1 \
598         man/sd_notify.3 \
599         man/sd_readahead.3 \
600         man/sd_booted.3 \
601         man/sd_listen_fds.3 \
602         man/sd_is_fifo.3 \
603         man/systemd.unit.5 \
604         man/systemd.service.5 \
605         man/systemd.socket.5 \
606         man/systemd.mount.5 \
607         man/systemd.automount.5 \
608         man/systemd.swap.5 \
609         man/systemd.timer.5 \
610         man/systemd.path.5 \
611         man/systemd.target.5 \
612         man/systemd.device.5 \
613         man/systemd.snapshot.5 \
614         man/systemd.exec.5 \
615         man/daemon.7 \
616         man/sd-daemon.7 \
617         man/sd-readahead.7 \
618         man/runlevel.8 \
619         man/telinit.8 \
620         man/halt.8 \
621         man/shutdown.8 \
622         man/pam_systemd.8 \
623         man/systemd.conf.5 \
624         man/tmpfiles.d.5 \
625         man/hostname.5 \
626         man/machine-id.5 \
627         man/vconsole.conf.5 \
628         man/locale.conf.5 \
629         man/os-release.5 \
630         man/machine-info.5 \
631         man/modules-load.d.5 \
632         man/sysctl.d.5 \
633         man/systemd-ask-password.1
634
635 if ENABLE_BINFMT
636 MANPAGES += \
637         man/binfmt.d.5
638 endif
639
640 MANPAGES_ALIAS = \
641         man/reboot.8 \
642         man/poweroff.8 \
643         man/sd_is_socket.3 \
644         man/sd_is_socket_unix.3 \
645         man/sd_is_socket_inet.3 \
646         man/sd_notifyf.3 \
647         man/init.1
648
649 man/reboot.8: man/halt.8
650 man/poweroff.8: man/halt.8
651 man/sd_is_socket.3: man/sd_is_fifo.3
652 man/sd_is_socket_unix.3: man/sd_is_fifo.3
653 man/sd_is_socket_inet.3: man/sd_is_fifo.3
654 man/sd_notifyf.3: man/sd_notify.3
655 man/init.1: man/systemd.1
656
657 dist_man_MANS = \
658         $(MANPAGES) \
659         $(MANPAGES_ALIAS)
660
661 nodist_man_MANS = \
662         man/systemd.special.7
663
664 XML_FILES = \
665         ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
666
667 XML_IN_FILES = \
668         ${patsubst %.1,%.xml.in,${patsubst %.3,%.xml.in,${patsubst %.5,%.xml.in,${patsubst %.7,%.xml.in,${patsubst %.8,%.xml.in,$(nodist_man_MANS)}}}}}
669
670 dist_noinst_DATA = \
671         ${XML_FILES:.xml=.html}
672
673 nodist_noinst_DATA = \
674         ${XML_IN_FILES:.xml.in=.html}
675
676 EXTRA_DIST += \
677         $(XML_FILES) \
678         $(XML_IN_FILES) \
679         ${nodist_man_MANS:=.in} \
680         ${XML_IN_FILES:.xml.in=.html.in}
681
682 systemd_SOURCES = \
683         src/main.c
684
685 systemd_CFLAGS = \
686         $(AM_CFLAGS) \
687         $(DBUS_CFLAGS) \
688         $(UDEV_CFLAGS)
689
690 systemd_LDADD = \
691         libsystemd-core.la
692
693 test_engine_SOURCES = \
694         src/test-engine.c
695
696 test_engine_CFLAGS = $(systemd_CFLAGS)
697 test_engine_LDADD = $(systemd_LDADD)
698
699 test_job_type_SOURCES = \
700         src/test-job-type.c
701
702 test_job_type_CFLAGS = $(systemd_CFLAGS)
703 test_job_type_LDADD = $(systemd_LDADD)
704
705 test_ns_SOURCES = \
706         src/test-ns.c
707
708 test_ns_CFLAGS = $(systemd_CFLAGS)
709 test_ns_LDADD = $(systemd_LDADD)
710
711 test_loopback_SOURCES = \
712         src/test-loopback.c \
713         src/loopback-setup.c
714
715 test_loopback_LDADD = \
716         libsystemd-basic.la
717
718 test_hostname_SOURCES = \
719         src/test-hostname.c \
720         src/hostname-setup.c
721
722 test_hostname_LDADD = \
723         libsystemd-basic.la
724
725 test_daemon_SOURCES = \
726         src/test-daemon.c
727
728 test_daemon_LDADD = \
729         libsystemd-basic.la \
730         libsystemd-daemon.la
731
732 test_cgroup_SOURCES = \
733         src/test-cgroup.c \
734         src/cgroup-util.c
735
736 test_cgroup_CFLAGS = \
737         $(AM_CFLAGS)
738
739 test_cgroup_LDADD = \
740         libsystemd-basic.la
741
742 test_env_replace_SOURCES = \
743         src/test-env-replace.c
744
745 test_env_replace_CFLAGS = \
746         $(AM_CFLAGS)
747
748 test_env_replace_LDADD = \
749         libsystemd-basic.la
750
751 test_strv_SOURCES = \
752         src/test-strv.c \
753         src/specifier.c
754
755 test_strv_CFLAGS = \
756         $(AM_CFLAGS)
757
758 test_strv_LDADD = \
759         libsystemd-basic.la
760
761 systemd_logger_SOURCES = \
762         src/logger.c \
763         src/tcpwrap.c
764
765 systemd_logger_LDADD = \
766         libsystemd-basic.la \
767         libsystemd-daemon.la \
768         $(LIBWRAP_LIBS)
769
770 systemd_initctl_SOURCES = \
771         src/initctl.c \
772         src/dbus-common.c
773
774 systemd_initctl_CFLAGS = \
775         $(AM_CFLAGS) \
776         $(DBUS_CFLAGS)
777
778 systemd_initctl_LDADD = \
779         libsystemd-basic.la \
780         libsystemd-daemon.la \
781         $(DBUS_LIBS)
782
783 systemd_update_utmp_SOURCES = \
784         src/update-utmp.c \
785         src/dbus-common.c \
786         src/utmp-wtmp.c
787
788 systemd_update_utmp_CFLAGS = \
789         $(AM_CFLAGS) \
790         $(DBUS_CFLAGS) \
791         $(AUDIT_CFLAGS)
792
793 systemd_update_utmp_LDADD = \
794         libsystemd-basic.la \
795         $(DBUS_LIBS) \
796         $(AUDIT_LIBS)
797
798 systemd_random_seed_SOURCES = \
799         src/random-seed.c
800
801 systemd_random_seed_CFLAGS = \
802         $(AM_CFLAGS)
803
804 systemd_random_seed_LDADD = \
805         libsystemd-basic.la
806
807 systemd_shutdownd_SOURCES = \
808         src/utmp-wtmp.c \
809         src/shutdownd.c
810
811 systemd_shutdownd_CFLAGS = \
812         $(AM_CFLAGS)
813
814 systemd_shutdownd_LDADD = \
815         libsystemd-basic.la \
816         libsystemd-daemon.la
817
818 systemd_hostnamed_SOURCES = \
819         src/hostnamed.c \
820         src/dbus-common.c \
821         src/polkit.c
822
823 systemd_hostnamed_CFLAGS = \
824         $(AM_CFLAGS) \
825         $(DBUS_CFLAGS)
826
827 systemd_hostnamed_LDADD = \
828         libsystemd-basic.la \
829         libsystemd-daemon.la \
830         $(DBUS_LIBS)
831
832 systemd_localed_SOURCES = \
833         src/localed.c \
834         src/dbus-common.c \
835         src/polkit.c
836
837 systemd_localed_CFLAGS = \
838         $(AM_CFLAGS) \
839         $(DBUS_CFLAGS)
840
841 systemd_localed_LDADD = \
842         libsystemd-basic.la \
843         libsystemd-daemon.la \
844         $(DBUS_LIBS)
845
846 systemd_timedated_SOURCES = \
847         src/timedated.c \
848         src/dbus-common.c \
849         src/polkit.c
850
851 systemd_timedated_CFLAGS = \
852         $(AM_CFLAGS) \
853         $(DBUS_CFLAGS)
854
855 systemd_timedated_LDADD = \
856         libsystemd-basic.la \
857         libsystemd-daemon.la \
858         $(DBUS_LIBS)
859
860 systemd_logind_SOURCES = \
861         src/logind.c \
862         src/logind-dbus.c \
863         src/logind-device.c \
864         src/logind-seat.c \
865         src/logind-seat-dbus.c \
866         src/logind-session.c \
867         src/logind-session-dbus.c \
868         src/logind-user.c \
869         src/logind-user-dbus.c \
870         src/logind-acl.c \
871         src/dbus-common.c \
872         src/dbus-loop.c \
873         src/cgroup-util.c \
874         src/polkit.c
875
876 systemd_logind_CFLAGS = \
877         $(AM_CFLAGS) \
878         $(DBUS_CFLAGS) \
879         $(UDEV_CFLAGS) \
880         $(ACL_CFLAGS)
881
882 systemd_logind_LDADD = \
883         libsystemd-basic.la \
884         libsystemd-daemon.la \
885         $(DBUS_LIBS) \
886         $(UDEV_LIBS) \
887         $(ACL_LIBS)
888
889 systemd_uaccess_SOURCES = \
890         src/uaccess.c \
891         src/logind-acl.c
892
893 systemd_uaccess_CFLAGS = \
894         $(AM_CFLAGS) \
895         $(UDEV_CFLAGS) \
896         $(ACL_CFLAGS)
897
898 systemd_uaccess_LDADD = \
899         libsystemd-basic.la \
900         $(UDEV_LIBS) \
901         $(ACL_LIBS)
902
903 systemd_shutdown_SOURCES = \
904         src/mount-setup.c \
905         src/umount.c \
906         src/shutdown.c
907
908 systemd_shutdown_CFLAGS = \
909         $(AM_CFLAGS) \
910         $(UDEV_CFLAGS)
911
912 systemd_shutdown_LDADD = \
913         libsystemd-basic.la \
914         $(UDEV_LIBS)
915
916 systemd_modules_load_SOURCES = \
917         src/modules-load.c
918
919 systemd_modules_load_CFLAGS = \
920         $(AM_CFLAGS)
921
922 systemd_modules_load_LDADD = \
923         libsystemd-basic.la
924
925 systemd_tmpfiles_SOURCES = \
926         src/tmpfiles.c
927
928 systemd_tmpfiles_CFLAGS = \
929         $(AM_CFLAGS)
930
931 systemd_tmpfiles_LDADD = \
932         libsystemd-basic.la
933
934 systemd_machine_id_setup_SOURCES = \
935         src/machine-id-setup.c \
936         src/machine-id-main.c
937
938 systemd_machine_id_setup_CFLAGS = \
939         $(AM_CFLAGS)
940
941 systemd_machine_id_setup_LDADD = \
942         libsystemd-basic.la
943
944 systemd_sysctl_SOURCES = \
945         src/sysctl.c
946
947 systemd_sysctl_CFLAGS = \
948         $(AM_CFLAGS)
949
950 systemd_sysctl_LDADD = \
951         libsystemd-basic.la
952
953 systemd_binfmt_SOURCES = \
954         src/binfmt.c
955
956 systemd_binfmt_CFLAGS = \
957         $(AM_CFLAGS)
958
959 systemd_binfmt_LDADD = \
960         libsystemd-basic.la
961
962 systemd_fsck_SOURCES = \
963         src/fsck.c \
964         src/dbus-common.c
965
966 systemd_fsck_CFLAGS = \
967         $(AM_CFLAGS) \
968         $(UDEV_CFLAGS) \
969         $(DBUS_CFLAGS)
970
971 systemd_fsck_LDADD = \
972         libsystemd-basic.la \
973         $(UDEV_LIBS) \
974         $(DBUS_LIBS)
975
976 systemd_quotacheck_SOURCES = \
977         src/quotacheck.c
978
979 systemd_quotacheck_CFLAGS = \
980         $(AM_CFLAGS)
981
982 systemd_quotacheck_LDADD = \
983         libsystemd-basic.la
984
985 systemd_timestamp_SOURCES = \
986         src/timestamp.c
987
988 systemd_timestamp_CFLAGS = \
989         $(AM_CFLAGS)
990
991 systemd_timestamp_LDADD = \
992         libsystemd-basic.la
993
994 systemd_ac_power_SOURCES = \
995         src/ac-power.c
996
997 systemd_ac_power_CFLAGS = \
998         $(AM_CFLAGS) \
999         $(UDEV_CFLAGS)
1000
1001 systemd_ac_power_LDADD = \
1002         libsystemd-basic.la \
1003         $(UDEV_LIBS)
1004
1005 systemd_detect_virt_SOURCES = \
1006         src/detect-virt.c
1007
1008 systemd_detect_virt_CFLAGS = \
1009         $(AM_CFLAGS)
1010
1011 systemd_detect_virt_LDADD = \
1012         libsystemd-basic.la
1013
1014 systemd_cryptsetup_SOURCES = \
1015         src/cryptsetup.c \
1016         src/ask-password-api.c
1017
1018 systemd_cryptsetup_CFLAGS = \
1019         $(LIBCRYPTSETUP_CFLAGS) \
1020         $(UDEV_CFLAGS) \
1021         $(AM_CFLAGS)
1022
1023 systemd_cryptsetup_LDADD = \
1024         $(LIBCRYPTSETUP_LIBS) \
1025         $(UDEV_LIBS) \
1026         libsystemd-basic.la
1027
1028 systemd_cryptsetup_generator_SOURCES = \
1029         src/cryptsetup-generator.c \
1030         src/unit-name.c
1031
1032 systemd_cryptsetup_generator_CFLAGS = \
1033         $(AM_CFLAGS)
1034
1035 systemd_cryptsetup_generator_LDADD = \
1036         libsystemd-basic.la
1037
1038 systemd_getty_generator_SOURCES = \
1039         src/getty-generator.c \
1040         src/unit-name.c
1041
1042 systemd_getty_generator_CFLAGS = \
1043         $(AM_CFLAGS)
1044
1045 systemd_getty_generator_LDADD = \
1046         libsystemd-basic.la
1047
1048 systemd_user_sessions_SOURCES = \
1049         src/user-sessions.c \
1050         src/cgroup-util.c
1051
1052 systemd_user_sessions_CFLAGS = \
1053         $(AM_CFLAGS)
1054
1055 systemd_user_sessions_LDADD = \
1056         libsystemd-basic.la
1057
1058 systemd_vconsole_setup_SOURCES = \
1059         src/vconsole-setup.c
1060
1061 systemd_vconsole_setup_CFLAGS = \
1062         $(AM_CFLAGS)
1063
1064 systemd_vconsole_setup_LDADD = \
1065         libsystemd-basic.la
1066
1067 systemd_remount_api_vfs_SOURCES = \
1068         src/remount-api-vfs.c \
1069         src/mount-setup.c \
1070         src/exit-status.c
1071
1072 systemd_remount_api_vfs_CFLAGS = \
1073         $(AM_CFLAGS)
1074
1075 systemd_remount_api_vfs_LDADD = \
1076         libsystemd-basic.la
1077
1078 systemd_cgroups_agent_SOURCES = \
1079         src/cgroups-agent.c \
1080         src/dbus-common.c
1081
1082 systemd_cgroups_agent_CFLAGS = \
1083         $(AM_CFLAGS) \
1084         $(DBUS_CFLAGS)
1085
1086 systemd_cgroups_agent_LDADD = \
1087         libsystemd-basic.la \
1088         $(DBUS_LIBS)
1089
1090 systemd_kmsg_syslogd_SOURCES = \
1091         src/kmsg-syslogd.c \
1092         src/fdset.c
1093
1094 systemd_kmsg_syslogd_CFLAGS = \
1095         $(AM_CFLAGS)
1096
1097 systemd_kmsg_syslogd_LDADD = \
1098         libsystemd-basic.la \
1099         libsystemd-daemon.la
1100
1101 systemctl_SOURCES = \
1102         src/systemctl.c \
1103         src/utmp-wtmp.c \
1104         src/dbus-common.c \
1105         src/path-lookup.c \
1106         src/cgroup-show.c \
1107         src/cgroup-util.c \
1108         src/exit-status.c \
1109         src/unit-name.c
1110
1111 systemctl_CFLAGS = \
1112         $(AM_CFLAGS) \
1113         $(DBUS_CFLAGS)
1114
1115 systemctl_LDADD = \
1116         libsystemd-basic.la \
1117         libsystemd-daemon.la \
1118         $(DBUS_LIBS)
1119
1120 systemd_notify_SOURCES = \
1121         src/notify.c \
1122         src/sd-readahead.c
1123
1124 systemd_notify_LDADD = \
1125         libsystemd-basic.la \
1126         libsystemd-daemon.la
1127
1128 systemd_ask_password_SOURCES = \
1129         src/ask-password.c \
1130         src/ask-password-api.c
1131
1132 systemd_ask_password_LDADD = \
1133         libsystemd-basic.la
1134
1135 systemd_reply_password_SOURCES = \
1136         src/reply-password.c
1137
1138 systemd_reply_password_LDADD = \
1139         libsystemd-basic.la
1140
1141 systemd_readahead_collect_SOURCES = \
1142         src/readahead-collect.c \
1143         src/readahead-common.c
1144
1145 systemd_readahead_collect_CFLAGS = \
1146         $(UDEV_CFLAGS)
1147
1148 systemd_readahead_collect_LDADD = \
1149         libsystemd-basic.la \
1150         libsystemd-daemon.la \
1151         $(UDEV_LIBS)
1152
1153 systemd_readahead_replay_SOURCES = \
1154         src/readahead-replay.c \
1155         src/readahead-common.c
1156
1157 systemd_readahead_replay_CFLAGS = \
1158         $(UDEV_CFLAGS)
1159
1160 systemd_readahead_replay_LDADD = \
1161         libsystemd-basic.la \
1162         libsystemd-daemon.la \
1163         $(UDEV_LIBS)
1164
1165 systemd_cgls_SOURCES = \
1166         src/cgls.c \
1167         src/cgroup-show.c \
1168         src/cgroup-util.c
1169
1170 systemd_cgls_CFLAGS = \
1171         $(AM_CFLAGS)
1172
1173 systemd_cgls_LDADD = \
1174         libsystemd-basic.la
1175
1176 systemd_nspawn_SOURCES = \
1177         src/nspawn.c \
1178         src/cgroup-util.c
1179
1180 systemd_nspawn_CFLAGS = \
1181         $(AM_CFLAGS)
1182
1183 systemd_nspawn_LDADD = \
1184         libsystemd-basic.la \
1185         libsystemd-daemon.la
1186
1187 systemd_stdio_bridge_SOURCES = \
1188         src/bridge.c
1189
1190 systemd_stdio_bridge_LDADD = \
1191         libsystemd-basic.la
1192
1193 systemadm_SOURCES = \
1194         src/systemadm.vala \
1195         src/systemd-interfaces.vala
1196
1197 systemadm_CFLAGS = \
1198         $(AM_CFLAGS) \
1199         $(GTK_CFLAGS) \
1200         -Wno-unused-variable \
1201         -Wno-unused-function \
1202         -Wno-shadow \
1203         -Wno-format-nonliteral
1204
1205 systemadm_VALAFLAGS = \
1206         --pkg=posix \
1207         --pkg=gtk+-2.0 \
1208         -g
1209
1210 systemadm_LDADD = \
1211         $(GTK_LIBS)
1212
1213 systemd_gnome_ask_password_agent_SOURCES = \
1214         src/gnome-ask-password-agent.vala
1215
1216 systemd_gnome_ask_password_agent_CFLAGS = \
1217         $(AM_CFLAGS) \
1218         $(LIBNOTIFY_CFLAGS) \
1219         $(GTK_CFLAGS) \
1220         -Wno-unused-variable \
1221         -Wno-unused-function \
1222         -Wno-shadow \
1223         -Wno-format-nonliteral
1224
1225 systemd_gnome_ask_password_agent_VALAFLAGS = \
1226         --pkg=posix \
1227         --pkg=gtk+-2.0 \
1228         --pkg=linux \
1229         --pkg=gio-unix-2.0 \
1230         --pkg=libnotify
1231 if LIBNOTIFY07
1232 systemd_gnome_ask_password_agent_VALAFLAGS += \
1233         -D LIBNOTIFY07
1234 endif
1235 systemd_gnome_ask_password_agent_VALAFLAGS += \
1236         -g
1237
1238 systemd_gnome_ask_password_agent_LDADD = \
1239         $(LIBNOTIFY_LIBS) \
1240         $(GTK_LIBS)
1241
1242 systemd_tty_ask_password_agent_SOURCES = \
1243         src/tty-ask-password-agent.c \
1244         src/ask-password-api.c \
1245         src/utmp-wtmp.c
1246
1247 systemd_tty_ask_password_agent_LDADD = \
1248         libsystemd-basic.la
1249
1250 pam_systemd_la_SOURCES = \
1251         src/pam-module.c \
1252         src/dbus-common.c
1253
1254 pam_systemd_la_CFLAGS = \
1255         $(AM_CFLAGS) \
1256         $(PAM_CFLAGS) \
1257         $(DBUS_CFLAGS) \
1258         -fvisibility=hidden
1259
1260 pam_systemd_la_LDFLAGS = \
1261         -module \
1262         -export-dynamic \
1263         -avoid-version \
1264         -shared \
1265         -export-symbols-regex '^pam_sm_.*'
1266
1267 pam_systemd_la_LIBADD = \
1268         libsystemd-basic.la \
1269         libsystemd-daemon.la \
1270         $(PAM_LIBS) \
1271         $(DBUS_LIBS)
1272
1273 SED_PROCESS = \
1274         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1275         $(SED)  -e 's,@rootlibexecdir\@,$(rootlibexecdir),g' \
1276                 -e 's,@rootbindir\@,$(rootbindir),g' \
1277                 -e 's,@bindir\@,$(bindir),g' \
1278                 -e 's,@SYSTEMCTL\@,$(rootbindir)/systemctl,g' \
1279                 -e 's,@SYSTEMD_NOTIFY\@,$(rootbindir)/systemd-notify,g' \
1280                 -e 's,@pkgsysconfdir\@,$(pkgsysconfdir),g' \
1281                 -e 's,@pkgdatadir\@,$(pkgdatadir),g' \
1282                 -e 's,@pkglibexecdir\@,$(pkglibexecdir),g' \
1283                 -e 's,@systemunitdir\@,$(systemunitdir),g' \
1284                 -e 's,@userunitdir\@,$(userunitdir),g' \
1285                 -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
1286                 -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
1287                 -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' \
1288                 -e 's,@prefix\@,$(prefix),g' \
1289                 < $< > $@ || rm $@
1290
1291 units/%: units/%.in Makefile
1292         $(SED_PROCESS)
1293
1294 man/%: man/%.in Makefile
1295         $(SED_PROCESS)
1296
1297 %.pc: %.pc.in Makefile
1298         $(SED_PROCESS)
1299
1300 src/%.policy: src/%.policy.in Makefile
1301         $(SED_PROCESS)
1302
1303 M4_PROCESS_SYSTEM = \
1304         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1305         $(M4) -P $(M4_DISTRO_FLAG) -DFOR_SYSTEM=1 < $< > $@ || rm $@
1306
1307 M4_PROCESS_USER = \
1308         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1309         $(M4) -P $(M4_DISTRO_FLAG) -DFOR_USER=1 < $< > $@ || rm $@
1310
1311 units/%: units/%.m4 Makefile
1312         $(M4_PROCESS_SYSTEM)
1313
1314 units/user/%: units/%.m4 Makefile
1315         $(M4_PROCESS_USER)
1316
1317 CLEANFILES = \
1318         $(nodist_systemunit_DATA) \
1319         $(nodist_userunit_DATA) \
1320         $(nodist_man_MANS) \
1321         ${XML_IN_FILES:.xml.in=.html} \
1322         $(pkgconfigdata_DATA) \
1323         src/org.freedesktop.systemd1.policy
1324
1325 if HAVE_VALAC
1326 CLEANFILES += \
1327         ${systemadm_SOURCES:.vala=.c}
1328 endif
1329
1330 if HAVE_XSLTPROC
1331 XSLTPROC_FLAGS = \
1332         --nonet \
1333         --param funcsynopsis.style "'ansi'"
1334
1335 XSLTPROC_PROCESS_MAN = \
1336         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1337         $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
1338
1339 XSLTPROC_PROCESS_MAN_IN = \
1340         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1341         $(XSLTPROC) -o ${@:.in=} $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< && \
1342         mv ${@:.in=} $@
1343
1344 XSLTPROC_PROCESS_HTML = \
1345         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1346         $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $<
1347
1348 XSLTPROC_PROCESS_HTML_IN = \
1349         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1350         $(XSLTPROC) -o ${@:.in=} $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $< && \
1351         mv ${@:.in=} $@
1352
1353 man/%.1: man/%.xml
1354         $(XSLTPROC_PROCESS_MAN)
1355
1356 man/%.1.in: man/%.xml.in
1357         $(XSLTPROC_PROCESS_MAN)
1358
1359 man/%.3: man/%.xml
1360         $(XSLTPROC_PROCESS_MAN)
1361
1362 man/%.3.in: man/%.xml.in
1363         $(XSLTPROC_PROCESS_MAN)
1364
1365 man/%.5: man/%.xml
1366         $(XSLTPROC_PROCESS_MAN)
1367
1368 man/%.5.in: man/%.xml.in
1369         $(XSLTPROC_PROCESS_MAN)
1370
1371 man/%.7: man/%.xml
1372         $(XSLTPROC_PROCESS_MAN)
1373
1374 man/%.7.in: man/%.xml.in
1375         $(XSLTPROC_PROCESS_MAN_IN)
1376
1377 man/%.8: man/%.xml
1378         $(XSLTPROC_PROCESS_MAN)
1379
1380 man/%.8.in: man/%.xml.in
1381         $(XSLTPROC_PROCESS_MAN_IN)
1382
1383 man/%.html: man/%.xml
1384         $(XSLTPROC_PROCESS_HTML)
1385
1386 man/%.html.in: man/%.xml.in
1387         $(XSLTPROC_PROCESS_HTML_IN)
1388
1389 CLEANFILES += \
1390         $(dist_man_MANS) \
1391         ${nodist_man_MANS:=.in} \
1392         ${XML_FILES:.xml=.html} \
1393         ${XML_IN_FILES:.xml.in=.html.in}
1394 endif
1395
1396 DBUS_PREPROCESS = $(CPP) -P $(DBUS_CFLAGS) -imacros dbus/dbus-protocol.h
1397
1398 org.freedesktop.systemd1.%.xml: systemd
1399         $(AM_V_GEN)$(OBJCOPY) -O binary -j introspect.$* $< $@.tmp && \
1400                 $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
1401                 $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
1402
1403 org.freedesktop.hostname1.xml: systemd-hostnamed
1404         $(AM_V_GEN)$(OBJCOPY) -O binary -j introspect.hostname1 $< $@.tmp && \
1405                 $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
1406                 $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
1407
1408 org.freedesktop.locale1.xml: systemd-localed
1409         $(AM_V_GEN)$(OBJCOPY) -O binary -j introspect.locale1 $< $@.tmp && \
1410                 $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
1411                 $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
1412
1413 org.freedesktop.timedate1.xml: systemd-timedated
1414         $(AM_V_GEN)$(OBJCOPY) -O binary -j introspect.timedate1 $< $@.tmp && \
1415                 $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
1416                 $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
1417
1418 CLEANFILES += \
1419         $(dbusinterface_DATA)
1420
1421 install-data-hook:
1422         $(MKDIR_P) -m 0755 \
1423                 $(DESTDIR)$(tmpfilesdir) \
1424                 $(DESTDIR)$(sysconfdir)/tmpfiles.d \
1425                 $(DESTDIR)$(prefix)/lib/modules-load.d \
1426                 $(DESTDIR)$(sysconfdir)/modules-load.d \
1427                 $(DESTDIR)$(prefix)/lib/sysctl.d \
1428                 $(DESTDIR)$(sysconfdir)/sysctl.d \
1429                 $(DESTDIR)$(systemshutdowndir) \
1430                 $(DESTDIR)$(systemgeneratordir) \
1431                 $(DESTDIR)$(usergeneratordir)
1432 if ENABLE_BINFMT
1433         $(MKDIR_P) -m 0755 \
1434                 $(DESTDIR)$(prefix)/lib/binfmt.d \
1435                 $(DESTDIR)$(sysconfdir)/binfmt.d
1436 endif
1437         $(MKDIR_P) -m 0755 \
1438                 $(DESTDIR)$(systemunitdir) \
1439                 $(DESTDIR)$(userunitdir) \
1440                 $(DESTDIR)$(systemunitdir)/sysinit.target.wants \
1441                 $(DESTDIR)$(systemunitdir)/sockets.target.wants \
1442                 $(DESTDIR)$(systemunitdir)/basic.target.wants \
1443                 $(DESTDIR)$(systemunitdir)/shutdown.target.wants \
1444                 $(DESTDIR)$(systemunitdir)/local-fs.target.wants \
1445                 $(DESTDIR)$(systemunitdir)/runlevel1.target.wants \
1446                 $(DESTDIR)$(systemunitdir)/runlevel2.target.wants \
1447                 $(DESTDIR)$(systemunitdir)/runlevel3.target.wants \
1448                 $(DESTDIR)$(systemunitdir)/runlevel4.target.wants \
1449                 $(DESTDIR)$(systemunitdir)/runlevel5.target.wants \
1450                 $(DESTDIR)$(systemunitdir)/multi-user.target.wants \
1451                 $(DESTDIR)$(systemunitdir)/graphical.target.wants \
1452                 $(DESTDIR)$(pkgsysconfdir)/system \
1453                 $(DESTDIR)$(pkgsysconfdir)/system/sysinit.target.wants \
1454                 $(DESTDIR)$(pkgsysconfdir)/system/local-fs.target.wants \
1455                 $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants \
1456                 $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants \
1457                 $(DESTDIR)$(pkgsysconfdir)/user \
1458                 $(DESTDIR)$(dbussessionservicedir) \
1459                 $(DESTDIR)$(sysconfdir)/xdg/systemd
1460         ( cd $(DESTDIR)$(sysconfdir)/xdg/systemd/ && \
1461                 rm -f user && \
1462                 $(LN_S) $(pkgsysconfdir)/user user )
1463         ( cd $(DESTDIR)$(systemunitdir)/sockets.target.wants && \
1464                 rm -f systemd-initctl.socket systemd-logger.socket systemd-shutdownd.socket syslog.socket && \
1465                 $(LN_S) ../systemd-logger.socket systemd-logger.socket && \
1466                 $(LN_S) ../systemd-initctl.socket systemd-initctl.socket && \
1467                 $(LN_S) ../systemd-shutdownd.socket systemd-shutdownd.socket && \
1468                 $(LN_S) ../syslog.socket syslog.socket )
1469         ( cd $(DESTDIR)$(systemunitdir)/runlevel1.target.wants && \
1470                 rm -f systemd-update-utmp-runlevel.service && \
1471                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
1472         ( cd $(DESTDIR)$(systemunitdir)/runlevel2.target.wants && \
1473                 rm -f systemd-update-utmp-runlevel.service && \
1474                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
1475         ( cd $(DESTDIR)$(systemunitdir)/runlevel3.target.wants && \
1476                 rm -f systemd-update-utmp-runlevel.service && \
1477                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
1478         ( cd $(DESTDIR)$(systemunitdir)/runlevel4.target.wants && \
1479                 rm -f systemd-update-utmp-runlevel.service && \
1480                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
1481         ( cd $(DESTDIR)$(systemunitdir)/runlevel5.target.wants && \
1482                 rm -f systemd-update-utmp-runlevel.service && \
1483                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
1484         ( cd $(DESTDIR)$(systemunitdir)/shutdown.target.wants && \
1485                 rm -f systemd-update-utmp-shutdown.service \
1486                         systemd-random-seed-save.service && \
1487                 $(LN_S) ../systemd-update-utmp-shutdown.service systemd-update-utmp-shutdown.service && \
1488                 $(LN_S) ../systemd-random-seed-save.service systemd-random-seed-save.service )
1489         ( cd $(DESTDIR)$(systemunitdir)/local-fs.target.wants && \
1490                 rm -f systemd-remount-api-vfs.service \
1491                         fsck-root.service \
1492                         remount-rootfs.service \
1493                         var-run.mount \
1494                         media.mount && \
1495                 $(LN_S) ../systemd-remount-api-vfs.service systemd-remount-api-vfs.service && \
1496                 $(LN_S) ../fsck-root.service fsck-root.service && \
1497                 $(LN_S) ../remount-rootfs.service remount-rootfs.service && \
1498                 $(LN_S) ../var-run.mount var-run.mount && \
1499                 $(LN_S) ../media.mount media.mount )
1500         ( cd $(DESTDIR)$(userunitdir) && \
1501                 rm -f shutdown.target sockets.target bluetooth.target printer.target sound.target && \
1502                 $(LN_S) $(systemunitdir)/shutdown.target shutdown.target && \
1503                 $(LN_S) $(systemunitdir)/sockets.target sockets.target && \
1504                 $(LN_S) $(systemunitdir)/bluetooth.target bluetooth.target && \
1505                 $(LN_S) $(systemunitdir)/printer.target printer.target && \
1506                 $(LN_S) $(systemunitdir)/sound.target sound.target )
1507         ( cd $(DESTDIR)$(systemunitdir) && \
1508                 rm -f runlevel0.target runlevel1.target runlevel2.target runlevel3.target runlevel4.target runlevel5.target runlevel6.target && \
1509                 $(LN_S) poweroff.target runlevel0.target && \
1510                 $(LN_S) rescue.target runlevel1.target && \
1511                 $(LN_S) multi-user.target runlevel2.target && \
1512                 $(LN_S) multi-user.target runlevel3.target && \
1513                 $(LN_S) multi-user.target runlevel4.target && \
1514                 $(LN_S) graphical.target runlevel5.target && \
1515                 $(LN_S) reboot.target runlevel6.target )
1516         ( cd $(DESTDIR)$(systemunitdir) && \
1517                 rm -f default.target ctrl-alt-del.target dbus-org.freedesktop.hostname1.service dbus-org.freedesktop.locale1.service dbus-org.freedesktop.timedate1.service dbus-org.freedesktop.login1.service autovt-getty@.service && \
1518                 $(LN_S) graphical.target default.target && \
1519                 $(LN_S) reboot.target ctrl-alt-del.target && \
1520                 $(LN_S) systemd-hostnamed.service dbus-org.freedesktop.hostname1.service && \
1521                 $(LN_S) systemd-localed.service dbus-org.freedesktop.locale1.service && \
1522                 $(LN_S) systemd-timedated.service dbus-org.freedesktop.timedate1.service && \
1523                 $(LN_S) systemd-logind.service dbus-org.freedesktop.login1.service && \
1524                 $(LN_S) getty@.service autovt-getty@.service )
1525         ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
1526                 rm -f getty.target systemd-user-sessions.service systemd-ask-password-wall.path systemd-logind.service && \
1527                 $(LN_S) ../getty.target getty.target && \
1528                 $(LN_S) ../systemd-user-sessions.service systemd-user-sessions.service && \
1529                 $(LN_S) ../systemd-ask-password-wall.path systemd-ask-password-wall.path && \
1530                 $(LN_S) ../systemd-logind.service systemd-logind.service )
1531         ( cd $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants && \
1532                 rm -f getty@tty1.service && \
1533                 $(LN_S) $(systemunitdir)/getty@.service getty@tty1.service )
1534         ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
1535                 rm -f remote-fs.target && \
1536                 $(LN_S) $(systemunitdir)/remote-fs.target remote-fs.target )
1537         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
1538                 rm -f dev-hugepages.automount \
1539                         dev-mqueue.automount \
1540                         sys-kernel-debug.automount \
1541                         sys-kernel-security.automount \
1542                         systemd-vconsole-setup.service \
1543                         systemd-modules-load.service \
1544                         systemd-random-seed-load.service \
1545                         systemd-tmpfiles-setup.service \
1546                         systemd-sysctl.service \
1547                         systemd-ask-password-console.path \
1548                         systemd-kmsg-syslogd.service \
1549                         cryptsetup.target && \
1550                 $(LN_S) ../dev-hugepages.automount dev-hugepages.automount && \
1551                 $(LN_S) ../dev-mqueue.automount dev-mqueue.automount && \
1552                 $(LN_S) ../sys-kernel-debug.automount sys-kernel-debug.automount && \
1553                 $(LN_S) ../sys-kernel-security.automount sys-kernel-security.automount && \
1554                 $(LN_S) ../systemd-vconsole-setup.service systemd-vconsole-setup.service && \
1555                 $(LN_S) ../systemd-modules-load.service systemd-modules-load.service && \
1556                 $(LN_S) ../systemd-random-seed-load.service systemd-random-seed-load.service && \
1557                 $(LN_S) ../systemd-tmpfiles-setup.service systemd-tmpfiles-setup.service && \
1558                 $(LN_S) ../systemd-sysctl.service systemd-sysctl.service && \
1559                 $(LN_S) ../systemd-ask-password-console.path systemd-ask-password-console.path && \
1560                 $(LN_S) ../systemd-kmsg-syslogd.service && \
1561                 $(LN_S) ../cryptsetup.target cryptsetup.target )
1562 if ENABLE_BINFMT
1563         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
1564                 rm -f systemd-binfmt.service \
1565                         proc-sys-fs-binfmt_misc.automount && \
1566                 $(LN_S) ../systemd-binfmt.service systemd-binfmt.service && \
1567                 $(LN_S) ../proc-sys-fs-binfmt_misc.automount proc-sys-fs-binfmt_misc.automount )
1568 endif
1569         ( cd $(DESTDIR)$(systemunitdir)/basic.target.wants && \
1570                 rm -f systemd-tmpfiles-clean.timer && \
1571                 $(LN_S) ../systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.timer )
1572         ( cd $(DESTDIR)$(dbussessionservicedir) && \
1573                 rm -f org.freedesktop.systemd1.service && \
1574                 $(LN_S) ../system-services/org.freedesktop.systemd1.service org.freedesktop.systemd1.service )
1575 if HAVE_PLYMOUTH
1576         $(MKDIR_P) -m 0755 \
1577                 $(DESTDIR)$(SYSTEM_SYSVINIT_PATH) \
1578                 $(DESTDIR)$(systemunitdir)/reboot.target.wants \
1579                 $(DESTDIR)$(systemunitdir)/kexec.target.wants \
1580                 $(DESTDIR)$(systemunitdir)/poweroff.target.wants \
1581                 $(DESTDIR)$(systemunitdir)/halt.target.wants
1582         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
1583                 rm -f plymouth-start.service plymouth-read-write.service && \
1584                 $(LN_S) ../plymouth-start.service plymouth-start.service && \
1585                 $(LN_S) ../plymouth-read-write.service plymouth-read-write.service )
1586         ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
1587                 rm -f plymouth-quit.service plymouth-quit-wait.service && \
1588                 $(LN_S) ../plymouth-quit.service plymouth-quit.service && \
1589                 $(LN_S) ../plymouth-quit-wait.service plymouth-quit-wait.service )
1590         ( cd $(DESTDIR)$(systemunitdir)/reboot.target.wants && \
1591                 rm -f plymouth-reboot.service && \
1592                 $(LN_S) ../plymouth-reboot.service plymouth-reboot.service )
1593         ( cd $(DESTDIR)$(systemunitdir)/kexec.target.wants && \
1594                 rm -f plymouth-kexec.service && \
1595                 $(LN_S) ../plymouth-kexec.service plymouth-kexec.service )
1596         ( cd $(DESTDIR)$(systemunitdir)/poweroff.target.wants && \
1597                 rm -f plymouth-poweroff.service && \
1598                 $(LN_S) ../plymouth-poweroff.service plymouth-poweroff.service )
1599         ( cd $(DESTDIR)$(systemunitdir)/halt.target.wants && \
1600                 rm -f plymouth-halt.service && \
1601                 $(LN_S) ../plymouth-halt.service plymouth-halt.service )
1602 endif
1603 if TARGET_MEEGO
1604         $(MKDIR_P) -m 0755 $(DESTDIR)$(systemunitdir)/final.target.wants
1605         ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
1606                 rm -f network.target && \
1607                 $(LN_S) $(systemunitdir)/network.target network.target )
1608         ( cd $(DESTDIR)$(pkgsysconfdir)/system/sysinit.target.wants && \
1609                 rm -f * )
1610         ( cd $(DESTDIR)$(pkgsysconfdir)/system/local-fs.target.wants && \
1611                 rm -f * )
1612         ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
1613                 rm -f * )
1614         ( cd $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants && \
1615                 rm -f * )
1616 endif
1617
1618 if TARGET_FEDORA
1619         $(MKDIR_P) -m 0755 $(DESTDIR)$(systemunitdir)/final.target.wants
1620         ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
1621                 rm -f rc-local.service && \
1622                 $(LN_S) $(systemunitdir)/rc-local.service rc-local.service )
1623         ( cd $(DESTDIR)$(systemunitdir)/final.target.wants && \
1624                 rm -f halt-local.service && \
1625                 $(LN_S) $(systemunitdir)/halt-local.service halt-local.service )
1626         ( cd $(DESTDIR)$(systemunitdir) && \
1627                 rm -f display-manager.service single.service && \
1628                 $(LN_S) prefdm.service display-manager.service && \
1629                 $(LN_S) rescue.service single.service )
1630         ( cd $(DESTDIR)$(systemunitdir)/graphical.target.wants && \
1631                 rm -f display-manager.service && \
1632                 $(LN_S) $(systemunitdir)/display-manager.service display-manager.service )
1633 endif
1634
1635 if TARGET_MANDRIVA
1636         $(MKDIR_P) -m 0755 $(DESTDIR)$(systemunitdir)/final.target.wants
1637         ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
1638                 rm -f rc-local.service && \
1639                 $(LN_S) $(systemunitdir)/rc-local.service rc-local.service )
1640         ( cd $(DESTDIR)$(systemunitdir)/final.target.wants && \
1641                 rm -f halt-local.service && \
1642                 $(LN_S) $(systemunitdir)/halt-local.service halt-local.service )
1643         ( cd $(DESTDIR)$(systemunitdir) && \
1644                 rm -f display-manager.service dm.service single.service && \
1645                 $(LN_S) prefdm.service display-manager.service && \
1646                 $(LN_S) prefdm.service dm.service && \
1647                 $(LN_S) rescue.service single.service )
1648         ( cd $(DESTDIR)$(systemunitdir)/graphical.target.wants && \
1649                 rm -f display-manager.service && \
1650                 $(LN_S) $(systemunitdir)/display-manager.service display-manager.service )
1651 endif
1652
1653 if TARGET_DEBIAN_OR_UBUNTU
1654         ( cd $(DESTDIR)$(systemunitdir) && \
1655                 rm -f runlevel5.target && \
1656                 $(LN_S) multi-user.target runlevel5.target )
1657 endif
1658
1659 if HAVE_SYSV_COMPAT
1660         ( cd $(DESTDIR)$(systemunitdir)/local-fs.target.wants && \
1661                 rm -f var-lock.mount && \
1662                 $(LN_S) ../var-lock.mount var-lock.mount )
1663 endif
1664
1665 DISTCHECK_CONFIGURE_FLAGS = \
1666         --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
1667         --with-dbussessionservicedir=$$dc_install_base/$(dbussessionservicedir) \
1668         --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
1669         --with-dbusinterfacedir=$$dc_install_base/$(dbusinterfacedir) \
1670         --with-udevrulesdir=$$dc_install_base/$(udevrulesdir) \
1671         --with-pamlibdir=$$dc_install_base/$(pamlibdir) \
1672         --with-rootdir=$$dc_install_base/$(rootdir)
1673
1674 upload: all distcheck
1675         cp -v systemd-$(VERSION).tar.bz2 /home/lennart/git.fedora/systemd/
1676         scp systemd-$(VERSION).tar.bz2 fdo:/srv/www.freedesktop.org/www/software/systemd/
1677         scp man/*.html tango:public/systemd-man/
1678
1679 git-tag:
1680         git tag "v$(VERSION)" -m "systemd $(VERSION)"