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