chiark / gitweb /
virt: detect LXC+libvirt containers
[elogind.git] / Makefile.am
1 #  This file is part of systemd.
2 #
3 #  Copyright 2011 Lennart Poettering
4 #  Copyright 2011 Kay Sievers
5 #
6 #  systemd is free software; you can redistribute it and/or modify it
7 #  under the terms of the GNU General Public License as published by
8 #  the Free Software Foundation; either version 2 of the License, or
9 #  (at your option) any later version.
10 #
11 #  systemd is distributed in the hope that it will be useful, but
12 #  WITHOUT ANY WARRANTY; without even the implied warranty of
13 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 #  General Public License for more details.
15 #
16 #  You should have received a copy of the GNU General Public License
17 #  along with systemd; If not, see <http://www.gnu.org/licenses/>.
18
19 ACLOCAL_AMFLAGS = -I m4
20
21 SUBDIRS = po
22
23 LIBSYSTEMD_LOGIN_CURRENT=1
24 LIBSYSTEMD_LOGIN_REVISION=0
25 LIBSYSTEMD_LOGIN_AGE=1
26
27 LIBSYSTEMD_DAEMON_CURRENT=0
28 LIBSYSTEMD_DAEMON_REVISION=0
29 LIBSYSTEMD_DAEMON_AGE=0
30
31 LIBSYSTEMD_ID128_CURRENT=0
32 LIBSYSTEMD_ID128_REVISION=0
33 LIBSYSTEMD_ID128_AGE=0
34
35 LIBSYSTEMD_JOURNAL_CURRENT=0
36 LIBSYSTEMD_JOURNAL_REVISION=0
37 LIBSYSTEMD_JOURNAL_AGE=0
38
39 # Dirs of external packages
40 dbuspolicydir=@dbuspolicydir@
41 dbussessionservicedir=@dbussessionservicedir@
42 dbussystemservicedir=@dbussystemservicedir@
43 dbusinterfacedir=@dbusinterfacedir@
44 udevrulesdir=@udevrulesdir@
45 pamlibdir=@pamlibdir@
46 pkgconfigdatadir=$(datadir)/pkgconfig
47 pkgconfiglibdir=$(libdir)/pkgconfig
48 polkitpolicydir=$(datadir)/polkit-1/actions
49 bashcompletiondir=$(sysconfdir)/bash_completion.d
50
51 # Our own, non-special dirs
52 pkgsysconfdir=$(sysconfdir)/systemd
53 userunitdir=$(prefix)/lib/systemd/user
54 tmpfilesdir=$(prefix)/lib/tmpfiles.d
55 sysctldir=$(prefix)/lib/sysctl.d
56 usergeneratordir=$(pkglibexecdir)/user-generators
57 pkgincludedir=$(includedir)/systemd
58
59 # And these are the special ones for /
60 rootprefix=@rootprefix@
61 rootbindir=$(rootprefix)/bin
62 rootlibexecdir=$(rootprefix)/lib/systemd
63 systemgeneratordir=$(rootlibexecdir)/system-generators
64 systemshutdowndir=$(rootlibexecdir)/system-shutdown
65 systemunitdir=$(rootprefix)/lib/systemd/system
66
67 CLEANFILES =
68 EXTRA_DIST =
69 INSTALL_EXEC_HOOKS =
70 UNINSTALL_EXEC_HOOKS =
71 INSTALL_DATA_HOOKS =
72 pkginclude_HEADERS =
73 lib_LTLIBRARIES =
74 pkgconfiglib_DATA =
75 polkitpolicy_in_files =
76 dist_udevrules_DATA =
77
78 AM_CPPFLAGS = \
79         -include $(top_builddir)/config.h \
80         -DSYSTEM_CONFIG_FILE=\"$(pkgsysconfdir)/system.conf\" \
81         -DSYSTEM_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/system\" \
82         -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" \
83         -DSYSTEM_SYSVINIT_PATH=\"$(SYSTEM_SYSVINIT_PATH)\" \
84         -DSYSTEM_SYSVRCND_PATH=\"$(SYSTEM_SYSVRCND_PATH)\" \
85         -DUSER_CONFIG_FILE=\"$(pkgsysconfdir)/user.conf\" \
86         -DUSER_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/user\" \
87         -DUSER_DATA_UNIT_PATH=\"$(userunitdir)\" \
88         -DSYSTEMD_CGROUP_AGENT_PATH=\"$(rootlibexecdir)/systemd-cgroups-agent\" \
89         -DSYSTEMD_BINARY_PATH=\"$(rootbindir)/systemd\" \
90         -DSYSTEMD_SHUTDOWN_BINARY_PATH=\"$(rootlibexecdir)/systemd-shutdown\" \
91         -DSYSTEMCTL_BINARY_PATH=\"$(rootbindir)/systemctl\" \
92         -DSYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH=\"$(rootbindir)/systemd-tty-ask-password-agent\" \
93         -DSYSTEMD_STDIO_BRIDGE_BINARY_PATH=\"$(bindir)/systemd-stdio-bridge\" \
94         -DROOTPREFIX=\"$(rootprefix)\" \
95         -DRUNTIME_DIR=\"/run\" \
96         -DRANDOM_SEED=\"$(localstatedir)/lib/random-seed\" \
97         -DSYSTEMD_CRYPTSETUP_PATH=\"$(rootlibexecdir)/systemd-cryptsetup\" \
98         -DSYSTEM_GENERATOR_PATH=\"$(systemgeneratordir)\" \
99         -DUSER_GENERATOR_PATH=\"$(usergeneratordir)\" \
100         -DSYSTEM_SHUTDOWN_PATH=\"$(systemshutdowndir)\" \
101         -DSYSTEMD_KBD_MODEL_MAP=\"$(pkgdatadir)/kbd-model-map\" \
102         -DX_SERVER=\"$(bindir)/X\" \
103         -I $(top_srcdir)/src \
104         -I $(top_srcdir)/src/readahead \
105         -I $(top_srcdir)/src/login \
106         -I $(top_srcdir)/src/journal \
107         -I $(top_srcdir)/src/systemd
108
109 if TARGET_GENTOO
110 AM_CPPFLAGS += \
111         -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
112         -DKBD_SETFONT=\"/usr/bin/setfont\" \
113         -DDEFAULT_FONT=\"LatArCyrHeb-16\"
114 else
115 if TARGET_ARCH
116 AM_CPPFLAGS += \
117         -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
118         -DKBD_SETFONT=\"/usr/bin/setfont\" \
119         -DDEFAULT_FONT=\"LatArCyrHeb-16\"
120 else
121 if TARGET_FRUGALWARE
122 AM_CPPFLAGS += \
123         -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
124         -DKBD_SETFONT=\"/usr/bin/setfont\" \
125         -DDEFAULT_FONT=\"LatArCyrHeb-16\"
126 else
127 if TARGET_MANDRIVA
128 AM_CPPFLAGS += \
129         -DKBD_LOADKEYS=\"/bin/loadkeys\" \
130         -DKBD_SETFONT=\"/bin/setfont\" \
131         -DDEFAULT_FONT=\"LatArCyrHeb-16\"
132 else
133 if TARGET_MEEGO
134 AM_CPPFLAGS += \
135         -DKBD_LOADKEYS=\"/bin/loadkeys\" \
136         -DKBD_SETFONT=\"/bin/setfont\" \
137         -DDEFAULT_FONT=\"LatArCyrHeb-16\"
138 else
139 if TARGET_ANGSTROM
140 AM_CPPFLAGS += \
141         -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
142         -DKBD_SETFONT=\"/usr/bin/setfont\" \
143         -DDEFAULT_FONT=\"LatArCyrHeb-16\"
144 else
145 if TARGET_MAGEIA
146 AM_CPPFLAGS += \
147         -DKBD_LOADKEYS=\"/bin/loadkeys\" \
148         -DKBD_SETFONT=\"/bin/setfont\" \
149         -DDEFAULT_FONT=\"LatArCyrHeb-16\"
150 else
151 AM_CPPFLAGS += \
152         -DKBD_LOADKEYS=\"/bin/loadkeys\" \
153         -DKBD_SETFONT=\"/bin/setfont\" \
154         -DDEFAULT_FONT=\"latarcyrheb-sun16\"
155 endif
156 endif
157 endif
158 endif
159 endif
160 endif
161 endif
162
163 rootbin_PROGRAMS = \
164         systemd \
165         systemctl \
166         systemd-notify \
167         systemd-ask-password \
168         systemd-tty-ask-password-agent \
169         systemd-tmpfiles \
170         systemd-machine-id-setup
171
172 bin_PROGRAMS = \
173         systemd-cgls \
174         systemd-cgtop \
175         systemd-stdio-bridge \
176         systemd-nspawn
177
178 dist_bin_SCRIPTS = \
179         src/systemd-analyze
180
181 if HAVE_GTK
182 bin_PROGRAMS += \
183         systemadm \
184         systemd-gnome-ask-password-agent
185 endif
186
187 rootlibexec_PROGRAMS = \
188         systemd-cgroups-agent \
189         systemd-initctl \
190         systemd-update-utmp \
191         systemd-shutdownd \
192         systemd-shutdown \
193         systemd-modules-load \
194         systemd-remount-api-vfs \
195         systemd-reply-password \
196         systemd-fsck \
197         systemd-timestamp \
198         systemd-ac-power \
199         systemd-detect-virt \
200         systemd-sysctl
201
202 systemgenerator_PROGRAMS = \
203         systemd-getty-generator
204
205 noinst_PROGRAMS = \
206         test-engine \
207         test-job-type \
208         test-ns \
209         test-loopback \
210         test-hostname \
211         test-daemon \
212         test-cgroup \
213         test-env-replace \
214         test-strv \
215         test-install
216
217 dist_pkgsysconf_DATA = \
218         src/system.conf \
219         src/user.conf
220
221 dist_dbuspolicy_DATA = \
222         src/org.freedesktop.systemd1.conf
223
224 dist_dbussystemservice_DATA = \
225         src/org.freedesktop.systemd1.service
226
227 nodist_udevrules_DATA = \
228         src/99-systemd.rules
229
230 dbusinterface_DATA = \
231         org.freedesktop.systemd1.Manager.xml \
232         org.freedesktop.systemd1.Job.xml \
233         org.freedesktop.systemd1.Unit.xml \
234         org.freedesktop.systemd1.Service.xml \
235         org.freedesktop.systemd1.Socket.xml \
236         org.freedesktop.systemd1.Timer.xml \
237         org.freedesktop.systemd1.Target.xml \
238         org.freedesktop.systemd1.Device.xml \
239         org.freedesktop.systemd1.Mount.xml \
240         org.freedesktop.systemd1.Automount.xml \
241         org.freedesktop.systemd1.Snapshot.xml \
242         org.freedesktop.systemd1.Swap.xml \
243         org.freedesktop.systemd1.Path.xml
244
245 dist_bashcompletion_DATA = \
246         src/systemd-bash-completion.sh
247
248 dist_tmpfiles_DATA = \
249         tmpfiles.d/systemd.conf \
250         tmpfiles.d/tmp.conf \
251         tmpfiles.d/x11.conf
252
253 if HAVE_SYSV_COMPAT
254 dist_tmpfiles_DATA += \
255         tmpfiles.d/legacy.conf
256 endif
257
258 dist_systemunit_DATA = \
259         units/graphical.target \
260         units/multi-user.target \
261         units/emergency.service \
262         units/emergency.target \
263         units/sysinit.target \
264         units/basic.target \
265         units/getty.target \
266         units/halt.target \
267         units/kexec.target \
268         units/local-fs.target \
269         units/local-fs-pre.target \
270         units/remote-fs.target \
271         units/remote-fs-pre.target \
272         units/network.target \
273         units/nss-lookup.target \
274         units/mail-transfer-agent.target \
275         units/http-daemon.target \
276         units/poweroff.target \
277         units/reboot.target \
278         units/rescue.target \
279         units/rpcbind.target \
280         units/time-sync.target \
281         units/shutdown.target \
282         units/final.target \
283         units/umount.target \
284         units/sigpwr.target \
285         units/sockets.target \
286         units/swap.target \
287         units/systemd-initctl.socket \
288         units/systemd-shutdownd.socket \
289         units/syslog.socket \
290         units/dev-hugepages.mount \
291         units/dev-mqueue.mount \
292         units/sys-kernel-config.mount \
293         units/sys-kernel-debug.mount \
294         units/sys-kernel-security.mount \
295         units/sys-fs-fuse-connections.mount \
296         units/var-run.mount \
297         units/media.mount \
298         units/remount-rootfs.service \
299         units/printer.target \
300         units/sound.target \
301         units/bluetooth.target \
302         units/smartcard.target \
303         units/systemd-tmpfiles-clean.timer \
304         units/quotaon.service \
305         units/systemd-ask-password-wall.path \
306         units/systemd-ask-password-console.path \
307         units/syslog.target
308
309 if HAVE_SYSV_COMPAT
310 dist_systemunit_DATA += \
311         units/var-lock.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-shutdownd.service \
320         units/systemd-modules-load.service \
321         units/systemd-remount-api-vfs.service \
322         units/systemd-update-utmp-runlevel.service \
323         units/systemd-update-utmp-shutdown.service \
324         units/systemd-tmpfiles-setup.service \
325         units/systemd-tmpfiles-clean.service \
326         units/systemd-ask-password-wall.service \
327         units/systemd-ask-password-console.service \
328         units/systemd-sysctl.service \
329         units/halt.service \
330         units/poweroff.service \
331         units/reboot.service \
332         units/kexec.service \
333         units/fsck@.service \
334         units/fsck-root.service \
335         units/rescue.service \
336         units/user@.service
337
338 dist_userunit_DATA = \
339         units/user/default.target \
340         units/user/exit.target
341
342 nodist_userunit_DATA = \
343         units/user/exit.service
344
345 EXTRA_DIST += \
346         units/getty@.service.m4 \
347         units/serial-getty@.service.m4 \
348         units/console-shell.service.m4 \
349         units/rescue.service.m4 \
350         units/systemd-initctl.service.in \
351         units/systemd-shutdownd.service.in \
352         units/systemd-modules-load.service.in \
353         units/systemd-remount-api-vfs.service.in \
354         units/systemd-update-utmp-runlevel.service.in \
355         units/systemd-update-utmp-shutdown.service.in \
356         units/systemd-tmpfiles-setup.service.in \
357         units/systemd-tmpfiles-clean.service.in \
358         units/systemd-ask-password-wall.service.in \
359         units/systemd-ask-password-console.service.in \
360         units/systemd-sysctl.service.in \
361         units/halt.service.in \
362         units/poweroff.service.in \
363         units/reboot.service.in \
364         units/kexec.service.in \
365         units/user/exit.service.in \
366         units/fsck@.service.in \
367         units/fsck-root.service.in \
368         units/user@.service.in \
369         src/systemd.pc.in \
370         introspect.awk \
371         src/99-systemd.rules.in \
372         man/custom-html.xsl
373
374 if TARGET_FEDORA
375 dist_systemunit_DATA += \
376         units/fedora/prefdm.service \
377         units/fedora/rc-local.service \
378         units/fedora/halt-local.service
379 systemgenerator_PROGRAMS += \
380         systemd-rc-local-generator
381 endif
382
383 if TARGET_MANDRIVA
384 dist_systemunit_DATA += \
385         units/mandriva/prefdm.service \
386         units/fedora/rc-local.service \
387         units/fedora/halt-local.service
388 systemgenerator_PROGRAMS += \
389         systemd-rc-local-generator
390 endif
391
392 if TARGET_FRUGALWARE
393 dist_systemunit_DATA += \
394         units/frugalware/display-manager.service
395 endif
396
397 if TARGET_SUSE
398 dist_systemunit_DATA += \
399         units/suse/rc-local.service \
400         units/suse/halt-local.service
401 systemgenerator_PROGRAMS += \
402         systemd-rc-local-generator
403 endif
404
405 if TARGET_MAGEIA
406 dist_systemunit_DATA += \
407         units/mageia/prefdm.service \
408         units/fedora/rc-local.service \
409         units/fedora/halt-local.service
410 systemgenerator_PROGRAMS += \
411         systemd-rc-local-generator
412 endif
413
414 if HAVE_PLYMOUTH
415 dist_systemunit_DATA += \
416         units/plymouth-start.service \
417         units/plymouth-read-write.service \
418         units/plymouth-quit.service \
419         units/plymouth-quit-wait.service \
420         units/plymouth-reboot.service \
421         units/plymouth-kexec.service \
422         units/plymouth-poweroff.service \
423         units/plymouth-halt.service \
424         units/systemd-ask-password-plymouth.path
425
426 nodist_systemunit_DATA += \
427         units/systemd-ask-password-plymouth.service
428
429 EXTRA_DIST += \
430         units/systemd-ask-password-plymouth.service.in
431 endif
432
433 dist_doc_DATA = \
434         README \
435         LICENSE \
436         DISTRO_PORTING
437
438 pkgconfigdata_DATA = \
439         src/systemd.pc
440
441 # First passed through sed, followed by intltool
442 polkitpolicy_in_in_files = \
443         src/org.freedesktop.systemd1.policy.in.in
444
445 nodist_polkitpolicy_DATA = \
446         $(polkitpolicy_in_files:.policy.in=.policy) \
447         $(polkitpolicy_in_in_files:.policy.in.in=.policy)
448
449 EXTRA_DIST += \
450         $(polkitpolicy_in_files) \
451         $(polkitpolicy_in_in_files)
452
453 @INTLTOOL_POLICY_RULE@
454
455 noinst_LTLIBRARIES = \
456         libsystemd-basic.la \
457         libsystemd-core.la
458
459 libsystemd_basic_la_SOURCES = \
460         src/util.c \
461         src/virt.c \
462         src/label.c \
463         src/hashmap.c \
464         src/set.c \
465         src/strv.c \
466         src/conf-parser.c \
467         src/socket-util.c \
468         src/log.c \
469         src/ratelimit.c \
470         src/exit-status.c
471
472 libsystemd_basic_la_CFLAGS = \
473         $(AM_CFLAGS) \
474         $(SELINUX_CFLAGS)
475
476 libsystemd_basic_la_LIBADD = \
477         $(SELINUX_LIBS) \
478         $(CAP_LIBS)
479
480 libsystemd_core_la_SOURCES = \
481         src/unit.c \
482         src/job.c \
483         src/manager.c \
484         src/path-lookup.c \
485         src/load-fragment.c \
486         src/service.c \
487         src/automount.c \
488         src/mount.c \
489         src/swap.c \
490         src/device.c \
491         src/target.c \
492         src/snapshot.c \
493         src/socket.c \
494         src/timer.c \
495         src/path.c \
496         src/load-dropin.c \
497         src/execute.c \
498         src/utmp-wtmp.c \
499         src/dbus.c \
500         src/dbus-manager.c \
501         src/dbus-unit.c \
502         src/dbus-job.c \
503         src/dbus-service.c \
504         src/dbus-socket.c \
505         src/dbus-timer.c \
506         src/dbus-target.c \
507         src/dbus-mount.c \
508         src/dbus-automount.c \
509         src/dbus-swap.c \
510         src/dbus-snapshot.c \
511         src/dbus-device.c \
512         src/dbus-execute.c \
513         src/dbus-path.c \
514         src/cgroup.c \
515         src/mount-setup.c \
516         src/hostname-setup.c \
517         src/selinux-setup.c \
518         src/loopback-setup.c \
519         src/kmod-setup.c \
520         src/locale-setup.c \
521         src/machine-id-setup.c \
522         src/specifier.c \
523         src/unit-name.c \
524         src/fdset.c \
525         src/namespace.c \
526         src/tcpwrap.c \
527         src/cgroup-util.c \
528         src/condition.c \
529         src/dbus-common.c \
530         src/sd-daemon.c \
531         src/install.c \
532         src/cgroup-attr.c \
533         src/sd-id128.c
534
535 nodist_libsystemd_core_la_SOURCES = \
536         src/load-fragment-gperf.c \
537         src/load-fragment-gperf-nulstr.c
538
539 EXTRA_DIST += \
540         src/load-fragment-gperf.gperf.m4
541
542 libsystemd_core_la_CFLAGS = \
543         $(AM_CFLAGS) \
544         $(DBUS_CFLAGS) \
545         $(UDEV_CFLAGS) \
546         $(LIBWRAP_CFLAGS) \
547         $(PAM_CFLAGS) \
548         $(AUDIT_CFLAGS)
549
550 libsystemd_core_la_LIBADD = \
551         libsystemd-basic.la \
552         $(DBUS_LIBS) \
553         $(UDEV_LIBS) \
554         $(LIBWRAP_LIBS) \
555         $(PAM_LIBS) \
556         $(AUDIT_LIBS) \
557         $(CAP_LIBS)
558
559 # This is needed because automake is buggy in how it generates the
560 # rules for C programs, but not Vala programs.  We therefore can't
561 # list the .h files as dependencies if we want make dist to work.
562
563 EXTRA_DIST += \
564         src/util.h \
565         src/virt.h \
566         src/label.h \
567         src/hashmap.h \
568         src/set.h \
569         src/strv.h \
570         src/conf-parser.h \
571         src/socket-util.h \
572         src/log.h \
573         src/ratelimit.h \
574         src/exit-status.h \
575         src/unit.h \
576         src/job.h \
577         src/manager.h \
578         src/path-lookup.h \
579         src/load-fragment.h \
580         src/service.h \
581         src/automount.h \
582         src/mount.h \
583         src/swap.h \
584         src/device.h \
585         src/target.h \
586         src/snapshot.h \
587         src/socket.h \
588         src/timer.h \
589         src/path.h \
590         src/load-dropin.h \
591         src/execute.h \
592         src/utmp-wtmp.h \
593         src/dbus.h \
594         src/dbus-manager.h \
595         src/dbus-unit.h \
596         src/dbus-job.h \
597         src/dbus-service.h \
598         src/dbus-socket.h \
599         src/dbus-timer.h \
600         src/dbus-target.h \
601         src/dbus-mount.h \
602         src/dbus-automount.h \
603         src/dbus-swap.h \
604         src/dbus-snapshot.h \
605         src/dbus-device.h \
606         src/dbus-execute.h \
607         src/dbus-path.h \
608         src/cgroup.h \
609         src/mount-setup.h \
610         src/hostname-setup.h \
611         src/selinux-setup.h \
612         src/loopback-setup.h \
613         src/kmod-setup.h \
614         src/locale-setup.h \
615         src/machine-id-setup.h \
616         src/specifier.h \
617         src/unit-name.h \
618         src/fdset.h \
619         src/namespace.h \
620         src/tcpwrap.h \
621         src/cgroup-util.h \
622         src/condition.h \
623         src/dbus-common.h \
624         src/install.h \
625         src/cgroup-attr.h \
626         src/macro.h \
627         src/def.h \
628         src/ioprio.h \
629         src/missing.h \
630         src/list.h \
631         src/securebits.h \
632         src/linux/auto_dev-ioctl.h \
633         src/linux/fanotify.h \
634         src/initreq.h \
635         src/special.h \
636         src/dbus-common.h \
637         src/bus-errors.h \
638         src/cgroup-show.h \
639         src/build.h \
640         src/shutdownd.h \
641         src/umount.h \
642         src/ask-password-api.h \
643         src/pager.h \
644         src/sysfs-show.h \
645         src/polkit.h \
646         src/dbus-loop.h \
647         src/spawn-agent.h \
648         src/acl-util.h \
649         src/logs-show.h
650
651 MANPAGES = \
652         man/systemd.1 \
653         man/systemctl.1 \
654         man/systemadm.1 \
655         man/systemd-cgls.1 \
656         man/systemd-cgtop.1 \
657         man/systemd-nspawn.1 \
658         man/systemd-tmpfiles.8 \
659         man/systemd-notify.1 \
660         man/systemd.unit.5 \
661         man/systemd.service.5 \
662         man/systemd.socket.5 \
663         man/systemd.mount.5 \
664         man/systemd.automount.5 \
665         man/systemd.swap.5 \
666         man/systemd.timer.5 \
667         man/systemd.path.5 \
668         man/systemd.target.5 \
669         man/systemd.device.5 \
670         man/systemd.snapshot.5 \
671         man/systemd.exec.5 \
672         man/daemon.7 \
673         man/runlevel.8 \
674         man/telinit.8 \
675         man/halt.8 \
676         man/shutdown.8 \
677         man/pam_systemd.8 \
678         man/systemd.conf.5 \
679         man/tmpfiles.d.5 \
680         man/hostname.5 \
681         man/timezone.5 \
682         man/machine-id.5 \
683         man/locale.conf.5 \
684         man/os-release.5 \
685         man/machine-info.5 \
686         man/modules-load.d.5 \
687         man/sysctl.d.5 \
688         man/systemd-ask-password.1
689
690 MANPAGES_ALIAS = \
691         man/reboot.8 \
692         man/poweroff.8 \
693         man/init.1
694
695 man/reboot.8: man/halt.8
696 man/poweroff.8: man/halt.8
697 man/init.1: man/systemd.1
698
699 dist_man_MANS = \
700         $(MANPAGES) \
701         $(MANPAGES_ALIAS)
702
703 nodist_man_MANS = \
704         man/systemd.special.7
705
706 XML_FILES = \
707         ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
708
709 XML_IN_FILES = \
710         ${patsubst %.1,%.xml.in,${patsubst %.3,%.xml.in,${patsubst %.5,%.xml.in,${patsubst %.7,%.xml.in,${patsubst %.8,%.xml.in,$(nodist_man_MANS)}}}}}
711
712 dist_noinst_DATA = \
713         ${XML_FILES:.xml=.html}
714
715 nodist_noinst_DATA = \
716         ${XML_IN_FILES:.xml.in=.html}
717
718 EXTRA_DIST += \
719         $(XML_FILES) \
720         $(XML_IN_FILES) \
721         ${nodist_man_MANS:=.in} \
722         ${XML_IN_FILES:.xml.in=.html.in}
723
724 systemd_SOURCES = \
725         src/main.c
726
727 systemd_CFLAGS = \
728         $(AM_CFLAGS) \
729         $(DBUS_CFLAGS) \
730         $(UDEV_CFLAGS)
731
732 systemd_LDADD = \
733         libsystemd-core.la
734
735 test_engine_SOURCES = \
736         src/test-engine.c
737
738 test_engine_CFLAGS = $(systemd_CFLAGS)
739 test_engine_LDADD = $(systemd_LDADD)
740
741 test_job_type_SOURCES = \
742         src/test-job-type.c
743
744 test_job_type_CFLAGS = $(systemd_CFLAGS)
745 test_job_type_LDADD = $(systemd_LDADD)
746
747 test_ns_SOURCES = \
748         src/test-ns.c
749
750 test_ns_CFLAGS = $(systemd_CFLAGS)
751 test_ns_LDADD = $(systemd_LDADD)
752
753 test_loopback_SOURCES = \
754         src/test-loopback.c \
755         src/loopback-setup.c
756
757 test_loopback_LDADD = \
758         libsystemd-basic.la
759
760 test_hostname_SOURCES = \
761         src/test-hostname.c \
762         src/hostname-setup.c
763
764 test_hostname_LDADD = \
765         libsystemd-basic.la
766
767 test_daemon_SOURCES = \
768         src/test-daemon.c
769
770 test_daemon_LDADD = \
771         libsystemd-basic.la \
772         libsystemd-daemon.la
773
774 test_cgroup_SOURCES = \
775         src/test-cgroup.c \
776         src/cgroup-util.c
777
778 test_cgroup_LDADD = \
779         libsystemd-basic.la
780
781 test_env_replace_SOURCES = \
782         src/test-env-replace.c
783
784 test_env_replace_LDADD = \
785         libsystemd-basic.la
786
787 test_strv_SOURCES = \
788         src/test-strv.c \
789         src/specifier.c
790
791 test_strv_LDADD = \
792         libsystemd-basic.la
793
794 test_install_SOURCES = \
795         src/test-install.c \
796         src/install.c \
797         src/path-lookup.c \
798         src/unit-name.c
799
800 test_install_CFLAGS = \
801         $(AM_CFLAGS) \
802         $(DBUS_CFLAGS)
803
804 test_install_LDADD = \
805         libsystemd-basic.la
806
807 systemd_initctl_SOURCES = \
808         src/initctl.c \
809         src/dbus-common.c
810
811 systemd_initctl_CFLAGS = \
812         $(AM_CFLAGS) \
813         $(DBUS_CFLAGS)
814
815 systemd_initctl_LDADD = \
816         libsystemd-basic.la \
817         libsystemd-daemon.la \
818         $(DBUS_LIBS)
819
820 systemd_update_utmp_SOURCES = \
821         src/update-utmp.c \
822         src/dbus-common.c \
823         src/utmp-wtmp.c
824
825 systemd_update_utmp_CFLAGS = \
826         $(AM_CFLAGS) \
827         $(DBUS_CFLAGS) \
828         $(AUDIT_CFLAGS)
829
830 systemd_update_utmp_LDADD = \
831         libsystemd-basic.la \
832         $(DBUS_LIBS) \
833         $(AUDIT_LIBS)
834
835 systemd_shutdownd_SOURCES = \
836         src/utmp-wtmp.c \
837         src/shutdownd.c
838
839 systemd_shutdownd_CFLAGS = \
840         $(AM_CFLAGS)
841
842 systemd_shutdownd_LDADD = \
843         libsystemd-basic.la \
844         libsystemd-daemon.la
845
846 systemd_shutdown_SOURCES = \
847         src/mount-setup.c \
848         src/umount.c \
849         src/shutdown.c
850
851 systemd_shutdown_CFLAGS = \
852         $(AM_CFLAGS) \
853         $(UDEV_CFLAGS)
854
855 systemd_shutdown_LDADD = \
856         libsystemd-basic.la \
857         $(UDEV_LIBS)
858
859 systemd_modules_load_SOURCES = \
860         src/modules-load.c
861
862 systemd_modules_load_LDADD = \
863         libsystemd-basic.la
864
865 systemd_tmpfiles_SOURCES = \
866         src/tmpfiles.c
867
868 systemd_tmpfiles_LDADD = \
869         libsystemd-basic.la
870
871 systemd_machine_id_setup_SOURCES = \
872         src/machine-id-setup.c \
873         src/machine-id-main.c \
874         src/sd-id128.c
875
876 systemd_machine_id_setup_LDADD = \
877         libsystemd-basic.la
878
879 systemd_sysctl_SOURCES = \
880         src/sysctl.c
881
882 systemd_sysctl_LDADD = \
883         libsystemd-basic.la
884
885 systemd_fsck_SOURCES = \
886         src/fsck.c \
887         src/dbus-common.c
888
889 systemd_fsck_CFLAGS = \
890         $(AM_CFLAGS) \
891         $(UDEV_CFLAGS) \
892         $(DBUS_CFLAGS)
893
894 systemd_fsck_LDADD = \
895         libsystemd-basic.la \
896         $(UDEV_LIBS) \
897         $(DBUS_LIBS)
898
899 systemd_timestamp_SOURCES = \
900         src/timestamp.c
901
902 systemd_timestamp_LDADD = \
903         libsystemd-basic.la
904
905 systemd_ac_power_SOURCES = \
906         src/ac-power.c
907
908 systemd_ac_power_CFLAGS = \
909         $(AM_CFLAGS) \
910         $(UDEV_CFLAGS)
911
912 systemd_ac_power_LDADD = \
913         libsystemd-basic.la \
914         $(UDEV_LIBS)
915
916 systemd_detect_virt_SOURCES = \
917         src/detect-virt.c
918
919 systemd_detect_virt_LDADD = \
920         libsystemd-basic.la
921
922 systemd_getty_generator_SOURCES = \
923         src/getty-generator.c \
924         src/unit-name.c
925
926 systemd_getty_generator_LDADD = \
927         libsystemd-basic.la
928
929 systemd_rc_local_generator_SOURCES = \
930         src/rc-local-generator.c
931
932 systemd_rc_local_generator_LDADD = \
933         libsystemd-basic.la
934
935 systemd_remount_api_vfs_SOURCES = \
936         src/remount-api-vfs.c \
937         src/mount-setup.c \
938         src/exit-status.c
939
940 systemd_remount_api_vfs_LDADD = \
941         libsystemd-basic.la
942
943 systemd_cgroups_agent_SOURCES = \
944         src/cgroups-agent.c \
945         src/dbus-common.c
946
947 systemd_cgroups_agent_CFLAGS = \
948         $(AM_CFLAGS) \
949         $(DBUS_CFLAGS)
950
951 systemd_cgroups_agent_LDADD = \
952         libsystemd-basic.la \
953         $(DBUS_LIBS)
954
955 systemctl_SOURCES = \
956         src/systemctl.c \
957         src/utmp-wtmp.c \
958         src/dbus-common.c \
959         src/path-lookup.c \
960         src/cgroup-show.c \
961         src/cgroup-util.c \
962         src/exit-status.c \
963         src/unit-name.c \
964         src/pager.c \
965         src/install.c \
966         src/spawn-agent.c \
967         src/logs-show.c
968
969 systemctl_CFLAGS = \
970         $(AM_CFLAGS) \
971         $(DBUS_CFLAGS)
972
973 systemctl_LDADD = \
974         libsystemd-basic.la \
975         libsystemd-daemon.la \
976         libsystemd-journal.la \
977         libsystemd-id128.la \
978         $(DBUS_LIBS)
979
980 systemd_notify_SOURCES = \
981         src/notify.c \
982         src/readahead/sd-readahead.c
983
984 systemd_notify_LDADD = \
985         libsystemd-basic.la \
986         libsystemd-daemon.la
987
988 systemd_ask_password_SOURCES = \
989         src/ask-password.c \
990         src/ask-password-api.c
991
992 systemd_ask_password_LDADD = \
993         libsystemd-basic.la
994
995 systemd_reply_password_SOURCES = \
996         src/reply-password.c
997
998 systemd_reply_password_LDADD = \
999         libsystemd-basic.la
1000
1001 systemd_cgls_SOURCES = \
1002         src/cgls.c \
1003         src/cgroup-show.c \
1004         src/cgroup-util.c \
1005         src/pager.c
1006
1007 systemd_cgls_LDADD = \
1008         libsystemd-basic.la
1009
1010 systemd_cgtop_SOURCES = \
1011         src/cgtop.c \
1012         src/cgroup-util.c
1013
1014 systemd_cgtop_LDADD = \
1015         libsystemd-basic.la
1016
1017 systemd_nspawn_SOURCES = \
1018         src/nspawn.c \
1019         src/cgroup-util.c \
1020         src/loopback-setup.c
1021
1022 systemd_nspawn_LDADD = \
1023         libsystemd-basic.la \
1024         libsystemd-daemon.la
1025
1026 systemd_stdio_bridge_SOURCES = \
1027         src/bridge.c
1028
1029 systemd_stdio_bridge_LDADD = \
1030         libsystemd-basic.la
1031
1032 systemadm_SOURCES = \
1033         src/systemadm.vala \
1034         src/systemd-interfaces.vala \
1035         src/wraplabel.vala
1036
1037 systemadm_CFLAGS = \
1038         $(AM_CFLAGS) \
1039         $(GTK_CFLAGS) \
1040         -Wno-unused-variable \
1041         -Wno-unused-function \
1042         -Wno-shadow \
1043         -Wno-format-nonliteral
1044
1045 systemadm_VALAFLAGS = \
1046         --pkg=posix \
1047         --pkg=gtk+-2.0 \
1048         --pkg=gee-1.0 \
1049         -g
1050
1051 systemadm_LDADD = \
1052         $(GTK_LIBS)
1053
1054 systemd_gnome_ask_password_agent_SOURCES = \
1055         src/gnome-ask-password-agent.vala
1056
1057 systemd_gnome_ask_password_agent_CFLAGS = \
1058         $(AM_CFLAGS) \
1059         $(LIBNOTIFY_CFLAGS) \
1060         $(GTK_CFLAGS) \
1061         -Wno-unused-variable \
1062         -Wno-unused-function \
1063         -Wno-shadow \
1064         -Wno-format-nonliteral
1065
1066 systemd_gnome_ask_password_agent_VALAFLAGS = \
1067         --pkg=posix \
1068         --pkg=gtk+-2.0 \
1069         --pkg=linux \
1070         --pkg=gio-unix-2.0 \
1071         --pkg=libnotify \
1072         -g
1073
1074 systemd_gnome_ask_password_agent_LDADD = \
1075         $(LIBNOTIFY_LIBS) \
1076         $(GTK_LIBS)
1077
1078 systemd_tty_ask_password_agent_SOURCES = \
1079         src/tty-ask-password-agent.c \
1080         src/ask-password-api.c \
1081         src/utmp-wtmp.c
1082
1083 systemd_tty_ask_password_agent_LDADD = \
1084         libsystemd-basic.la
1085
1086 # ------------------------------------------------------------------------------
1087 libsystemd_daemon_la_SOURCES = \
1088         src/sd-daemon.c
1089
1090 libsystemd_daemon_la_CFLAGS = \
1091         $(AM_CFLAGS) \
1092         -fvisibility=hidden \
1093         -DSD_EXPORT_SYMBOLS
1094
1095 libsystemd_daemon_la_LDFLAGS = \
1096         -shared \
1097         -version-info $(LIBSYSTEMD_DAEMON_CURRENT):$(LIBSYSTEMD_DAEMON_REVISION):$(LIBSYSTEMD_DAEMON_AGE) \
1098         -Wl,--version-script=$(top_srcdir)/src/libsystemd-daemon.sym
1099
1100 pkginclude_HEADERS += \
1101         src/systemd/sd-daemon.h
1102
1103 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
1104 libsystemd-daemon-install-hook:
1105         if test "$(libdir)" != "$(rootlibdir)"; then \
1106                 mkdir -p $(DESTDIR)$(rootlibdir) && \
1107                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/libsystemd-daemon.so) && \
1108                 so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
1109                 ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/libsystemd-daemon.so && \
1110                 mv $(DESTDIR)$(libdir)/libsystemd-daemon.so.* $(DESTDIR)$(rootlibdir); \
1111         fi
1112
1113 INSTALL_EXEC_HOOKS += \
1114         libsystemd-daemon-install-hook
1115
1116 libsystemd-daemon-uninstall-hook:
1117         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-daemon.so*
1118
1119 UNINSTALL_EXEC_HOOKS += \
1120         libsystemd-daemon-uninstall-hook
1121
1122 lib_LTLIBRARIES += \
1123         libsystemd-daemon.la
1124
1125 pkgconfiglib_DATA += \
1126         src/libsystemd-daemon.pc
1127
1128 MANPAGES += \
1129         man/sd-daemon.7 \
1130         man/sd_notify.3 \
1131         man/sd_listen_fds.3 \
1132         man/sd_is_fifo.3 \
1133         man/sd_booted.3
1134
1135 MANPAGES_ALIAS += \
1136         man/sd_is_socket.3 \
1137         man/sd_is_socket_unix.3 \
1138         man/sd_is_socket_inet.3 \
1139         man/sd_is_mq.3 \
1140         man/sd_notifyf.3
1141
1142 man/sd_is_socket.3: man/sd_is_fifo.3
1143 man/sd_is_socket_unix.3: man/sd_is_fifo.3
1144 man/sd_is_socket_inet.3: man/sd_is_fifo.3
1145 man/sd_is_mq.3: man/sd_is_fifo.3
1146 man/sd_notifyf.3: man/sd_notify.3
1147
1148 EXTRA_DIST += \
1149         src/libsystemd-daemon.pc.in \
1150         src/libsystemd-daemon.sym
1151
1152 # ------------------------------------------------------------------------------
1153 libsystemd_id128_la_SOURCES = \
1154         src/sd-id128.c
1155
1156 libsystemd_id128_la_CFLAGS = \
1157         $(AM_CFLAGS) \
1158         -fvisibility=hidden
1159
1160 libsystemd_id128_la_LDFLAGS = \
1161         -shared \
1162         -version-info $(LIBSYSTEMD_ID128_CURRENT):$(LIBSYSTEMD_ID128_REVISION):$(LIBSYSTEMD_ID128_AGE) \
1163         -Wl,--version-script=$(top_srcdir)/src/libsystemd-id128.sym
1164
1165 libsystemd_id128_la_LIBADD = \
1166         libsystemd-basic.la
1167
1168 test_id128_SOURCES = \
1169         src/test-id128.c \
1170         src/sd-id128.c
1171
1172 test_id128_LDADD = \
1173         libsystemd-basic.la
1174
1175 noinst_PROGRAMS += \
1176         test-id128
1177
1178 pkginclude_HEADERS += \
1179         src/systemd/sd-id128.h
1180
1181 lib_LTLIBRARIES += \
1182         libsystemd-id128.la
1183
1184 pkgconfiglib_DATA += \
1185         src/libsystemd-id128.pc
1186
1187 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
1188 libsystemd-id128-install-hook:
1189         if test "$(libdir)" != "$(rootlibdir)"; then \
1190                 mkdir -p $(DESTDIR)$(rootlibdir) && \
1191                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/libsystemd-id128.so) && \
1192                 so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
1193                 ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/libsystemd-id128.so && \
1194                 mv $(DESTDIR)$(libdir)/libsystemd-id128.so.* $(DESTDIR)$(rootlibdir); \
1195         fi
1196
1197 INSTALL_EXEC_HOOKS += \
1198         libsystemd-id128-install-hook
1199
1200 libsystemd-id128-uninstall-hook:
1201         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-id128.so*
1202
1203 UNINSTALL_EXEC_HOOKS += \
1204         libsystemd-id128-uninstall-hook
1205
1206 EXTRA_DIST += \
1207         src/libsystemd-id128.pc.in \
1208         src/libsystemd-id128.sym
1209
1210 # ------------------------------------------------------------------------------
1211 systemd_journald_SOURCES = \
1212         src/journal/journald.c \
1213         src/journal/sd-journal.c \
1214         src/journal/journal-file.c \
1215         src/journal/lookup3.c \
1216         src/journal/journal-rate-limit.c \
1217         src/sd-id128.c \
1218         src/cgroup-util.c
1219
1220 if HAVE_ACL
1221 systemd_journald_SOURCES += \
1222         src/acl-util.c
1223 endif
1224
1225 nodist_systemd_journald_SOURCES = \
1226         src/journal/journald-gperf.c
1227
1228 systemd_journald_CFLAGS = \
1229         $(AM_CFLAGS) \
1230         $(ACL_CFLAGS)
1231
1232 systemd_journald_LDADD = \
1233         libsystemd-basic.la \
1234         libsystemd-daemon.la \
1235         libsystemd-login.la \
1236         $(ACL_LIBS)
1237
1238 if HAVE_XZ
1239 systemd_journald_SOURCES += \
1240         src/journal/compress.c
1241 systemd_journald_CFLAGS += \
1242         $(XZ_CFLAGS)
1243 systemd_journald_LDADD += \
1244         $(XZ_LIBS)
1245 endif
1246
1247 systemd_cat_SOURCES = \
1248         src/journal/cat.c
1249
1250 systemd_cat_LDADD = \
1251         libsystemd-basic.la \
1252         libsystemd-journal.la
1253
1254 systemd_journalctl_SOURCES = \
1255         src/journal/journalctl.c \
1256         src/pager.c \
1257         src/logs-show.c
1258
1259 systemd_journalctl_LDADD = \
1260         libsystemd-basic.la \
1261         libsystemd-journal.la \
1262         libsystemd-id128.la
1263
1264 if HAVE_XZ
1265 systemd_journalctl_SOURCES += \
1266         src/journal/compress.c
1267 systemd_journalctl_CFLAGS = \
1268         $(AM_CFLAGS) \
1269         $(XZ_CFLAGS)
1270 systemd_journalctl_LDADD += \
1271         $(XZ_LIBS)
1272 endif
1273
1274 test_journal_SOURCES = \
1275         src/journal/test-journal.c \
1276         src/journal/sd-journal.c \
1277         src/journal/journal-file.c \
1278         src/journal/lookup3.c \
1279         src/journal/journal-send.c \
1280         src/sd-id128.c
1281
1282 test_journal_LDADD = \
1283         libsystemd-basic.la
1284
1285 if HAVE_XZ
1286 test_journal_SOURCES += \
1287         src/journal/compress.c
1288
1289 test_journal_CFLAGS = \
1290         $(AM_CFLAGS) \
1291         $(XZ_CFLAGS)
1292
1293 test_journal_LDADD += \
1294         $(XZ_LIBS)
1295 endif
1296
1297 libsystemd_journal_la_SOURCES = \
1298         src/journal/sd-journal.c \
1299         src/journal/journal-file.c \
1300         src/journal/lookup3.c \
1301         src/journal/journal-send.c
1302
1303 libsystemd_journal_la_CFLAGS = \
1304         $(AM_CFLAGS) \
1305         -fvisibility=hidden
1306
1307 libsystemd_journal_la_LDFLAGS = \
1308         -shared \
1309         -version-info $(LIBSYSTEMD_JOURNAL_CURRENT):$(LIBSYSTEMD_JOURNAL_REVISION):$(LIBSYSTEMD_JOURNAL_AGE) \
1310         -Wl,--version-script=$(top_srcdir)/src/journal/libsystemd-journal.sym
1311
1312 libsystemd_journal_la_LIBADD = \
1313         libsystemd-basic.la \
1314         libsystemd-id128.la
1315
1316 if HAVE_XZ
1317 libsystemd_journal_la_SOURCES += \
1318         src/journal/compress.c
1319
1320 libsystemd_journal_la_CFLAGS += \
1321         $(XZ_CFLAGS)
1322
1323 libsystemd_journal_la_LIBADD += \
1324         $(XZ_LIBS)
1325 endif
1326
1327 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
1328 libsystemd-journal-install-hook:
1329         if test "$(libdir)" != "$(rootlibdir)"; then \
1330                 mkdir -p $(DESTDIR)$(rootlibdir) && \
1331                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/libsystemd-journal.so) && \
1332                 so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
1333                 ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/libsystemd-journal.so && \
1334                 mv $(DESTDIR)$(libdir)/libsystemd-journal.so.* $(DESTDIR)$(rootlibdir); \
1335         fi
1336
1337 INSTALL_EXEC_HOOKS += \
1338         libsystemd-journal-install-hook
1339
1340 libsystemd-journal-uninstall-hook:
1341         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-journal.so*
1342
1343 UNINSTALL_EXEC_HOOKS += \
1344         libsystemd-journal-uninstall-hook
1345
1346 noinst_PROGRAMS += \
1347         test-journal
1348
1349 pkginclude_HEADERS += \
1350         src/systemd/sd-journal.h \
1351         src/systemd/sd-messages.h
1352
1353 lib_LTLIBRARIES += \
1354         libsystemd-journal.la
1355
1356 rootlibexec_PROGRAMS += \
1357         systemd-journald
1358
1359 rootbin_PROGRAMS += \
1360         systemd-journalctl
1361
1362 bin_PROGRAMS += \
1363         systemd-cat
1364
1365 dist_systemunit_DATA += \
1366         units/systemd-journald.socket
1367
1368 nodist_systemunit_DATA += \
1369         units/systemd-journald.service
1370
1371 dist_pkgsysconf_DATA += \
1372         src/journal/systemd-journald.conf
1373
1374 pkgconfiglib_DATA += \
1375         src/journal/libsystemd-journal.pc
1376
1377 journal-install-data-hook:
1378         $(MKDIR_P) -m 0755 \
1379                 $(DESTDIR)$(systemunitdir)/sockets.target.wants \
1380                 $(DESTDIR)$(systemunitdir)/sysinit.target.wants
1381         ( cd $(DESTDIR)$(systemunitdir)/sockets.target.wants && \
1382                 rm -f systemd-journald.socket && \
1383                 $(LN_S) ../systemd-journald.socket )
1384         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
1385                 rm -f systemd-journald.service && \
1386                 $(LN_S) ../systemd-journald.service )
1387
1388 INSTALL_DATA_HOOKS += \
1389         journal-install-data-hook
1390
1391 EXTRA_DIST += \
1392         src/journal/journald.h \
1393         src/journal/journal-def.h \
1394         src/journal/journal-internal.h \
1395         src/journal/journal-file.h \
1396         src/journal/lookup3.h \
1397         src/journal/compress.h \
1398         src/journal/journal-rate-limit.h \
1399         src/journal/libsystemd-journal.pc.in \
1400         src/journal/libsystemd-journal.sym \
1401         units/systemd-journald.service.in \
1402         src/journal/journald-gperf.gperf
1403
1404 CLEANFILES += \
1405         src/journal/journald-gperf.c
1406
1407 # ------------------------------------------------------------------------------
1408 if ENABLE_COREDUMP
1409 systemd_coredump_SOURCES = \
1410         src/journal/coredump.c
1411
1412 systemd_coredump_LDADD = \
1413         libsystemd-basic.la \
1414         libsystemd-journal.la \
1415         libsystemd-login.la
1416
1417 rootlibexec_PROGRAMS += \
1418         systemd-coredump
1419
1420 sysctl_DATA = \
1421         sysctl.d/coredump.conf
1422
1423 EXTRA_DIST += \
1424         sysctl.d/coredump.conf.in
1425
1426 CLEANFILES += \
1427         sysctl.d/coredump.conf
1428 endif
1429
1430 # ------------------------------------------------------------------------------
1431 if ENABLE_BINFMT
1432 systemd_binfmt_SOURCES = \
1433         src/binfmt/binfmt.c
1434
1435 systemd_binfmt_LDADD = \
1436         libsystemd-basic.la
1437
1438 rootlibexec_PROGRAMS += \
1439         systemd-binfmt
1440
1441 dist_systemunit_DATA += \
1442         units/proc-sys-fs-binfmt_misc.automount \
1443         units/proc-sys-fs-binfmt_misc.mount
1444
1445 nodist_systemunit_DATA += \
1446         units/systemd-binfmt.service
1447
1448 binfmt-install-data-hook:
1449         $(MKDIR_P) -m 0755 \
1450                 $(DESTDIR)$(prefix)/lib/binfmt.d \
1451                 $(DESTDIR)$(sysconfdir)/binfmt.d \
1452                 $(DESTDIR)$(systemunitdir)/sysinit.target.wants
1453         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
1454                 rm -f systemd-binfmt.service \
1455                         proc-sys-fs-binfmt_misc.automount && \
1456                 $(LN_S) ../systemd-binfmt.service systemd-binfmt.service && \
1457                 $(LN_S) ../proc-sys-fs-binfmt_misc.automount proc-sys-fs-binfmt_misc.automount )
1458
1459 INSTALL_DATA_HOOKS += \
1460         binfmt-install-data-hook
1461
1462 MANPAGES += \
1463         man/binfmt.d.5
1464
1465 EXTRA_DIST += \
1466         units/systemd-binfmt.service.in
1467 endif
1468
1469 # ------------------------------------------------------------------------------
1470 if ENABLE_VCONSOLE
1471 systemd_vconsole_setup_SOURCES = \
1472         src/vconsole/vconsole-setup.c
1473
1474 systemd_vconsole_setup_LDADD = \
1475         libsystemd-basic.la
1476
1477 rootlibexec_PROGRAMS += \
1478         systemd-vconsole-setup
1479
1480 nodist_systemunit_DATA += \
1481         units/systemd-vconsole-setup.service
1482
1483 vconsole-install-data-hook:
1484         $(MKDIR_P) -m 0755 \
1485                 $(DESTDIR)$(systemunitdir)/sysinit.target.wants
1486         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
1487                 rm -f systemd-vconsole-setup.service && \
1488                 $(LN_S) ../systemd-vconsole-setup.service systemd-vconsole-setup.service )
1489
1490 INSTALL_DATA_HOOKS += \
1491         vconsole-install-data-hook
1492
1493 MANPAGES += \
1494         man/vconsole.conf.5
1495
1496 EXTRA_DIST += \
1497         units/systemd-vconsole-setup.service.in
1498 endif
1499
1500 # ------------------------------------------------------------------------------
1501 if ENABLE_READAHEAD
1502 systemd_readahead_collect_SOURCES = \
1503         src/readahead/readahead-collect.c \
1504         src/readahead/readahead-common.c
1505
1506 systemd_readahead_collect_LDADD = \
1507         libsystemd-basic.la \
1508         libsystemd-daemon.la \
1509         $(UDEV_LIBS)
1510
1511 systemd_readahead_collect_CFLAGS = \
1512         $(AM_CFLAGS) \
1513         $(UDEV_CFLAGS)
1514
1515 systemd_readahead_replay_SOURCES = \
1516         src/readahead/readahead-replay.c \
1517         src/readahead/readahead-common.c
1518
1519 systemd_readahead_replay_CFLAGS = \
1520         $(AM_CFLAGS) \
1521         $(UDEV_CFLAGS)
1522
1523 systemd_readahead_replay_LDADD = \
1524         libsystemd-basic.la \
1525         libsystemd-daemon.la \
1526         $(UDEV_LIBS)
1527
1528 rootlibexec_PROGRAMS += \
1529         systemd-readahead-collect \
1530         systemd-readahead-replay
1531
1532 dist_systemunit_DATA += \
1533         units/systemd-readahead-done.timer
1534
1535 nodist_systemunit_DATA += \
1536         units/systemd-readahead-collect.service \
1537         units/systemd-readahead-replay.service \
1538         units/systemd-readahead-done.service
1539
1540 EXTRA_DIST += \
1541         src/systemd/sd-readahead.h \
1542         src/readahead/readahead-common.h \
1543         units/systemd-readahead-collect.service.in \
1544         units/systemd-readahead-replay.service.in \
1545         units/systemd-readahead-done.service.in
1546
1547 MANPAGES += \
1548         man/sd_readahead.3 \
1549         man/sd-readahead.7
1550 endif
1551
1552 # ------------------------------------------------------------------------------
1553 if ENABLE_QUOTACHECK
1554 rootlibexec_PROGRAMS += \
1555         systemd-quotacheck
1556
1557 nodist_systemunit_DATA += \
1558         units/quotacheck.service
1559
1560 EXTRA_DIST += \
1561         units/quotacheck.service.in
1562
1563 systemd_quotacheck_SOURCES = \
1564         src/quotacheck.c
1565
1566 systemd_quotacheck_LDADD = \
1567         libsystemd-basic.la
1568 endif
1569
1570 # ------------------------------------------------------------------------------
1571 if ENABLE_RANDOMSEED
1572 rootlibexec_PROGRAMS += \
1573         systemd-random-seed
1574
1575 nodist_systemunit_DATA += \
1576         units/systemd-random-seed-save.service \
1577         units/systemd-random-seed-load.service
1578
1579 EXTRA_DIST += \
1580         units/systemd-random-seed-save.service.in \
1581         units/systemd-random-seed-load.service.in
1582
1583 systemd_random_seed_SOURCES = \
1584         src/random-seed.c
1585
1586 systemd_random_seed_LDADD = \
1587         libsystemd-basic.la
1588
1589 randomseed-install-data-hook:
1590         $(MKDIR_P) -m 0755 \
1591                 $(DESTDIR)$(systemunitdir)/shutdown.target.wants \
1592                 $(DESTDIR)$(systemunitdir)/sysinit.target.wants
1593         ( cd $(DESTDIR)$(systemunitdir)/shutdown.target.wants && \
1594                 rm -f systemd-random-seed-save.service && \
1595                 $(LN_S) ../systemd-random-seed-save.service systemd-random-seed-save.service )
1596         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
1597                 rm -f systemd-random-seed-load.service && \
1598                 $(LN_S) ../systemd-random-seed-load.service systemd-random-seed-load.service )
1599
1600 INSTALL_DATA_HOOKS += \
1601         randomseed-install-data-hook
1602 endif
1603
1604 # ------------------------------------------------------------------------------
1605 if HAVE_LIBCRYPTSETUP
1606 rootlibexec_PROGRAMS += \
1607         systemd-cryptsetup
1608
1609 systemgenerator_PROGRAMS += \
1610         systemd-cryptsetup-generator
1611
1612 dist_systemunit_DATA += \
1613         units/cryptsetup.target
1614
1615 systemd_cryptsetup_SOURCES = \
1616         src/cryptsetup/cryptsetup.c \
1617         src/ask-password-api.c
1618
1619 systemd_cryptsetup_CFLAGS = \
1620         $(AM_CFLAGS) \
1621         $(LIBCRYPTSETUP_CFLAGS) \
1622         $(UDEV_CFLAGS)
1623
1624 systemd_cryptsetup_LDADD = \
1625         $(LIBCRYPTSETUP_LIBS) \
1626         $(UDEV_LIBS) \
1627         libsystemd-basic.la
1628
1629 systemd_cryptsetup_generator_SOURCES = \
1630         src/cryptsetup/cryptsetup-generator.c \
1631         src/unit-name.c
1632
1633 systemd_cryptsetup_generator_LDADD = \
1634         libsystemd-basic.la
1635
1636 cryptsetup-install-data-hook:
1637         $(MKDIR_P) -m 0755 \
1638                 $(DESTDIR)$(systemunitdir)/sysinit.target.wants
1639         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
1640                 rm -f cryptsetup.target && \
1641                 $(LN_S) ../cryptsetup.target cryptsetup.target )
1642
1643 INSTALL_DATA_HOOKS += \
1644         cryptsetup-install-data-hook
1645 endif
1646
1647 # ------------------------------------------------------------------------------
1648 if ENABLE_HOSTNAMED
1649 systemd_hostnamed_SOURCES = \
1650         src/hostname/hostnamed.c \
1651         src/dbus-common.c \
1652         src/polkit.c
1653
1654 systemd_hostnamed_CFLAGS = \
1655         $(AM_CFLAGS) \
1656         $(DBUS_CFLAGS)
1657
1658 systemd_hostnamed_LDADD = \
1659         libsystemd-basic.la \
1660         libsystemd-daemon.la \
1661         $(DBUS_LIBS)
1662
1663 rootlibexec_PROGRAMS += \
1664         systemd-hostnamed
1665
1666 nodist_systemunit_DATA += \
1667         units/systemd-hostnamed.service
1668
1669 dist_dbuspolicy_DATA += \
1670         src/hostname/org.freedesktop.hostname1.conf
1671
1672 dist_dbussystemservice_DATA += \
1673         src/hostname/org.freedesktop.hostname1.service
1674
1675 polkitpolicy_in_files += \
1676         src/hostname/org.freedesktop.hostname1.policy.in
1677
1678 dbusinterface_DATA += \
1679         org.freedesktop.hostname1.xml
1680
1681 org.freedesktop.hostname1.xml: systemd-hostnamed
1682         $(AM_V_GEN)$(LIBTOOL) --mode=execute $(OBJCOPY) -O binary -j introspect.hostname1 $< $@.tmp && \
1683                 $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
1684                 $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
1685
1686 hostnamed-install-data-hook:
1687         ( cd $(DESTDIR)$(systemunitdir) && \
1688                 rm -f dbus-org.freedesktop.hostname1.service && \
1689                 $(LN_S) systemd-hostnamed.service dbus-org.freedesktop.hostname1.service )
1690
1691 INSTALL_DATA_HOOKS += \
1692         hostnamed-install-data-hook
1693
1694 EXTRA_DIST += \
1695         units/systemd-hostnamed.service.in
1696 endif
1697
1698 # ------------------------------------------------------------------------------
1699 if ENABLE_LOCALED
1700 systemd_localed_SOURCES = \
1701         src/locale/localed.c \
1702         src/dbus-common.c \
1703         src/polkit.c
1704
1705 systemd_localed_CFLAGS = \
1706         $(AM_CFLAGS) \
1707         $(DBUS_CFLAGS)
1708
1709 systemd_localed_LDADD = \
1710         libsystemd-basic.la \
1711         libsystemd-daemon.la \
1712         $(DBUS_LIBS)
1713
1714 nodist_systemunit_DATA += \
1715         units/systemd-localed.service
1716
1717 rootlibexec_PROGRAMS += \
1718         systemd-localed
1719
1720 dist_dbuspolicy_DATA += \
1721         src/locale/org.freedesktop.locale1.conf
1722
1723 dist_dbussystemservice_DATA += \
1724         src/locale/org.freedesktop.locale1.service
1725
1726 polkitpolicy_in_files += \
1727         src/locale/org.freedesktop.locale1.policy.in
1728
1729 dbusinterface_DATA += \
1730         org.freedesktop.locale1.xml
1731
1732 org.freedesktop.locale1.xml: systemd-localed
1733         $(AM_V_GEN)$(LIBTOOL) --mode=execute $(OBJCOPY) -O binary -j introspect.locale1 $< $@.tmp && \
1734                 $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
1735                 $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
1736
1737 localed-install-data-hook:
1738         ( cd $(DESTDIR)$(systemunitdir) && \
1739                 rm -f dbus-org.freedesktop.locale1.service && \
1740                 $(LN_S) systemd-localed.service dbus-org.freedesktop.locale1.service )
1741
1742 INSTALL_DATA_HOOKS += \
1743         localed-install-data-hook
1744
1745 EXTRA_DIST += \
1746         units/systemd-localed.service.in
1747
1748 dist_pkgdata_DATA = \
1749         src/locale/kbd-model-map
1750
1751 dist_noinst_SCRIPT = \
1752         src/locale/generate-kbd-model-map
1753
1754 update-kbd-model-map:
1755         src/locale/generate-kbd-model-map > src/locale/kbd-model-map
1756
1757 endif
1758
1759 # ------------------------------------------------------------------------------
1760 if ENABLE_TIMEDATED
1761 systemd_timedated_SOURCES = \
1762         src/timedate/timedated.c \
1763         src/dbus-common.c \
1764         src/polkit.c
1765
1766 systemd_timedated_CFLAGS = \
1767         $(AM_CFLAGS) \
1768         $(DBUS_CFLAGS)
1769
1770 systemd_timedated_LDADD = \
1771         libsystemd-basic.la \
1772         libsystemd-daemon.la \
1773         $(DBUS_LIBS)
1774
1775 rootlibexec_PROGRAMS += \
1776         systemd-timedated
1777
1778 dist_dbussystemservice_DATA += \
1779         src/timedate/org.freedesktop.timedate1.service
1780
1781 dist_dbuspolicy_DATA += \
1782         src/timedate/org.freedesktop.timedate1.conf
1783
1784 nodist_systemunit_DATA += \
1785         units/systemd-timedated.service
1786
1787 polkitpolicy_in_files += \
1788         src/timedate/org.freedesktop.timedate1.policy.in
1789
1790 org.freedesktop.timedate1.xml: systemd-timedated
1791         $(AM_V_GEN)$(LIBTOOL) --mode=execute $(OBJCOPY) -O binary -j introspect.timedate1 $< $@.tmp && \
1792                 $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
1793                 $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
1794
1795 dbusinterface_DATA += \
1796         org.freedesktop.timedate1.xml
1797
1798 timedated-install-data-hook:
1799         ( cd $(DESTDIR)$(systemunitdir) && \
1800                 rm -f dbus-org.freedesktop.timedate1.service  && \
1801                 $(LN_S) systemd-timedated.service dbus-org.freedesktop.timedate1.service )
1802
1803 INSTALL_DATA_HOOKS += \
1804         timedated-install-data-hook
1805
1806 EXTRA_DIST += \
1807         units/systemd-timedated.service.in
1808 endif
1809
1810 # ------------------------------------------------------------------------------
1811 if ENABLE_LOGIND
1812 systemd_logind_SOURCES = \
1813         src/login/logind.c \
1814         src/login/logind-dbus.c \
1815         src/login/logind-device.c \
1816         src/login/logind-seat.c \
1817         src/login/logind-seat-dbus.c \
1818         src/login/logind-session.c \
1819         src/login/logind-session-dbus.c \
1820         src/login/logind-user.c \
1821         src/login/logind-user-dbus.c \
1822         src/dbus-common.c \
1823         src/dbus-loop.c \
1824         src/cgroup-util.c \
1825         src/polkit.c
1826
1827 nodist_systemd_logind_SOURCES = \
1828         src/login/logind-gperf.c
1829
1830 if HAVE_ACL
1831 systemd_logind_SOURCES += \
1832         src/login/logind-acl.c \
1833         src/acl-util.c
1834 endif
1835
1836 systemd_logind_CFLAGS = \
1837         $(AM_CFLAGS) \
1838         $(DBUS_CFLAGS) \
1839         $(UDEV_CFLAGS) \
1840         $(ACL_CFLAGS)
1841
1842 systemd_logind_LDADD = \
1843         libsystemd-basic.la \
1844         libsystemd-daemon.la \
1845         $(DBUS_LIBS) \
1846         $(UDEV_LIBS) \
1847         $(ACL_LIBS)
1848
1849 systemd_user_sessions_SOURCES = \
1850         src/login/user-sessions.c \
1851         src/cgroup-util.c
1852
1853 systemd_user_sessions_LDADD = \
1854         libsystemd-basic.la
1855
1856 rootlibexec_PROGRAMS += \
1857         systemd-logind \
1858         systemd-user-sessions
1859
1860 systemd_loginctl_SOURCES = \
1861         src/login/loginctl.c \
1862         src/login/sysfs-show.c \
1863         src/dbus-common.c \
1864         src/cgroup-show.c \
1865         src/cgroup-util.c \
1866         src/pager.c
1867
1868 systemd_loginctl_CFLAGS = \
1869         $(AM_CFLAGS) \
1870         $(DBUS_CFLAGS) \
1871         $(UDEV_CFLAGS)
1872
1873 systemd_loginctl_LDADD = \
1874         libsystemd-basic.la \
1875         $(DBUS_LIBS) \
1876         $(UDEV_LIBS)
1877
1878 rootbin_PROGRAMS += \
1879         systemd-loginctl
1880
1881 test_login_SOURCES = \
1882         src/login/test-login.c
1883
1884 test_login_LDADD = \
1885         libsystemd-basic.la \
1886         libsystemd-login.la
1887
1888 noinst_PROGRAMS += \
1889         test-login
1890
1891 libsystemd_login_la_SOURCES = \
1892         src/login/sd-login.c \
1893         src/cgroup-util.c
1894
1895 libsystemd_login_la_CFLAGS = \
1896         $(AM_CFLAGS) \
1897         -fvisibility=hidden
1898
1899 libsystemd_login_la_LDFLAGS = \
1900         -shared \
1901         -version-info $(LIBSYSTEMD_LOGIN_CURRENT):$(LIBSYSTEMD_LOGIN_REVISION):$(LIBSYSTEMD_LOGIN_AGE) \
1902         -Wl,--version-script=$(top_srcdir)/src/login/libsystemd-login.sym
1903
1904 libsystemd_login_la_LIBADD = \
1905         libsystemd-basic.la
1906
1907 if HAVE_PAM
1908 pam_systemd_la_SOURCES = \
1909         src/login/pam-module.c \
1910         src/dbus-common.c
1911
1912 pam_systemd_la_CFLAGS = \
1913         $(AM_CFLAGS) \
1914         $(PAM_CFLAGS) \
1915         $(DBUS_CFLAGS) \
1916         -fvisibility=hidden
1917
1918 pam_systemd_la_LDFLAGS = \
1919         -module \
1920         -export-dynamic \
1921         -avoid-version \
1922         -shared \
1923         -export-symbols-regex '^pam_sm_.*'
1924
1925 pam_systemd_la_LIBADD = \
1926         libsystemd-basic.la \
1927         libsystemd-daemon.la \
1928         $(PAM_LIBS) \
1929         $(DBUS_LIBS)
1930
1931 pamlib_LTLIBRARIES = \
1932         pam_systemd.la
1933 endif
1934
1935 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
1936 libsystemd-login-install-hook:
1937         if test "$(libdir)" != "$(rootlibdir)"; then \
1938                 mkdir -p $(DESTDIR)$(rootlibdir) && \
1939                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/libsystemd-login.so) && \
1940                 so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
1941                 ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/libsystemd-login.so && \
1942                 mv $(DESTDIR)$(libdir)/libsystemd-login.so.* $(DESTDIR)$(rootlibdir); \
1943         fi
1944
1945 INSTALL_EXEC_HOOKS += \
1946         libsystemd-login-install-hook
1947
1948 libsystemd-login-uninstall-hook:
1949         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-login.so*
1950
1951 UNINSTALL_EXEC_HOOKS += \
1952         libsystemd-login-uninstall-hook
1953
1954 nodist_systemunit_DATA += \
1955         units/systemd-logind.service \
1956         units/systemd-user-sessions.service
1957
1958 dist_dbussystemservice_DATA += \
1959         src/login/org.freedesktop.login1.service
1960
1961 dist_dbuspolicy_DATA += \
1962         src/login/org.freedesktop.login1.conf
1963
1964 dist_pkgsysconf_DATA += \
1965         src/login/systemd-logind.conf
1966
1967 pkginclude_HEADERS += \
1968         src/systemd/sd-login.h
1969
1970 lib_LTLIBRARIES += \
1971         libsystemd-login.la
1972
1973 pkgconfiglib_DATA += \
1974         src/login/libsystemd-login.pc
1975
1976 polkitpolicy_in_files += \
1977         src/login/org.freedesktop.login1.policy.in
1978
1979 logind-install-data-hook:
1980         $(MKDIR_P) -m 0755 \
1981                 $(DESTDIR)$(systemunitdir)/multi-user.target.wants
1982         ( cd $(DESTDIR)$(systemunitdir) && \
1983                 rm -f dbus-org.freedesktop.login1.service && \
1984                 $(LN_S) systemd-logind.service dbus-org.freedesktop.login1.service)
1985         ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
1986                 rm -f systemd-logind.service systemd-user-sessions.service && \
1987                 $(LN_S) ../systemd-logind.service systemd-logind.service && \
1988                 $(LN_S) ../systemd-user-sessions.service systemd-user-sessions.service )
1989
1990 INSTALL_DATA_HOOKS += \
1991         logind-install-data-hook
1992
1993 systemd_multi_seat_x_SOURCES = \
1994         src/login/multi-seat-x.c
1995
1996 systemd_multi_seat_x_CFLAGS = \
1997         $(AM_CFLAGS) \
1998         $(UDEV_CFLAGS)
1999
2000 systemd_multi_seat_x_LDADD = \
2001         libsystemd-basic.la \
2002         $(UDEV_LIBS)
2003
2004 rootlibexec_PROGRAMS += \
2005         systemd-multi-seat-x
2006
2007 systemd_uaccess_SOURCES = \
2008         src/login/uaccess.c
2009
2010 if HAVE_ACL
2011 systemd_uaccess_SOURCES += \
2012         src/login/logind-acl.c \
2013         src/acl-util.c
2014 endif
2015
2016 systemd_uaccess_CFLAGS = \
2017         $(AM_CFLAGS) \
2018         $(UDEV_CFLAGS) \
2019         $(ACL_CFLAGS)
2020
2021 systemd_uaccess_LDADD = \
2022         libsystemd-basic.la \
2023         libsystemd-daemon.la \
2024         libsystemd-login.la \
2025         $(UDEV_LIBS) \
2026         $(ACL_LIBS)
2027
2028 rootlibexec_PROGRAMS += \
2029         systemd-uaccess
2030
2031 dist_udevrules_DATA += \
2032         src/login/70-uaccess.rules
2033
2034 dist_udevrules_DATA += \
2035         src/login/71-seat.rules
2036
2037 nodist_udevrules_DATA += \
2038         src/login/73-seat-late.rules
2039
2040 MANPAGES += \
2041         man/systemd-logind.conf.5 \
2042         man/sd-login.7 \
2043         man/systemd-loginctl.1 \
2044         man/sd_login_monitor_new.3 \
2045         man/sd_pid_get_session.3 \
2046         man/sd_uid_get_state.3 \
2047         man/sd_session_is_active.3 \
2048         man/sd_seat_get_active.3 \
2049         man/sd_get_seats.3
2050
2051 MANPAGES_ALIAS += \
2052         man/sd_login_monitor_unref.3 \
2053         man/sd_login_monitor_flush.3 \
2054         man/sd_login_monitor_get_fd.3 \
2055         man/sd_session_get_uid.3 \
2056         man/sd_session_get_seat.3 \
2057         man/sd_pid_get_owner_uid.3 \
2058         man/sd_pid_get_unit.3 \
2059         man/sd_uid_is_on_seat.3 \
2060         man/sd_uid_get_sessions.3 \
2061         man/sd_uid_get_seats.3 \
2062         man/sd_seat_get_sessions.3 \
2063         man/sd_seat_can_multi_session.3 \
2064         man/sd_get_sessions.3 \
2065         man/sd_get_uids.3
2066
2067 man/sd_login_monitor_unref.3: man/sd_login_monitor_new.3
2068 man/sd_login_monitor_flush.3: man/sd_login_monitor_new.3
2069 man/sd_login_monitor_get_fd.3: man/sd_login_monitor_new.3
2070 man/sd_session_get_uid.3: man/sd_session_is_active.3
2071 man/sd_session_get_seat.3: man/sd_session_is_active.3
2072 man/sd_pid_get_owner_uid.3: man/sd_pid_get_session.3
2073 man/sd_pid_get_unit.3: man/sd_pid_get_session.3
2074 man/sd_uid_is_on_seat.3: man/sd_uid_get_state.3
2075 man/sd_uid_get_sessions.3: man/sd_uid_get_state.3
2076 man/sd_uid_get_seats.3: man/sd_uid_get_state.3
2077 man/sd_seat_get_sessions.3: man/sd_seat_get_active.3
2078 man/sd_seat_can_multi_session.3: man/sd_seat_get_active.3
2079 man/sd_get_sessions.3: man/sd_get_seats.3
2080 man/sd_get_uids.3: man/sd_get_seats.3
2081
2082 EXTRA_DIST += \
2083         src/login/logind-gperf.gperf \
2084         src/login/libsystemd-login.pc.in \
2085         src/login/libsystemd-login.sym \
2086         src/login/logind.h \
2087         src/login/logind-device.h \
2088         src/login/logind-seat.h \
2089         src/login/logind-session.h \
2090         src/login/logind-user.h \
2091         src/login/logind-acl.h \
2092         src/login/73-seat-late.rules.in \
2093         units/systemd-logind.service.in \
2094         units/systemd-user-sessions.service.in
2095
2096 CLEANFILES += \
2097         src/login/logind-gperf.c \
2098         src/login/73-seat-late.rules
2099 endif
2100 # ------------------------------------------------------------------------------
2101
2102 SED_PROCESS = \
2103         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
2104         $(SED)  -e 's,@rootlibexecdir\@,$(rootlibexecdir),g' \
2105                 -e 's,@rootbindir\@,$(rootbindir),g' \
2106                 -e 's,@bindir\@,$(bindir),g' \
2107                 -e 's,@SYSTEMCTL\@,$(rootbindir)/systemctl,g' \
2108                 -e 's,@SYSTEMD_NOTIFY\@,$(rootbindir)/systemd-notify,g' \
2109                 -e 's,@pkgsysconfdir\@,$(pkgsysconfdir),g' \
2110                 -e 's,@pkgdatadir\@,$(pkgdatadir),g' \
2111                 -e 's,@pkglibexecdir\@,$(pkglibexecdir),g' \
2112                 -e 's,@systemunitdir\@,$(systemunitdir),g' \
2113                 -e 's,@userunitdir\@,$(userunitdir),g' \
2114                 -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
2115                 -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
2116                 -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' \
2117                 -e 's,@prefix\@,$(prefix),g' \
2118                 -e 's,@exec_prefix\@,$(exec_prefix),g' \
2119                 -e 's,@libdir\@,$(libdir),g' \
2120                 -e 's,@includedir\@,$(includedir),g' \
2121                 < $< > $@ || rm $@
2122
2123 units/%: units/%.in Makefile
2124         $(SED_PROCESS)
2125
2126 man/%: man/%.in Makefile
2127         $(SED_PROCESS)
2128
2129 sysctl.d/%: sysctl.d/%.in Makefile
2130         $(SED_PROCESS)
2131
2132 %.pc: %.pc.in Makefile
2133         $(SED_PROCESS)
2134
2135 src/%.policy.in: src/%.policy.in.in Makefile
2136         $(SED_PROCESS)
2137
2138 src/%.rules: src/%.rules.in Makefile
2139         $(SED_PROCESS)
2140
2141 src/%.c: src/%.gperf
2142         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
2143         $(GPERF) < $< > $@
2144
2145 src/%: src/%.m4
2146         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
2147         $(M4) -P $(M4_DEFINES) < $< > $@ || rm $@
2148
2149 src/load-fragment-gperf-nulstr.c: src/load-fragment-gperf.gperf
2150         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
2151         $(AWK) 'BEGIN{ keywords=0 ; FS="," ; print "extern const char load_fragment_gperf_nulstr[];" ; print "const char load_fragment_gperf_nulstr[] ="} ; keyword==1 { print "\"" $$1 "\\0\"" } ; /%%/ { keyword=1} ; END { print ";" }' < $< > $@ || rm $@
2152
2153 M4_PROCESS_SYSTEM = \
2154         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
2155         $(M4) -P $(M4_DEFINES) -DFOR_SYSTEM=1 < $< > $@ || rm $@
2156
2157 M4_PROCESS_USER = \
2158         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
2159         $(M4) -P $(M4_DEFINES) -DFOR_USER=1 < $< > $@ || rm $@
2160
2161 units/%: units/%.m4 Makefile
2162         $(M4_PROCESS_SYSTEM)
2163
2164 units/user/%: units/%.m4 Makefile
2165         $(M4_PROCESS_USER)
2166
2167 CLEANFILES += \
2168         $(nodist_systemunit_DATA) \
2169         $(nodist_userunit_DATA) \
2170         $(nodist_man_MANS) \
2171         ${XML_IN_FILES:.xml.in=.html} \
2172         $(pkgconfigdata_DATA) \
2173         $(pkgconfiglib_DATA) \
2174         $(nodist_polkitpolicy_DATA) \
2175         src/load-fragment-gperf.gperf \
2176         src/load-fragment-gperf.c \
2177         src/load-fragment-gperf-nulstr.c \
2178         src/99-systemd.rules
2179
2180 if HAVE_VALAC
2181 CLEANFILES += \
2182         ${systemadm_SOURCES:.vala=.c}
2183 endif
2184
2185 if HAVE_XSLTPROC
2186 XSLTPROC_FLAGS = \
2187         --nonet \
2188         --stringparam funcsynopsis.style ansi
2189
2190 XSLTPROC_PROCESS_MAN = \
2191         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
2192         $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
2193
2194 XSLTPROC_PROCESS_MAN_IN = \
2195         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
2196         $(XSLTPROC) -o ${@:.in=} $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< && \
2197         mv ${@:.in=} $@
2198
2199 XSLTPROC_PROCESS_HTML = \
2200         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
2201         $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
2202
2203 XSLTPROC_PROCESS_HTML_IN = \
2204         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
2205         $(XSLTPROC) -o ${@:.in=} $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $< && \
2206         mv ${@:.in=} $@
2207
2208 man/%.1: man/%.xml
2209         $(XSLTPROC_PROCESS_MAN)
2210
2211 man/%.1.in: man/%.xml.in
2212         $(XSLTPROC_PROCESS_MAN)
2213
2214 man/%.3: man/%.xml
2215         $(XSLTPROC_PROCESS_MAN)
2216
2217 man/%.3.in: man/%.xml.in
2218         $(XSLTPROC_PROCESS_MAN)
2219
2220 man/%.5: man/%.xml
2221         $(XSLTPROC_PROCESS_MAN)
2222
2223 man/%.5.in: man/%.xml.in
2224         $(XSLTPROC_PROCESS_MAN)
2225
2226 man/%.7: man/%.xml
2227         $(XSLTPROC_PROCESS_MAN)
2228
2229 man/%.7.in: man/%.xml.in
2230         $(XSLTPROC_PROCESS_MAN_IN)
2231
2232 man/%.8: man/%.xml
2233         $(XSLTPROC_PROCESS_MAN)
2234
2235 man/%.8.in: man/%.xml.in
2236         $(XSLTPROC_PROCESS_MAN_IN)
2237
2238 man/%.html: man/%.xml
2239         $(XSLTPROC_PROCESS_HTML)
2240
2241 man/%.html.in: man/%.xml.in
2242         $(XSLTPROC_PROCESS_HTML_IN)
2243
2244 CLEANFILES += \
2245         $(dist_man_MANS) \
2246         ${nodist_man_MANS:=.in} \
2247         ${XML_FILES:.xml=.html} \
2248         ${XML_IN_FILES:.xml.in=.html.in}
2249 endif
2250
2251 DBUS_PREPROCESS = $(CPP) -P $(DBUS_CFLAGS) -imacros dbus/dbus-protocol.h
2252
2253 org.freedesktop.systemd1.%.xml: systemd
2254         $(AM_V_GEN)$(LIBTOOL) --mode=execute $(OBJCOPY) -O binary -j introspect.$* $< $@.tmp && \
2255                 $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
2256                 $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
2257
2258 CLEANFILES += \
2259         $(dbusinterface_DATA)
2260
2261 systemd-install-data-hook:
2262         $(MKDIR_P) -m 0755 \
2263                 $(DESTDIR)$(tmpfilesdir) \
2264                 $(DESTDIR)$(sysconfdir)/tmpfiles.d \
2265                 $(DESTDIR)$(prefix)/lib/modules-load.d \
2266                 $(DESTDIR)$(sysconfdir)/modules-load.d \
2267                 $(DESTDIR)$(prefix)/lib/sysctl.d \
2268                 $(DESTDIR)$(sysconfdir)/sysctl.d \
2269                 $(DESTDIR)$(systemshutdowndir) \
2270                 $(DESTDIR)$(systemgeneratordir) \
2271                 $(DESTDIR)$(usergeneratordir)
2272         $(MKDIR_P) -m 0755 \
2273                 $(DESTDIR)$(systemunitdir) \
2274                 $(DESTDIR)$(userunitdir) \
2275                 $(DESTDIR)$(systemunitdir)/sysinit.target.wants \
2276                 $(DESTDIR)$(systemunitdir)/sockets.target.wants \
2277                 $(DESTDIR)$(systemunitdir)/basic.target.wants \
2278                 $(DESTDIR)$(systemunitdir)/shutdown.target.wants \
2279                 $(DESTDIR)$(systemunitdir)/local-fs.target.wants \
2280                 $(DESTDIR)$(systemunitdir)/runlevel1.target.wants \
2281                 $(DESTDIR)$(systemunitdir)/runlevel2.target.wants \
2282                 $(DESTDIR)$(systemunitdir)/runlevel3.target.wants \
2283                 $(DESTDIR)$(systemunitdir)/runlevel4.target.wants \
2284                 $(DESTDIR)$(systemunitdir)/runlevel5.target.wants \
2285                 $(DESTDIR)$(systemunitdir)/multi-user.target.wants \
2286                 $(DESTDIR)$(systemunitdir)/graphical.target.wants \
2287                 $(DESTDIR)$(pkgsysconfdir)/system \
2288                 $(DESTDIR)$(pkgsysconfdir)/system/sysinit.target.wants \
2289                 $(DESTDIR)$(pkgsysconfdir)/system/local-fs.target.wants \
2290                 $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants \
2291                 $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants \
2292                 $(DESTDIR)$(pkgsysconfdir)/user \
2293                 $(DESTDIR)$(dbussessionservicedir) \
2294                 $(DESTDIR)$(sysconfdir)/xdg/systemd
2295         ( cd $(DESTDIR)$(sysconfdir)/xdg/systemd/ && \
2296                 rm -f user && \
2297                 $(LN_S) $(pkgsysconfdir)/user user )
2298         ( cd $(DESTDIR)$(systemunitdir)/sockets.target.wants && \
2299                 rm -f systemd-initctl.socket systemd-shutdownd.socket && \
2300                 $(LN_S) ../systemd-initctl.socket systemd-initctl.socket && \
2301                 $(LN_S) ../systemd-shutdownd.socket systemd-shutdownd.socket )
2302         ( cd $(DESTDIR)$(systemunitdir)/runlevel1.target.wants && \
2303                 rm -f systemd-update-utmp-runlevel.service && \
2304                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
2305         ( cd $(DESTDIR)$(systemunitdir)/runlevel2.target.wants && \
2306                 rm -f systemd-update-utmp-runlevel.service && \
2307                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
2308         ( cd $(DESTDIR)$(systemunitdir)/runlevel3.target.wants && \
2309                 rm -f systemd-update-utmp-runlevel.service && \
2310                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
2311         ( cd $(DESTDIR)$(systemunitdir)/runlevel4.target.wants && \
2312                 rm -f systemd-update-utmp-runlevel.service && \
2313                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
2314         ( cd $(DESTDIR)$(systemunitdir)/runlevel5.target.wants && \
2315                 rm -f systemd-update-utmp-runlevel.service && \
2316                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
2317         ( cd $(DESTDIR)$(systemunitdir)/shutdown.target.wants && \
2318                 rm -f systemd-update-utmp-shutdown.service && \
2319                 $(LN_S) ../systemd-update-utmp-shutdown.service systemd-update-utmp-shutdown.service )
2320         ( cd $(DESTDIR)$(systemunitdir)/local-fs.target.wants && \
2321                 rm -f systemd-remount-api-vfs.service \
2322                         fsck-root.service \
2323                         remount-rootfs.service \
2324                         var-run.mount \
2325                         media.mount && \
2326                 $(LN_S) ../systemd-remount-api-vfs.service systemd-remount-api-vfs.service && \
2327                 $(LN_S) ../fsck-root.service fsck-root.service && \
2328                 $(LN_S) ../remount-rootfs.service remount-rootfs.service && \
2329                 $(LN_S) ../var-run.mount var-run.mount && \
2330                 $(LN_S) ../media.mount media.mount )
2331         ( cd $(DESTDIR)$(userunitdir) && \
2332                 rm -f shutdown.target sockets.target bluetooth.target printer.target sound.target && \
2333                 $(LN_S) $(systemunitdir)/shutdown.target shutdown.target && \
2334                 $(LN_S) $(systemunitdir)/sockets.target sockets.target && \
2335                 $(LN_S) $(systemunitdir)/bluetooth.target bluetooth.target && \
2336                 $(LN_S) $(systemunitdir)/printer.target printer.target && \
2337                 $(LN_S) $(systemunitdir)/sound.target sound.target )
2338         ( cd $(DESTDIR)$(systemunitdir) && \
2339                 rm -f runlevel0.target runlevel1.target runlevel2.target runlevel3.target runlevel4.target runlevel5.target runlevel6.target && \
2340                 $(LN_S) poweroff.target runlevel0.target && \
2341                 $(LN_S) rescue.target runlevel1.target && \
2342                 $(LN_S) multi-user.target runlevel2.target && \
2343                 $(LN_S) multi-user.target runlevel3.target && \
2344                 $(LN_S) multi-user.target runlevel4.target && \
2345                 $(LN_S) graphical.target runlevel5.target && \
2346                 $(LN_S) reboot.target runlevel6.target )
2347         ( cd $(DESTDIR)$(systemunitdir) && \
2348                 rm -f default.target ctrl-alt-del.target autovt@.service && \
2349                 $(LN_S) graphical.target default.target && \
2350                 $(LN_S) reboot.target ctrl-alt-del.target && \
2351                 $(LN_S) getty@.service autovt@.service )
2352         ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
2353                 rm -f getty.target systemd-ask-password-wall.path && \
2354                 $(LN_S) ../getty.target getty.target && \
2355                 $(LN_S) ../systemd-ask-password-wall.path systemd-ask-password-wall.path)
2356         ( cd $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants && \
2357                 rm -f getty@tty1.service && \
2358                 $(LN_S) $(systemunitdir)/getty@.service getty@tty1.service )
2359         ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
2360                 rm -f remote-fs.target && \
2361                 $(LN_S) $(systemunitdir)/remote-fs.target remote-fs.target )
2362         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
2363                 rm -f dev-hugepages.mount \
2364                         dev-mqueue.mount \
2365                         sys-kernel-config.mount \
2366                         sys-kernel-debug.mount \
2367                         sys-kernel-security.mount \
2368                         sys-fs-fuse-connections.mount \
2369                         systemd-modules-load.service \
2370                         systemd-tmpfiles-setup.service \
2371                         systemd-sysctl.service \
2372                         systemd-ask-password-console.path && \
2373                 $(LN_S) ../dev-hugepages.mount dev-hugepages.mount && \
2374                 $(LN_S) ../dev-mqueue.mount dev-mqueue.mount && \
2375                 $(LN_S) ../sys-kernel-config.mount sys-kernel-config.mount && \
2376                 $(LN_S) ../sys-kernel-debug.mount sys-kernel-debug.mount && \
2377                 $(LN_S) ../sys-kernel-security.mount sys-kernel-security.mount && \
2378                 $(LN_S) ../sys-fs-fuse-connections.mount sys-fs-fuse-connections.mount && \
2379                 $(LN_S) ../systemd-modules-load.service systemd-modules-load.service && \
2380                 $(LN_S) ../systemd-tmpfiles-setup.service systemd-tmpfiles-setup.service && \
2381                 $(LN_S) ../systemd-sysctl.service systemd-sysctl.service && \
2382                 $(LN_S) ../systemd-ask-password-console.path systemd-ask-password-console.path )
2383         ( cd $(DESTDIR)$(systemunitdir)/basic.target.wants && \
2384                 rm -f systemd-tmpfiles-clean.timer && \
2385                 $(LN_S) ../systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.timer )
2386         ( cd $(DESTDIR)$(dbussessionservicedir) && \
2387                 rm -f org.freedesktop.systemd1.service && \
2388                 $(LN_S) ../system-services/org.freedesktop.systemd1.service org.freedesktop.systemd1.service )
2389 if HAVE_PLYMOUTH
2390         $(MKDIR_P) -m 0755 \
2391                 $(DESTDIR)$(SYSTEM_SYSVINIT_PATH) \
2392                 $(DESTDIR)$(systemunitdir)/reboot.target.wants \
2393                 $(DESTDIR)$(systemunitdir)/kexec.target.wants \
2394                 $(DESTDIR)$(systemunitdir)/poweroff.target.wants \
2395                 $(DESTDIR)$(systemunitdir)/halt.target.wants
2396         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
2397                 rm -f plymouth-start.service plymouth-read-write.service && \
2398                 $(LN_S) ../plymouth-start.service plymouth-start.service && \
2399                 $(LN_S) ../plymouth-read-write.service plymouth-read-write.service )
2400         ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
2401                 rm -f plymouth-quit.service plymouth-quit-wait.service && \
2402                 $(LN_S) ../plymouth-quit.service plymouth-quit.service && \
2403                 $(LN_S) ../plymouth-quit-wait.service plymouth-quit-wait.service )
2404         ( cd $(DESTDIR)$(systemunitdir)/reboot.target.wants && \
2405                 rm -f plymouth-reboot.service && \
2406                 $(LN_S) ../plymouth-reboot.service plymouth-reboot.service )
2407         ( cd $(DESTDIR)$(systemunitdir)/kexec.target.wants && \
2408                 rm -f plymouth-kexec.service && \
2409                 $(LN_S) ../plymouth-kexec.service plymouth-kexec.service )
2410         ( cd $(DESTDIR)$(systemunitdir)/poweroff.target.wants && \
2411                 rm -f plymouth-poweroff.service && \
2412                 $(LN_S) ../plymouth-poweroff.service plymouth-poweroff.service )
2413         ( cd $(DESTDIR)$(systemunitdir)/halt.target.wants && \
2414                 rm -f plymouth-halt.service && \
2415                 $(LN_S) ../plymouth-halt.service plymouth-halt.service )
2416 endif
2417 if TARGET_MEEGO
2418         $(MKDIR_P) -m 0755 $(DESTDIR)$(systemunitdir)/final.target.wants
2419         ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
2420                 rm -f network.target && \
2421                 $(LN_S) $(systemunitdir)/network.target network.target )
2422         ( cd $(DESTDIR)$(pkgsysconfdir)/system/sysinit.target.wants && \
2423                 rm -f * )
2424         ( cd $(DESTDIR)$(pkgsysconfdir)/system/local-fs.target.wants && \
2425                 rm -f * )
2426         ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
2427                 rm -f * )
2428         ( cd $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants && \
2429                 rm -f * )
2430 endif
2431
2432 if TARGET_FEDORA
2433         $(MKDIR_P) -m 0755 $(DESTDIR)$(systemunitdir)/final.target.wants
2434         ( cd $(DESTDIR)$(systemunitdir)/final.target.wants && \
2435                 rm -f halt-local.service && \
2436                 $(LN_S) $(systemunitdir)/halt-local.service halt-local.service )
2437         ( cd $(DESTDIR)$(systemunitdir) && \
2438                 rm -f display-manager.service single.service && \
2439                 $(LN_S) prefdm.service display-manager.service && \
2440                 $(LN_S) rescue.service single.service )
2441         ( cd $(DESTDIR)$(systemunitdir)/graphical.target.wants && \
2442                 rm -f display-manager.service && \
2443                 $(LN_S) $(systemunitdir)/display-manager.service display-manager.service )
2444 endif
2445
2446 if TARGET_MANDRIVA
2447         $(MKDIR_P) -m 0755 $(DESTDIR)$(systemunitdir)/final.target.wants
2448         ( cd $(DESTDIR)$(systemunitdir)/final.target.wants && \
2449                 rm -f halt-local.service && \
2450                 $(LN_S) $(systemunitdir)/halt-local.service halt-local.service )
2451         ( cd $(DESTDIR)$(systemunitdir) && \
2452                 rm -f display-manager.service dm.service single.service && \
2453                 $(LN_S) prefdm.service display-manager.service && \
2454                 $(LN_S) prefdm.service dm.service && \
2455                 $(LN_S) rescue.service single.service )
2456         ( cd $(DESTDIR)$(systemunitdir)/graphical.target.wants && \
2457                 rm -f display-manager.service && \
2458                 $(LN_S) $(systemunitdir)/display-manager.service display-manager.service )
2459 endif
2460
2461 if TARGET_DEBIAN_OR_UBUNTU
2462         ( cd $(DESTDIR)$(systemunitdir) && \
2463                 rm -f runlevel5.target && \
2464                 $(LN_S) multi-user.target runlevel5.target )
2465 endif
2466
2467 if TARGET_SUSE
2468         $(MKDIR_P) -m 0755 $(DESTDIR)$(systemunitdir)/final.target.wants
2469         ( cd $(DESTDIR)$(systemunitdir) && \
2470                 rm -f local.service && \
2471                 $(LN_S) rc-local.service local.service )
2472         ( cd $(DESTDIR)$(systemunitdir)/final.target.wants && \
2473                 rm -f halt-local.service && \
2474                 $(LN_S) $(systemunitdir)/halt-local.service halt-local.service )
2475 endif
2476
2477 if TARGET_MAGEIA
2478         $(MKDIR_P) -m 0755 $(DESTDIR)$(systemunitdir)/final.target.wants
2479         ( cd $(DESTDIR)$(systemunitdir)/final.target.wants && \
2480                 rm -f halt-local.service && \
2481                 $(LN_S) $(systemunitdir)/halt-local.service halt-local.service )
2482         ( cd $(DESTDIR)$(systemunitdir) && \
2483                 rm -f display-manager.service && \
2484                 $(LN_S) prefdm.service display-manager.service && \
2485                 $(LN_S) prefdm.service dm.service )
2486         ( cd $(DESTDIR)$(systemunitdir)/graphical.target.wants && \
2487                 rm -f display-manager.service && \
2488                 $(LN_S) $(systemunitdir)/display-manager.service display-manager.service )
2489 endif
2490
2491 if HAVE_SYSV_COMPAT
2492         ( cd $(DESTDIR)$(systemunitdir)/local-fs.target.wants && \
2493                 rm -f var-lock.mount && \
2494                 $(LN_S) ../var-lock.mount var-lock.mount )
2495 endif
2496
2497 install-exec-hook: $(INSTALL_EXEC_HOOKS)
2498
2499 uninstall-hook: $(UNINSTALL_EXEC_HOOKS)
2500
2501 install-data-hook: systemd-install-data-hook $(INSTALL_DATA_HOOKS)
2502
2503 DISTCHECK_CONFIGURE_FLAGS = \
2504         --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
2505         --with-dbussessionservicedir=$$dc_install_base/$(dbussessionservicedir) \
2506         --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
2507         --with-dbusinterfacedir=$$dc_install_base/$(dbusinterfacedir) \
2508         --with-udevrulesdir=$$dc_install_base/$(udevrulesdir) \
2509         --with-pamlibdir=$$dc_install_base/$(pamlibdir) \
2510         --with-rootprefix=$$dc_install_base/$(rootprefix)
2511
2512 upload: all distcheck
2513         cp -v systemd-$(VERSION).tar.xz /home/lennart/git.fedora/systemd/
2514         scp systemd-$(VERSION).tar.xz fdo:/srv/www.freedesktop.org/www/software/systemd/
2515         scp man/*.html tango:public/systemd-man/
2516
2517 git-tag:
2518         git tag "v$(VERSION)" -m "systemd $(VERSION)"