chiark / gitweb /
0b2660ae5fcea3caca4c0b0aaa7b135c6b7ebeab
[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=2
24 LIBSYSTEMD_LOGIN_REVISION=0
25 LIBSYSTEMD_LOGIN_AGE=2
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=2
33 LIBSYSTEMD_ID128_AGE=0
34
35 LIBSYSTEMD_JOURNAL_CURRENT=0
36 LIBSYSTEMD_JOURNAL_REVISION=2
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=\"$(rootlibexecdir)/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         src/utf8.c
473
474 libsystemd_basic_la_CFLAGS = \
475         $(AM_CFLAGS) \
476         $(SELINUX_CFLAGS)
477
478 libsystemd_basic_la_LIBADD = \
479         $(SELINUX_LIBS) \
480         $(CAP_LIBS)
481
482 libsystemd_core_la_SOURCES = \
483         src/unit.c \
484         src/job.c \
485         src/manager.c \
486         src/path-lookup.c \
487         src/load-fragment.c \
488         src/service.c \
489         src/automount.c \
490         src/mount.c \
491         src/swap.c \
492         src/device.c \
493         src/target.c \
494         src/snapshot.c \
495         src/socket.c \
496         src/timer.c \
497         src/path.c \
498         src/load-dropin.c \
499         src/execute.c \
500         src/utmp-wtmp.c \
501         src/dbus.c \
502         src/dbus-manager.c \
503         src/dbus-unit.c \
504         src/dbus-job.c \
505         src/dbus-service.c \
506         src/dbus-socket.c \
507         src/dbus-timer.c \
508         src/dbus-target.c \
509         src/dbus-mount.c \
510         src/dbus-automount.c \
511         src/dbus-swap.c \
512         src/dbus-snapshot.c \
513         src/dbus-device.c \
514         src/dbus-execute.c \
515         src/dbus-path.c \
516         src/cgroup.c \
517         src/mount-setup.c \
518         src/hostname-setup.c \
519         src/selinux-setup.c \
520         src/loopback-setup.c \
521         src/kmod-setup.c \
522         src/locale-setup.c \
523         src/machine-id-setup.c \
524         src/specifier.c \
525         src/unit-name.c \
526         src/fdset.c \
527         src/namespace.c \
528         src/tcpwrap.c \
529         src/cgroup-util.c \
530         src/condition.c \
531         src/dbus-common.c \
532         src/sd-daemon.c \
533         src/install.c \
534         src/cgroup-attr.c \
535         src/sd-id128.c
536
537 nodist_libsystemd_core_la_SOURCES = \
538         src/load-fragment-gperf.c \
539         src/load-fragment-gperf-nulstr.c
540
541 EXTRA_DIST += \
542         src/load-fragment-gperf.gperf.m4
543
544 libsystemd_core_la_CFLAGS = \
545         $(AM_CFLAGS) \
546         $(DBUS_CFLAGS) \
547         $(UDEV_CFLAGS) \
548         $(LIBWRAP_CFLAGS) \
549         $(PAM_CFLAGS) \
550         $(AUDIT_CFLAGS) \
551         $(KMOD_CFLAGS)
552
553 libsystemd_core_la_LIBADD = \
554         libsystemd-basic.la \
555         $(DBUS_LIBS) \
556         $(UDEV_LIBS) \
557         $(LIBWRAP_LIBS) \
558         $(PAM_LIBS) \
559         $(AUDIT_LIBS) \
560         $(CAP_LIBS) \
561         $(KMOD_LIBS)
562
563 # This is needed because automake is buggy in how it generates the
564 # rules for C programs, but not Vala programs.  We therefore can't
565 # list the .h files as dependencies if we want make dist to work.
566
567 EXTRA_DIST += \
568         src/util.h \
569         src/virt.h \
570         src/label.h \
571         src/hashmap.h \
572         src/set.h \
573         src/strv.h \
574         src/conf-parser.h \
575         src/socket-util.h \
576         src/log.h \
577         src/ratelimit.h \
578         src/exit-status.h \
579         src/unit.h \
580         src/job.h \
581         src/manager.h \
582         src/path-lookup.h \
583         src/load-fragment.h \
584         src/service.h \
585         src/automount.h \
586         src/mount.h \
587         src/swap.h \
588         src/device.h \
589         src/target.h \
590         src/snapshot.h \
591         src/socket.h \
592         src/timer.h \
593         src/path.h \
594         src/load-dropin.h \
595         src/execute.h \
596         src/utmp-wtmp.h \
597         src/dbus.h \
598         src/dbus-manager.h \
599         src/dbus-unit.h \
600         src/dbus-job.h \
601         src/dbus-service.h \
602         src/dbus-socket.h \
603         src/dbus-timer.h \
604         src/dbus-target.h \
605         src/dbus-mount.h \
606         src/dbus-automount.h \
607         src/dbus-swap.h \
608         src/dbus-snapshot.h \
609         src/dbus-device.h \
610         src/dbus-execute.h \
611         src/dbus-path.h \
612         src/cgroup.h \
613         src/mount-setup.h \
614         src/hostname-setup.h \
615         src/selinux-setup.h \
616         src/loopback-setup.h \
617         src/kmod-setup.h \
618         src/locale-setup.h \
619         src/machine-id-setup.h \
620         src/specifier.h \
621         src/unit-name.h \
622         src/fdset.h \
623         src/namespace.h \
624         src/tcpwrap.h \
625         src/cgroup-util.h \
626         src/condition.h \
627         src/dbus-common.h \
628         src/install.h \
629         src/cgroup-attr.h \
630         src/macro.h \
631         src/def.h \
632         src/ioprio.h \
633         src/missing.h \
634         src/list.h \
635         src/securebits.h \
636         src/linux/auto_dev-ioctl.h \
637         src/linux/fanotify.h \
638         src/initreq.h \
639         src/special.h \
640         src/dbus-common.h \
641         src/bus-errors.h \
642         src/cgroup-show.h \
643         src/build.h \
644         src/shutdownd.h \
645         src/umount.h \
646         src/ask-password-api.h \
647         src/pager.h \
648         src/sysfs-show.h \
649         src/polkit.h \
650         src/dbus-loop.h \
651         src/spawn-agent.h \
652         src/acl-util.h \
653         src/logs-show.h \
654         src/utf8.h
655
656 MANPAGES = \
657         man/systemd.1 \
658         man/systemctl.1 \
659         man/systemadm.1 \
660         man/systemd-cgls.1 \
661         man/systemd-cgtop.1 \
662         man/systemd-nspawn.1 \
663         man/systemd-tmpfiles.8 \
664         man/systemd-notify.1 \
665         man/systemd.unit.5 \
666         man/systemd.service.5 \
667         man/systemd.socket.5 \
668         man/systemd.mount.5 \
669         man/systemd.automount.5 \
670         man/systemd.swap.5 \
671         man/systemd.timer.5 \
672         man/systemd.path.5 \
673         man/systemd.target.5 \
674         man/systemd.device.5 \
675         man/systemd.snapshot.5 \
676         man/systemd.exec.5 \
677         man/systemd.special.7 \
678         man/daemon.7 \
679         man/runlevel.8 \
680         man/telinit.8 \
681         man/halt.8 \
682         man/shutdown.8 \
683         man/pam_systemd.8 \
684         man/systemd.conf.5 \
685         man/tmpfiles.d.5 \
686         man/hostname.5 \
687         man/timezone.5 \
688         man/machine-id.5 \
689         man/locale.conf.5 \
690         man/os-release.5 \
691         man/machine-info.5 \
692         man/modules-load.d.5 \
693         man/sysctl.d.5 \
694         man/systemd-ask-password.1 \
695         man/systemd-cat.1 \
696         man/systemd-machine-id-setup.1 \
697         man/systemd-journald.conf.5
698
699 MANPAGES_ALIAS = \
700         man/reboot.8 \
701         man/poweroff.8 \
702         man/init.1
703
704 man/reboot.8: man/halt.8
705 man/poweroff.8: man/halt.8
706 man/init.1: man/systemd.1
707
708 if ENABLE_MANPAGES
709 dist_man_MANS = \
710         $(MANPAGES) \
711         $(MANPAGES_ALIAS)
712
713 XML_FILES = \
714         ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
715
716 dist_noinst_DATA = \
717         ${XML_FILES:.xml=.html}
718
719 EXTRA_DIST += \
720         $(XML_FILES)
721 endif
722
723 systemd_SOURCES = \
724         src/main.c
725
726 systemd_CFLAGS = \
727         $(AM_CFLAGS) \
728         $(DBUS_CFLAGS) \
729         $(UDEV_CFLAGS)
730
731 systemd_LDADD = \
732         libsystemd-core.la
733
734 test_engine_SOURCES = \
735         src/test-engine.c
736
737 test_engine_CFLAGS = $(systemd_CFLAGS)
738 test_engine_LDADD = $(systemd_LDADD)
739
740 test_job_type_SOURCES = \
741         src/test-job-type.c
742
743 test_job_type_CFLAGS = $(systemd_CFLAGS)
744 test_job_type_LDADD = $(systemd_LDADD)
745
746 test_ns_SOURCES = \
747         src/test-ns.c
748
749 test_ns_CFLAGS = $(systemd_CFLAGS)
750 test_ns_LDADD = $(systemd_LDADD)
751
752 test_loopback_SOURCES = \
753         src/test-loopback.c \
754         src/loopback-setup.c
755
756 test_loopback_LDADD = \
757         libsystemd-basic.la
758
759 test_hostname_SOURCES = \
760         src/test-hostname.c \
761         src/hostname-setup.c
762
763 test_hostname_LDADD = \
764         libsystemd-basic.la
765
766 test_daemon_SOURCES = \
767         src/test-daemon.c
768
769 test_daemon_LDADD = \
770         libsystemd-basic.la \
771         libsystemd-daemon.la
772
773 test_cgroup_SOURCES = \
774         src/test-cgroup.c \
775         src/cgroup-util.c
776
777 test_cgroup_LDADD = \
778         libsystemd-basic.la
779
780 test_env_replace_SOURCES = \
781         src/test-env-replace.c
782
783 test_env_replace_LDADD = \
784         libsystemd-basic.la
785
786 test_strv_SOURCES = \
787         src/test-strv.c \
788         src/specifier.c
789
790 test_strv_LDADD = \
791         libsystemd-basic.la
792
793 test_install_SOURCES = \
794         src/test-install.c \
795         src/install.c \
796         src/path-lookup.c \
797         src/unit-name.c
798
799 test_install_CFLAGS = \
800         $(AM_CFLAGS) \
801         $(DBUS_CFLAGS)
802
803 test_install_LDADD = \
804         libsystemd-basic.la
805
806 systemd_initctl_SOURCES = \
807         src/initctl.c \
808         src/dbus-common.c
809
810 systemd_initctl_CFLAGS = \
811         $(AM_CFLAGS) \
812         $(DBUS_CFLAGS)
813
814 systemd_initctl_LDADD = \
815         libsystemd-basic.la \
816         libsystemd-daemon.la \
817         $(DBUS_LIBS)
818
819 systemd_update_utmp_SOURCES = \
820         src/update-utmp.c \
821         src/dbus-common.c \
822         src/utmp-wtmp.c
823
824 systemd_update_utmp_CFLAGS = \
825         $(AM_CFLAGS) \
826         $(DBUS_CFLAGS) \
827         $(AUDIT_CFLAGS)
828
829 systemd_update_utmp_LDADD = \
830         libsystemd-basic.la \
831         $(DBUS_LIBS) \
832         $(AUDIT_LIBS)
833
834 systemd_shutdownd_SOURCES = \
835         src/utmp-wtmp.c \
836         src/shutdownd.c
837
838 systemd_shutdownd_CFLAGS = \
839         $(AM_CFLAGS)
840
841 systemd_shutdownd_LDADD = \
842         libsystemd-basic.la \
843         libsystemd-daemon.la
844
845 systemd_shutdown_SOURCES = \
846         src/mount-setup.c \
847         src/umount.c \
848         src/shutdown.c
849
850 systemd_shutdown_CFLAGS = \
851         $(AM_CFLAGS) \
852         $(UDEV_CFLAGS)
853
854 systemd_shutdown_LDADD = \
855         libsystemd-basic.la \
856         $(UDEV_LIBS)
857
858 systemd_modules_load_SOURCES = \
859         src/modules-load.c
860
861 systemd_modules_load_CFLAGS = \
862         $(KMOD_CFLAGS)
863
864 systemd_modules_load_LDADD = \
865         libsystemd-basic.la \
866         $(KMOD_LIBS)
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_session_get_service.3 \
2062         man/sd_session_get_type.3 \
2063         man/sd_session_get_class.3 \
2064         man/sd_session_get_display.3 \
2065         man/sd_pid_get_owner_uid.3 \
2066         man/sd_pid_get_unit.3 \
2067         man/sd_uid_is_on_seat.3 \
2068         man/sd_uid_get_sessions.3 \
2069         man/sd_uid_get_seats.3 \
2070         man/sd_seat_get_sessions.3 \
2071         man/sd_seat_can_multi_session.3 \
2072         man/sd_get_sessions.3 \
2073         man/sd_get_uids.3
2074
2075 man/sd_login_monitor_unref.3: man/sd_login_monitor_new.3
2076 man/sd_login_monitor_flush.3: man/sd_login_monitor_new.3
2077 man/sd_login_monitor_get_fd.3: man/sd_login_monitor_new.3
2078 man/sd_session_get_uid.3: man/sd_session_is_active.3
2079 man/sd_session_get_seat.3: man/sd_session_is_active.3
2080 man/sd_session_get_service.3: man/sd_session_is_active.3
2081 man/sd_session_get_type.3: man/sd_session_is_active.3
2082 man/sd_session_get_class.3: man/sd_session_is_active.3
2083 man/sd_session_get_display.3: man/sd_session_is_active.3
2084 man/sd_pid_get_owner_uid.3: man/sd_pid_get_session.3
2085 man/sd_pid_get_unit.3: man/sd_pid_get_session.3
2086 man/sd_uid_is_on_seat.3: man/sd_uid_get_state.3
2087 man/sd_uid_get_sessions.3: man/sd_uid_get_state.3
2088 man/sd_uid_get_seats.3: man/sd_uid_get_state.3
2089 man/sd_seat_get_sessions.3: man/sd_seat_get_active.3
2090 man/sd_seat_can_multi_session.3: man/sd_seat_get_active.3
2091 man/sd_get_sessions.3: man/sd_get_seats.3
2092 man/sd_get_uids.3: man/sd_get_seats.3
2093
2094 EXTRA_DIST += \
2095         src/login/logind-gperf.gperf \
2096         src/login/libsystemd-login.pc.in \
2097         src/login/libsystemd-login.sym \
2098         src/login/logind.h \
2099         src/login/logind-device.h \
2100         src/login/logind-seat.h \
2101         src/login/logind-session.h \
2102         src/login/logind-user.h \
2103         src/login/logind-acl.h \
2104         src/login/73-seat-late.rules.in \
2105         units/systemd-logind.service.in \
2106         units/systemd-user-sessions.service.in
2107
2108 CLEANFILES += \
2109         src/login/logind-gperf.c \
2110         src/login/73-seat-late.rules
2111 endif
2112 # ------------------------------------------------------------------------------
2113
2114 SED_PROCESS = \
2115         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
2116         $(SED)  -e 's,@rootlibexecdir\@,$(rootlibexecdir),g' \
2117                 -e 's,@rootbindir\@,$(rootbindir),g' \
2118                 -e 's,@bindir\@,$(bindir),g' \
2119                 -e 's,@SYSTEMCTL\@,$(rootbindir)/systemctl,g' \
2120                 -e 's,@SYSTEMD_NOTIFY\@,$(rootbindir)/systemd-notify,g' \
2121                 -e 's,@pkgsysconfdir\@,$(pkgsysconfdir),g' \
2122                 -e 's,@pkgdatadir\@,$(pkgdatadir),g' \
2123                 -e 's,@pkglibexecdir\@,$(pkglibexecdir),g' \
2124                 -e 's,@systemunitdir\@,$(systemunitdir),g' \
2125                 -e 's,@userunitdir\@,$(userunitdir),g' \
2126                 -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
2127                 -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
2128                 -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' \
2129                 -e 's,@prefix\@,$(prefix),g' \
2130                 -e 's,@exec_prefix\@,$(exec_prefix),g' \
2131                 -e 's,@libdir\@,$(libdir),g' \
2132                 -e 's,@includedir\@,$(includedir),g' \
2133                 < $< > $@ || rm $@
2134
2135 units/%: units/%.in Makefile
2136         $(SED_PROCESS)
2137
2138 man/%: man/%.in Makefile
2139         $(SED_PROCESS)
2140
2141 sysctl.d/%: sysctl.d/%.in Makefile
2142         $(SED_PROCESS)
2143
2144 %.pc: %.pc.in Makefile
2145         $(SED_PROCESS)
2146
2147 src/%.policy.in: src/%.policy.in.in Makefile
2148         $(SED_PROCESS)
2149
2150 src/%.rules: src/%.rules.in Makefile
2151         $(SED_PROCESS)
2152
2153 src/%.c: src/%.gperf
2154         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
2155         $(GPERF) < $< > $@
2156
2157 src/%: src/%.m4
2158         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
2159         $(M4) -P $(M4_DEFINES) < $< > $@ || rm $@
2160
2161 src/load-fragment-gperf-nulstr.c: src/load-fragment-gperf.gperf
2162         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
2163         $(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 $@
2164
2165 M4_PROCESS_SYSTEM = \
2166         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
2167         $(M4) -P $(M4_DEFINES) -DFOR_SYSTEM=1 < $< > $@ || rm $@
2168
2169 M4_PROCESS_USER = \
2170         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
2171         $(M4) -P $(M4_DEFINES) -DFOR_USER=1 < $< > $@ || rm $@
2172
2173 units/%: units/%.m4 Makefile
2174         $(M4_PROCESS_SYSTEM)
2175
2176 units/user/%: units/%.m4 Makefile
2177         $(M4_PROCESS_USER)
2178
2179 CLEANFILES += \
2180         $(nodist_systemunit_DATA) \
2181         $(nodist_userunit_DATA) \
2182         $(nodist_man_MANS) \
2183         $(pkgconfigdata_DATA) \
2184         $(pkgconfiglib_DATA) \
2185         $(nodist_polkitpolicy_DATA) \
2186         src/load-fragment-gperf.gperf \
2187         src/load-fragment-gperf.c \
2188         src/load-fragment-gperf-nulstr.c \
2189         src/99-systemd.rules
2190
2191 if HAVE_VALAC
2192 CLEANFILES += \
2193         ${systemadm_SOURCES:.vala=.c}
2194 endif
2195
2196 if HAVE_XSLTPROC
2197 XSLTPROC_FLAGS = \
2198         --nonet \
2199         --stringparam funcsynopsis.style ansi
2200
2201 XSLTPROC_PROCESS_MAN = \
2202         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
2203         $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
2204
2205 XSLTPROC_PROCESS_HTML = \
2206         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
2207         $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
2208
2209 man/%.1: man/%.xml
2210         $(XSLTPROC_PROCESS_MAN)
2211
2212 man/%.3: man/%.xml
2213         $(XSLTPROC_PROCESS_MAN)
2214
2215 man/%.5: man/%.xml
2216         $(XSLTPROC_PROCESS_MAN)
2217
2218 man/%.7: man/%.xml
2219         $(XSLTPROC_PROCESS_MAN)
2220
2221 man/%.8: man/%.xml
2222         $(XSLTPROC_PROCESS_MAN)
2223
2224 man/%.html: man/%.xml
2225         $(XSLTPROC_PROCESS_HTML)
2226
2227 CLEANFILES += \
2228         $(dist_man_MANS) \
2229         ${XML_FILES:.xml=.html}
2230 endif
2231
2232 DBUS_PREPROCESS = $(CPP) -P $(DBUS_CFLAGS) -imacros dbus/dbus-protocol.h
2233
2234 org.freedesktop.systemd1.%.xml: systemd
2235         $(AM_V_GEN)$(LIBTOOL) --mode=execute $(OBJCOPY) -O binary -j introspect.$* $< $@.tmp && \
2236                 $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
2237                 $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
2238
2239 CLEANFILES += \
2240         $(dbusinterface_DATA)
2241
2242 systemd-install-data-hook:
2243         $(MKDIR_P) -m 0755 \
2244                 $(DESTDIR)$(tmpfilesdir) \
2245                 $(DESTDIR)$(sysconfdir)/tmpfiles.d \
2246                 $(DESTDIR)$(prefix)/lib/modules-load.d \
2247                 $(DESTDIR)$(sysconfdir)/modules-load.d \
2248                 $(DESTDIR)$(prefix)/lib/sysctl.d \
2249                 $(DESTDIR)$(sysconfdir)/sysctl.d \
2250                 $(DESTDIR)$(systemshutdowndir) \
2251                 $(DESTDIR)$(systemgeneratordir) \
2252                 $(DESTDIR)$(usergeneratordir)
2253         $(MKDIR_P) -m 0755 \
2254                 $(DESTDIR)$(systemunitdir) \
2255                 $(DESTDIR)$(userunitdir) \
2256                 $(DESTDIR)$(systemunitdir)/sysinit.target.wants \
2257                 $(DESTDIR)$(systemunitdir)/sockets.target.wants \
2258                 $(DESTDIR)$(systemunitdir)/basic.target.wants \
2259                 $(DESTDIR)$(systemunitdir)/shutdown.target.wants \
2260                 $(DESTDIR)$(systemunitdir)/local-fs.target.wants \
2261                 $(DESTDIR)$(systemunitdir)/runlevel1.target.wants \
2262                 $(DESTDIR)$(systemunitdir)/runlevel2.target.wants \
2263                 $(DESTDIR)$(systemunitdir)/runlevel3.target.wants \
2264                 $(DESTDIR)$(systemunitdir)/runlevel4.target.wants \
2265                 $(DESTDIR)$(systemunitdir)/runlevel5.target.wants \
2266                 $(DESTDIR)$(systemunitdir)/multi-user.target.wants \
2267                 $(DESTDIR)$(systemunitdir)/graphical.target.wants \
2268                 $(DESTDIR)$(pkgsysconfdir)/system \
2269                 $(DESTDIR)$(pkgsysconfdir)/system/sysinit.target.wants \
2270                 $(DESTDIR)$(pkgsysconfdir)/system/local-fs.target.wants \
2271                 $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants \
2272                 $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants \
2273                 $(DESTDIR)$(pkgsysconfdir)/user \
2274                 $(DESTDIR)$(dbussessionservicedir) \
2275                 $(DESTDIR)$(sysconfdir)/xdg/systemd
2276         ( cd $(DESTDIR)$(sysconfdir)/xdg/systemd/ && \
2277                 rm -f user && \
2278                 $(LN_S) $(pkgsysconfdir)/user user )
2279         ( cd $(DESTDIR)$(systemunitdir)/sockets.target.wants && \
2280                 rm -f systemd-initctl.socket systemd-shutdownd.socket && \
2281                 $(LN_S) ../systemd-initctl.socket systemd-initctl.socket && \
2282                 $(LN_S) ../systemd-shutdownd.socket systemd-shutdownd.socket )
2283         ( cd $(DESTDIR)$(systemunitdir)/runlevel1.target.wants && \
2284                 rm -f systemd-update-utmp-runlevel.service && \
2285                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
2286         ( cd $(DESTDIR)$(systemunitdir)/runlevel2.target.wants && \
2287                 rm -f systemd-update-utmp-runlevel.service && \
2288                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
2289         ( cd $(DESTDIR)$(systemunitdir)/runlevel3.target.wants && \
2290                 rm -f systemd-update-utmp-runlevel.service && \
2291                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
2292         ( cd $(DESTDIR)$(systemunitdir)/runlevel4.target.wants && \
2293                 rm -f systemd-update-utmp-runlevel.service && \
2294                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
2295         ( cd $(DESTDIR)$(systemunitdir)/runlevel5.target.wants && \
2296                 rm -f systemd-update-utmp-runlevel.service && \
2297                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
2298         ( cd $(DESTDIR)$(systemunitdir)/shutdown.target.wants && \
2299                 rm -f systemd-update-utmp-shutdown.service && \
2300                 $(LN_S) ../systemd-update-utmp-shutdown.service systemd-update-utmp-shutdown.service )
2301         ( cd $(DESTDIR)$(systemunitdir)/local-fs.target.wants && \
2302                 rm -f systemd-remount-api-vfs.service \
2303                         fsck-root.service \
2304                         remount-rootfs.service \
2305                         var-run.mount \
2306                         media.mount && \
2307                 $(LN_S) ../systemd-remount-api-vfs.service systemd-remount-api-vfs.service && \
2308                 $(LN_S) ../fsck-root.service fsck-root.service && \
2309                 $(LN_S) ../remount-rootfs.service remount-rootfs.service && \
2310                 $(LN_S) ../var-run.mount var-run.mount && \
2311                 $(LN_S) ../media.mount media.mount )
2312         ( cd $(DESTDIR)$(userunitdir) && \
2313                 rm -f shutdown.target sockets.target bluetooth.target printer.target sound.target && \
2314                 $(LN_S) $(systemunitdir)/shutdown.target shutdown.target && \
2315                 $(LN_S) $(systemunitdir)/sockets.target sockets.target && \
2316                 $(LN_S) $(systemunitdir)/bluetooth.target bluetooth.target && \
2317                 $(LN_S) $(systemunitdir)/printer.target printer.target && \
2318                 $(LN_S) $(systemunitdir)/sound.target sound.target )
2319         ( cd $(DESTDIR)$(systemunitdir) && \
2320                 rm -f runlevel0.target runlevel1.target runlevel2.target runlevel3.target runlevel4.target runlevel5.target runlevel6.target && \
2321                 $(LN_S) poweroff.target runlevel0.target && \
2322                 $(LN_S) rescue.target runlevel1.target && \
2323                 $(LN_S) multi-user.target runlevel2.target && \
2324                 $(LN_S) multi-user.target runlevel3.target && \
2325                 $(LN_S) multi-user.target runlevel4.target && \
2326                 $(LN_S) graphical.target runlevel5.target && \
2327                 $(LN_S) reboot.target runlevel6.target )
2328         ( cd $(DESTDIR)$(systemunitdir) && \
2329                 rm -f default.target ctrl-alt-del.target autovt@.service && \
2330                 $(LN_S) graphical.target default.target && \
2331                 $(LN_S) reboot.target ctrl-alt-del.target && \
2332                 $(LN_S) getty@.service autovt@.service )
2333         ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
2334                 rm -f getty.target systemd-ask-password-wall.path && \
2335                 $(LN_S) ../getty.target getty.target && \
2336                 $(LN_S) ../systemd-ask-password-wall.path systemd-ask-password-wall.path)
2337         ( cd $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants && \
2338                 rm -f getty@tty1.service && \
2339                 $(LN_S) $(systemunitdir)/getty@.service getty@tty1.service )
2340         ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
2341                 rm -f remote-fs.target && \
2342                 $(LN_S) $(systemunitdir)/remote-fs.target remote-fs.target )
2343         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
2344                 rm -f dev-hugepages.mount \
2345                         dev-mqueue.mount \
2346                         sys-kernel-config.mount \
2347                         sys-kernel-debug.mount \
2348                         sys-kernel-security.mount \
2349                         sys-fs-fuse-connections.mount \
2350                         systemd-modules-load.service \
2351                         systemd-tmpfiles-setup.service \
2352                         systemd-sysctl.service \
2353                         systemd-ask-password-console.path && \
2354                 $(LN_S) ../dev-hugepages.mount dev-hugepages.mount && \
2355                 $(LN_S) ../dev-mqueue.mount dev-mqueue.mount && \
2356                 $(LN_S) ../sys-kernel-config.mount sys-kernel-config.mount && \
2357                 $(LN_S) ../sys-kernel-debug.mount sys-kernel-debug.mount && \
2358                 $(LN_S) ../sys-kernel-security.mount sys-kernel-security.mount && \
2359                 $(LN_S) ../sys-fs-fuse-connections.mount sys-fs-fuse-connections.mount && \
2360                 $(LN_S) ../systemd-modules-load.service systemd-modules-load.service && \
2361                 $(LN_S) ../systemd-tmpfiles-setup.service systemd-tmpfiles-setup.service && \
2362                 $(LN_S) ../systemd-sysctl.service systemd-sysctl.service && \
2363                 $(LN_S) ../systemd-ask-password-console.path systemd-ask-password-console.path )
2364         ( cd $(DESTDIR)$(systemunitdir)/basic.target.wants && \
2365                 rm -f systemd-tmpfiles-clean.timer && \
2366                 $(LN_S) ../systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.timer )
2367         ( cd $(DESTDIR)$(dbussessionservicedir) && \
2368                 rm -f org.freedesktop.systemd1.service && \
2369                 $(LN_S) ../system-services/org.freedesktop.systemd1.service org.freedesktop.systemd1.service )
2370 if HAVE_PLYMOUTH
2371         $(MKDIR_P) -m 0755 \
2372                 $(DESTDIR)$(SYSTEM_SYSVINIT_PATH) \
2373                 $(DESTDIR)$(systemunitdir)/reboot.target.wants \
2374                 $(DESTDIR)$(systemunitdir)/kexec.target.wants \
2375                 $(DESTDIR)$(systemunitdir)/poweroff.target.wants \
2376                 $(DESTDIR)$(systemunitdir)/halt.target.wants
2377         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
2378                 rm -f plymouth-start.service plymouth-read-write.service && \
2379                 $(LN_S) ../plymouth-start.service plymouth-start.service && \
2380                 $(LN_S) ../plymouth-read-write.service plymouth-read-write.service )
2381         ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
2382                 rm -f plymouth-quit.service plymouth-quit-wait.service && \
2383                 $(LN_S) ../plymouth-quit.service plymouth-quit.service && \
2384                 $(LN_S) ../plymouth-quit-wait.service plymouth-quit-wait.service )
2385         ( cd $(DESTDIR)$(systemunitdir)/reboot.target.wants && \
2386                 rm -f plymouth-reboot.service && \
2387                 $(LN_S) ../plymouth-reboot.service plymouth-reboot.service )
2388         ( cd $(DESTDIR)$(systemunitdir)/kexec.target.wants && \
2389                 rm -f plymouth-kexec.service && \
2390                 $(LN_S) ../plymouth-kexec.service plymouth-kexec.service )
2391         ( cd $(DESTDIR)$(systemunitdir)/poweroff.target.wants && \
2392                 rm -f plymouth-poweroff.service && \
2393                 $(LN_S) ../plymouth-poweroff.service plymouth-poweroff.service )
2394         ( cd $(DESTDIR)$(systemunitdir)/halt.target.wants && \
2395                 rm -f plymouth-halt.service && \
2396                 $(LN_S) ../plymouth-halt.service plymouth-halt.service )
2397 endif
2398 if TARGET_MEEGO
2399         $(MKDIR_P) -m 0755 $(DESTDIR)$(systemunitdir)/final.target.wants
2400         ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
2401                 rm -f network.target && \
2402                 $(LN_S) $(systemunitdir)/network.target network.target )
2403         ( cd $(DESTDIR)$(pkgsysconfdir)/system/sysinit.target.wants && \
2404                 rm -f * )
2405         ( cd $(DESTDIR)$(pkgsysconfdir)/system/local-fs.target.wants && \
2406                 rm -f * )
2407         ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
2408                 rm -f * )
2409         ( cd $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants && \
2410                 rm -f * )
2411 endif
2412
2413 if TARGET_FEDORA
2414         $(MKDIR_P) -m 0755 $(DESTDIR)$(systemunitdir)/final.target.wants
2415         ( cd $(DESTDIR)$(systemunitdir)/final.target.wants && \
2416                 rm -f halt-local.service && \
2417                 $(LN_S) $(systemunitdir)/halt-local.service halt-local.service )
2418         ( cd $(DESTDIR)$(systemunitdir) && \
2419                 rm -f display-manager.service single.service && \
2420                 $(LN_S) prefdm.service display-manager.service && \
2421                 $(LN_S) rescue.service single.service )
2422         ( cd $(DESTDIR)$(systemunitdir)/graphical.target.wants && \
2423                 rm -f display-manager.service && \
2424                 $(LN_S) $(systemunitdir)/display-manager.service display-manager.service )
2425 endif
2426
2427 if TARGET_MANDRIVA
2428         $(MKDIR_P) -m 0755 $(DESTDIR)$(systemunitdir)/final.target.wants
2429         ( cd $(DESTDIR)$(systemunitdir)/final.target.wants && \
2430                 rm -f halt-local.service && \
2431                 $(LN_S) $(systemunitdir)/halt-local.service halt-local.service )
2432         ( cd $(DESTDIR)$(systemunitdir) && \
2433                 rm -f display-manager.service dm.service single.service && \
2434                 $(LN_S) prefdm.service display-manager.service && \
2435                 $(LN_S) prefdm.service dm.service && \
2436                 $(LN_S) rescue.service single.service )
2437         ( cd $(DESTDIR)$(systemunitdir)/graphical.target.wants && \
2438                 rm -f display-manager.service && \
2439                 $(LN_S) $(systemunitdir)/display-manager.service display-manager.service )
2440 endif
2441
2442 if TARGET_DEBIAN_OR_UBUNTU
2443         ( cd $(DESTDIR)$(systemunitdir) && \
2444                 rm -f runlevel5.target && \
2445                 $(LN_S) multi-user.target runlevel5.target )
2446 endif
2447
2448 if TARGET_SUSE
2449         $(MKDIR_P) -m 0755 $(DESTDIR)$(systemunitdir)/final.target.wants
2450         ( cd $(DESTDIR)$(systemunitdir) && \
2451                 rm -f local.service && \
2452                 $(LN_S) rc-local.service local.service )
2453         ( cd $(DESTDIR)$(systemunitdir)/final.target.wants && \
2454                 rm -f halt-local.service && \
2455                 $(LN_S) $(systemunitdir)/halt-local.service halt-local.service )
2456 endif
2457
2458 if TARGET_MAGEIA
2459         $(MKDIR_P) -m 0755 $(DESTDIR)$(systemunitdir)/final.target.wants
2460         ( cd $(DESTDIR)$(systemunitdir)/final.target.wants && \
2461                 rm -f halt-local.service && \
2462                 $(LN_S) $(systemunitdir)/halt-local.service halt-local.service )
2463         ( cd $(DESTDIR)$(systemunitdir) && \
2464                 rm -f display-manager.service && \
2465                 $(LN_S) prefdm.service display-manager.service && \
2466                 $(LN_S) prefdm.service dm.service )
2467         ( cd $(DESTDIR)$(systemunitdir)/graphical.target.wants && \
2468                 rm -f display-manager.service && \
2469                 $(LN_S) $(systemunitdir)/display-manager.service display-manager.service )
2470 endif
2471
2472 if HAVE_SYSV_COMPAT
2473         ( cd $(DESTDIR)$(systemunitdir)/local-fs.target.wants && \
2474                 rm -f var-lock.mount && \
2475                 $(LN_S) ../var-lock.mount var-lock.mount )
2476 endif
2477
2478 install-exec-hook: $(INSTALL_EXEC_HOOKS)
2479
2480 uninstall-hook: $(UNINSTALL_EXEC_HOOKS)
2481
2482 install-data-hook: systemd-install-data-hook $(INSTALL_DATA_HOOKS)
2483
2484 DISTCHECK_CONFIGURE_FLAGS = \
2485         --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
2486         --with-dbussessionservicedir=$$dc_install_base/$(dbussessionservicedir) \
2487         --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
2488         --with-dbusinterfacedir=$$dc_install_base/$(dbusinterfacedir) \
2489         --with-udevrulesdir=$$dc_install_base/$(udevrulesdir) \
2490         --with-pamlibdir=$$dc_install_base/$(pamlibdir) \
2491         --with-rootprefix=$$dc_install_base/$(prefix)
2492
2493
2494 upload: all distcheck
2495         cp -v systemd-$(VERSION).tar.xz /home/lennart/git.fedora/systemd/
2496         scp systemd-$(VERSION).tar.xz fdo:/srv/www.freedesktop.org/www/software/systemd/
2497         scp man/*.html fdo:/srv/www.freedesktop.org/www/software/systemd/man/
2498         scp man/*.html tango:public/systemd-man/
2499
2500 git-tag:
2501         git tag "v$(VERSION)" -m "systemd $(VERSION)"