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