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