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