chiark / gitweb /
load-dropin: add support for .requires directories
[elogind.git] / Makefile.am
1 #  This file is part of systemd.
2 #
3 #  Copyright 2010 Lennart Poettering
4 #
5 #  systemd is free software; you can redistribute it and/or modify it
6 #  under the terms of the GNU General Public License as published by
7 #  the Free Software Foundation; either version 2 of the License, or
8 #  (at your option) any later version.
9 #
10 #  systemd is distributed in the hope that it will be useful, but
11 #  WITHOUT ANY WARRANTY; without even the implied warranty of
12 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 #  General Public License for more details.
14 #
15 #  You should have received a copy of the GNU General Public License
16 #  along with systemd; If not, see <http://www.gnu.org/licenses/>.
17
18 ACLOCAL_AMFLAGS = -I m4
19
20 # Dirs of external packages
21 dbuspolicydir=@dbuspolicydir@
22 dbussessionservicedir=@dbussessionservicedir@
23 dbussystemservicedir=@dbussystemservicedir@
24 dbusinterfacedir=@dbusinterfacedir@
25 udevrulesdir=@udevrulesdir@
26 pamlibdir=@pamlibdir@
27 pkgconfigdatadir=$(datadir)/pkgconfig
28 polkitpolicydir=$(datadir)/polkit-1/actions
29 bashcompletiondir=$(sysconfdir)/bash_completion.d
30
31 # Our own, non-special dirs
32 pkgsysconfdir=$(sysconfdir)/systemd
33 sessionunitdir=$(pkgdatadir)/session
34 tmpfilesdir=$(sysconfdir)/tmpfiles.d
35 sessiongeneratordir=$(pkglibexecdir)/session-generators
36
37 # And these are the special ones for /
38 rootdir=@rootdir@
39 rootbindir=$(rootdir)/bin
40 rootsbindir=$(rootdir)/sbin
41 rootlibexecdir=$(rootdir)/lib/systemd
42 systemunitdir=$(rootdir)/lib/systemd/system
43 systemgeneratordir=$(rootdir)/lib/systemd/system-generators
44
45 AM_CPPFLAGS = \
46         -include $(top_builddir)/config.h \
47         -DSYSTEM_CONFIG_FILE=\"$(pkgsysconfdir)/system.conf\" \
48         -DSYSTEM_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/system\" \
49         -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" \
50         -DSYSTEM_SYSVINIT_PATH=\"$(SYSTEM_SYSVINIT_PATH)\" \
51         -DSYSTEM_SYSVRCND_PATH=\"$(SYSTEM_SYSVRCND_PATH)\" \
52         -DSESSION_CONFIG_FILE=\"$(pkgsysconfdir)/session.conf\" \
53         -DSESSION_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/session\" \
54         -DSESSION_DATA_UNIT_PATH=\"$(sessionunitdir)\" \
55         -DSYSTEMD_CGROUP_AGENT_PATH=\"$(rootlibexecdir)/systemd-cgroups-agent\" \
56         -DSYSTEMD_BINARY_PATH=\"$(rootbindir)/systemd\" \
57         -DSYSTEMD_SHUTDOWN_BINARY_PATH=\"$(rootlibexecdir)/systemd-shutdown\" \
58         -DSYSTEMCTL_BINARY_PATH=\"$(rootbindir)/systemctl\" \
59         -DSYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH=\"$(rootbindir)/systemd-tty-ask-password-agent\" \
60         -DRUNTIME_DIR=\"$(localstatedir)/run\" \
61         -DRANDOM_SEED=\"$(localstatedir)/lib/random-seed\" \
62         -DSYSTEMD_CRYPTSETUP_PATH=\"$(rootlibexecdir)/systemd-cryptsetup\" \
63         -DSYSTEM_GENERATOR_PATH=\"$(systemgeneratordir)\" \
64         -DSESSION_GENERATOR_PATH=\"$(sessiongeneratordir)\" \
65         -I $(top_srcdir)/src
66
67 if TARGET_GENTOO
68 AM_CPPFLAGS += \
69         -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
70         -DKBD_SETFONT=\"/usr/bin/setfont\" \
71         -DDEFAULT_FONT=\"LatArCyrHeb-16\"
72 else
73 if TARGET_ARCH
74 AM_CPPFLAGS += \
75         -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
76         -DKBD_SETFONT=\"/usr/bin/setfont\" \
77         -DDEFAULT_FONT=\"LatArCyrHeb-16\"
78 else
79 AM_CPPFLAGS += \
80         -DKBD_LOADKEYS=\"/bin/loadkeys\" \
81         -DKBD_SETFONT=\"/bin/setfont\" \
82         -DDEFAULT_FONT=\"latarcyrheb-sun16\"
83 endif
84 endif
85
86 rootbin_PROGRAMS = \
87         systemd \
88         systemctl \
89         systemd-notify \
90         systemd-ask-password \
91         systemd-tty-ask-password-agent
92
93 bin_PROGRAMS = \
94         systemd-cgls
95
96 if HAVE_GTK
97 bin_PROGRAMS += \
98         systemadm \
99         systemd-gnome-ask-password-agent
100 endif
101
102 rootlibexec_PROGRAMS = \
103         systemd-logger \
104         systemd-cgroups-agent \
105         systemd-initctl \
106         systemd-update-utmp \
107         systemd-random-seed \
108         systemd-shutdownd \
109         systemd-shutdown \
110         systemd-modules-load \
111         systemd-remount-api-vfs \
112         systemd-kmsg-syslogd \
113         systemd-vconsole-setup \
114         systemd-reply-password \
115         systemd-readahead-collect \
116         systemd-readahead-replay \
117         systemd-tmpfiles \
118         systemd-user-sessions \
119         systemd-fsck \
120         systemd-quotacheck \
121         systemd-timestamp \
122         systemd-ac-power
123
124 if HAVE_LIBCRYPTSETUP
125 rootlibexec_PROGRAMS += \
126         systemd-cryptsetup
127
128 systemgenerator_PROGRAMS = \
129         systemd-cryptsetup-generator
130 endif
131
132 noinst_PROGRAMS = \
133         test-engine \
134         test-job-type \
135         test-ns \
136         test-loopback \
137         test-hostname \
138         test-daemon \
139         test-cgroup \
140         test-env-replace \
141         test-strv
142
143 if HAVE_PAM
144 pamlib_LTLIBRARIES = \
145         pam_systemd.la
146 endif
147
148 dist_pkgsysconf_DATA = \
149         src/system.conf
150
151 dist_dbuspolicy_DATA = \
152         src/org.freedesktop.systemd1.conf
153
154 dist_dbussystemservice_DATA = \
155         src/org.freedesktop.systemd1.service
156
157 dist_udevrules_DATA = \
158         src/99-systemd.rules
159
160 dbusinterface_DATA = \
161         org.freedesktop.systemd1.Manager.xml \
162         org.freedesktop.systemd1.Job.xml \
163         org.freedesktop.systemd1.Unit.xml \
164         org.freedesktop.systemd1.Service.xml \
165         org.freedesktop.systemd1.Socket.xml \
166         org.freedesktop.systemd1.Timer.xml \
167         org.freedesktop.systemd1.Target.xml \
168         org.freedesktop.systemd1.Device.xml \
169         org.freedesktop.systemd1.Mount.xml \
170         org.freedesktop.systemd1.Automount.xml \
171         org.freedesktop.systemd1.Snapshot.xml \
172         org.freedesktop.systemd1.Swap.xml \
173         org.freedesktop.systemd1.Path.xml
174
175 dist_bashcompletion_DATA = \
176         src/systemctl-bash-completion.sh
177
178 dist_tmpfiles_DATA = \
179         tmpfiles.d/systemd.conf \
180         tmpfiles.d/x11.conf
181
182 dist_systemunit_DATA = \
183         units/emergency.service \
184         units/emergency.target \
185         units/sysinit.target \
186         units/basic.target \
187         units/getty.target \
188         units/halt.target \
189         units/kexec.target \
190         units/local-fs.target \
191         units/network.target \
192         units/nss-lookup.target \
193         units/mail-transfer-agent.target \
194         units/http-daemon.target \
195         units/poweroff.target \
196         units/reboot.target \
197         units/rescue.target \
198         units/rpcbind.target \
199         units/rtc-set.target \
200         units/shutdown.target \
201         units/final.target \
202         units/umount.target \
203         units/sigpwr.target \
204         units/sockets.target \
205         units/swap.target \
206         units/dbus.target \
207         units/systemd-initctl.socket \
208         units/systemd-logger.socket \
209         units/systemd-shutdownd.socket \
210         units/syslog.socket \
211         units/dev-hugepages.automount \
212         units/dev-hugepages.mount \
213         units/dev-mqueue.automount \
214         units/dev-mqueue.mount \
215         units/proc-sys-fs-binfmt_misc.automount \
216         units/proc-sys-fs-binfmt_misc.mount \
217         units/sys-kernel-debug.automount \
218         units/sys-kernel-debug.mount \
219         units/sys-kernel-security.automount \
220         units/sys-kernel-security.mount \
221         units/tmp.mount \
222         units/var-lock.mount \
223         units/var-run.mount \
224         units/hwclock-load.service \
225         units/hwclock-save.service \
226         units/sysctl.service \
227         units/remount-rootfs.service \
228         units/printer.target \
229         units/bluetooth.target \
230         units/smartcard.target \
231         units/systemd-readahead-done.timer \
232         units/systemd-tmpfiles-clean.timer \
233         units/quotaon.service \
234         units/systemd-ask-password-wall.path \
235         units/systemd-ask-password-plymouth.path
236
237 nodist_systemunit_DATA = \
238         units/getty@.service \
239         units/serial-getty@.service \
240         units/graphical.target \
241         units/remote-fs.target \
242         units/multi-user.target \
243         units/systemd-initctl.service \
244         units/systemd-logger.service \
245         units/systemd-shutdownd.service \
246         units/systemd-kmsg-syslogd.service \
247         units/systemd-modules-load.service \
248         units/systemd-vconsole-setup.service \
249         units/systemd-remount-api-vfs.service \
250         units/systemd-update-utmp-runlevel.service \
251         units/systemd-update-utmp-shutdown.service \
252         units/systemd-random-seed-save.service \
253         units/systemd-random-seed-load.service \
254         units/systemd-readahead-collect.service \
255         units/systemd-readahead-replay.service \
256         units/systemd-readahead-done.service \
257         units/systemd-tmpfiles-setup.service \
258         units/systemd-tmpfiles-clean.service \
259         units/systemd-user-sessions.service \
260         units/systemd-ask-password-wall.service \
261         units/systemd-ask-password-plymouth.service \
262         units/syslog.target \
263         units/halt.service \
264         units/poweroff.service \
265         units/reboot.service \
266         units/kexec.service \
267         units/fsck@.service \
268         units/fsck-root.service \
269         units/quotacheck.service \
270         units/rescue.service
271
272 dist_sessionunit_DATA = \
273         units/session/default.target \
274         units/session/exit.target
275
276 nodist_sessionunit_DATA = \
277         units/session/remote-fs.target \
278         units/session/exit.service
279
280 EXTRA_DIST = \
281         units/getty@.service.m4 \
282         units/serial-getty@.service.m4 \
283         units/graphical.target.m4 \
284         units/multi-user.target.m4 \
285         units/remote-fs.target.m4 \
286         units/rescue.service.m4 \
287         units/systemd-initctl.service.in \
288         units/systemd-logger.service.in \
289         units/systemd-shutdownd.service.in \
290         units/systemd-kmsg-syslogd.service.in \
291         units/systemd-modules-load.service.in \
292         units/systemd-vconsole-setup.service.in \
293         units/systemd-remount-api-vfs.service.in \
294         units/systemd-update-utmp-runlevel.service.in \
295         units/systemd-update-utmp-shutdown.service.in \
296         units/systemd-random-seed-save.service.in \
297         units/systemd-random-seed-load.service.in \
298         units/systemd-readahead-collect.service.in \
299         units/systemd-readahead-replay.service.in \
300         units/systemd-readahead-done.service.in \
301         units/systemd-tmpfiles-setup.service.in \
302         units/systemd-tmpfiles-clean.service.in \
303         units/systemd-user-sessions.service.in \
304         units/systemd-ask-password-wall.service.in \
305         units/systemd-ask-password-plymouth.service.in \
306         units/syslog.target.in \
307         units/halt.service.in \
308         units/poweroff.service.in \
309         units/reboot.service.in \
310         units/kexec.service.in \
311         units/session/exit.service.in \
312         units/fsck@.service.in \
313         units/fsck-root.service.in \
314         units/quotacheck.service.in \
315         systemd.pc.in
316
317 if TARGET_FEDORA
318 dist_systemunit_DATA += \
319         units/fedora/prefdm.service \
320         units/fedora/rc-local.service \
321         units/fedora/halt-local.service \
322         units/fedora/plymouth-start.service \
323         units/fedora/plymouth-read-write.service \
324         units/fedora/plymouth-quit.service \
325         units/fedora/plymouth-reboot.service \
326         units/fedora/plymouth-kexec.service \
327         units/fedora/plymouth-poweroff.service \
328         units/fedora/plymouth-halt.service
329 endif
330
331 if TARGET_GENTOO
332 dist_systemunit_DATA += \
333         units/gentoo/xdm.service
334 endif
335
336 if TARGET_ARCH
337 dist_systemunit_DATA += \
338         units/arch/rc-local.service
339 endif
340
341 dist_doc_DATA = \
342         README \
343         LICENSE \
344         DISTRO_PORTING \
345         src/sd-daemon.h \
346         src/sd-daemon.c \
347         src/sd-readahead.h \
348         src/sd-readahead.c
349
350 pkgconfigdata_DATA = \
351         systemd.pc
352
353 dist_polkitpolicy_DATA = \
354         src/org.freedesktop.systemd1.policy
355
356 noinst_LTLIBRARIES = \
357         libsystemd-basic.la \
358         libsystemd-core.la
359
360 libsystemd_basic_la_SOURCES = \
361         src/util.c \
362         src/label.c \
363         src/hashmap.c \
364         src/set.c \
365         src/strv.c \
366         src/conf-parser.c \
367         src/socket-util.c \
368         src/log.c \
369         src/ratelimit.c
370
371 libsystemd_basic_la_CFLAGS = \
372         $(AM_CFLAGS) \
373         $(SELINUX_CFLAGS)
374
375 libsystemd_basic_la_LIBADD = \
376         $(SELINUX_LIBS)
377
378 libsystemd_core_la_SOURCES = \
379         src/unit.c \
380         src/job.c \
381         src/manager.c \
382         src/path-lookup.c \
383         src/load-fragment.c \
384         src/service.c \
385         src/automount.c \
386         src/mount.c \
387         src/swap.c \
388         src/device.c \
389         src/target.c \
390         src/snapshot.c \
391         src/socket.c \
392         src/timer.c \
393         src/path.c \
394         src/load-dropin.c \
395         src/execute.c \
396         src/utmp-wtmp.c \
397         src/exit-status.c \
398         src/dbus.c \
399         src/dbus-manager.c \
400         src/dbus-unit.c \
401         src/dbus-job.c \
402         src/dbus-service.c \
403         src/dbus-socket.c \
404         src/dbus-timer.c \
405         src/dbus-target.c \
406         src/dbus-mount.c \
407         src/dbus-automount.c \
408         src/dbus-swap.c \
409         src/dbus-snapshot.c \
410         src/dbus-device.c \
411         src/dbus-execute.c \
412         src/dbus-path.c \
413         src/cgroup.c \
414         src/mount-setup.c \
415         src/hostname-setup.c \
416         src/selinux-setup.c \
417         src/loopback-setup.c \
418         src/kmod-setup.c \
419         src/locale-setup.c \
420         src/specifier.c \
421         src/unit-name.c \
422         src/fdset.c \
423         src/namespace.c \
424         src/tcpwrap.c \
425         src/cgroup-util.c \
426         src/condition.c
427
428 libsystemd_core_la_CFLAGS = \
429         $(AM_CFLAGS) \
430         $(DBUS_CFLAGS) \
431         $(UDEV_CFLAGS) \
432         $(LIBWRAP_CFLAGS) \
433         $(PAM_CFLAGS) \
434         $(AUDIT_CFLAGS)
435
436 libsystemd_core_la_LIBADD = \
437         libsystemd-basic.la \
438         $(DBUS_LIBS) \
439         $(UDEV_LIBS) \
440         $(LIBWRAP_LIBS) \
441         $(PAM_LIBS) \
442         $(AUDIT_LIBS)
443
444 # This is needed because automake is buggy in how it generates the
445 # rules for C programs, but not Vala programs.  We therefore can't
446 # list the .h files as dependencies if we want make dist to work.
447
448 EXTRA_DIST += \
449         ${libsystemd_basic_la_SOURCES:.c=.h} \
450         ${libsystemd_core_la_SOURCES:.c=.h} \
451         src/macro.h \
452         src/ioprio.h \
453         src/missing.h \
454         src/list.h \
455         src/securebits.h \
456         src/linux/auto_dev-ioctl.h \
457         src/linux/fanotify.h \
458         src/initreq.h \
459         src/sd-daemon.h \
460         src/sd-readahead.h \
461         src/special.h \
462         src/dbus-common.h \
463         src/bus-errors.h \
464         src/cgroup-show.h \
465         src/build.h \
466         src/shutdownd.h \
467         src/umount.h \
468         src/readahead-common.h \
469         src/ask-password-api.h
470
471 MANPAGES = \
472         man/systemd.1 \
473         man/systemctl.1 \
474         man/systemadm.1 \
475         man/systemd-cgls.1 \
476         man/systemd-notify.1 \
477         man/sd_notify.3 \
478         man/sd_readahead.3 \
479         man/sd_booted.3 \
480         man/sd_listen_fds.3 \
481         man/sd_is_fifo.3 \
482         man/systemd.unit.5 \
483         man/systemd.service.5 \
484         man/systemd.socket.5 \
485         man/systemd.mount.5 \
486         man/systemd.automount.5 \
487         man/systemd.swap.5 \
488         man/systemd.timer.5 \
489         man/systemd.path.5 \
490         man/systemd.target.5 \
491         man/systemd.device.5 \
492         man/systemd.snapshot.5 \
493         man/systemd.exec.5 \
494         man/daemon.7 \
495         man/sd-daemon.7 \
496         man/sd-readahead.7 \
497         man/runlevel.8 \
498         man/telinit.8 \
499         man/halt.8 \
500         man/shutdown.8 \
501         man/pam_systemd.8 \
502         man/systemd.conf.5 \
503         man/tmpfiles.d.5
504
505 MANPAGES_ALIAS = \
506         man/reboot.8 \
507         man/poweroff.8 \
508         man/sd_is_socket.3 \
509         man/sd_is_socket_unix.3 \
510         man/sd_is_socket_inet.3 \
511         man/sd_notifyf.3 \
512         man/init.1
513
514 man/reboot.8: man/halt.8
515 man/poweroff.8: man/halt.8
516 man/sd_is_socket.3: man/sd_is_fifo.3
517 man/sd_is_socket_unix.3: man/sd_is_fifo.3
518 man/sd_is_socket_inet.3: man/sd_is_fifo.3
519 man/sd_notifyf.3: man/sd_notify.3
520 man/init.1: man/systemd.1
521
522 dist_man_MANS = \
523         $(MANPAGES) \
524         $(MANPAGES_ALIAS)
525
526 nodist_man_MANS = \
527         man/systemd.special.7
528
529 XML_FILES = \
530         ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
531
532 XML_IN_FILES = \
533         ${patsubst %.1,%.xml.in,${patsubst %.3,%.xml.in,${patsubst %.5,%.xml.in,${patsubst %.7,%.xml.in,${patsubst %.8,%.xml.in,$(nodist_man_MANS)}}}}}
534
535 dist_noinst_DATA = \
536         ${XML_FILES:.xml=.html}
537
538 nodist_noinst_DATA = \
539         ${XML_IN_FILES:.xml.in=.html}
540
541 EXTRA_DIST += \
542         $(XML_FILES) \
543         $(XML_IN_FILES) \
544         ${nodist_man_MANS:=.in} \
545         ${XML_IN_FILES:.xml.in=.html.in}
546
547 systemd_SOURCES = \
548         src/main.c
549
550 systemd_CFLAGS = \
551         $(AM_CFLAGS) \
552         $(DBUS_CFLAGS) \
553         $(UDEV_CFLAGS)
554
555 systemd_LDADD = \
556         libsystemd-core.la
557
558 test_engine_SOURCES = \
559         src/test-engine.c
560
561 test_engine_CFLAGS = $(systemd_CFLAGS)
562 test_engine_LDADD = $(systemd_LDADD)
563
564 test_job_type_SOURCES = \
565         src/test-job-type.c
566
567 test_job_type_CFLAGS = $(systemd_CFLAGS)
568 test_job_type_LDADD = $(systemd_LDADD)
569
570 test_ns_SOURCES = \
571         src/test-ns.c
572
573 test_ns_CFLAGS = $(systemd_CFLAGS)
574 test_ns_LDADD = $(systemd_LDADD)
575
576 test_loopback_SOURCES = \
577         src/test-loopback.c \
578         src/loopback-setup.c
579
580 test_loopback_LDADD = \
581         libsystemd-basic.la
582
583 test_hostname_SOURCES = \
584         src/test-hostname.c \
585         src/hostname-setup.c
586
587 test_hostname_LDADD = \
588         libsystemd-basic.la
589
590 test_daemon_SOURCES = \
591         src/test-daemon.c \
592         src/sd-daemon.c
593
594 test_daemon_LDADD = \
595         libsystemd-basic.la
596
597 test_cgroup_SOURCES = \
598         src/test-cgroup.c \
599         src/cgroup-util.c
600
601 test_cgroup_CFLAGS = \
602         $(AM_CFLAGS)
603
604 test_cgroup_LDADD = \
605         libsystemd-basic.la
606
607 test_env_replace_SOURCES = \
608         src/test-env-replace.c
609
610 test_env_replace_CFLAGS = \
611         $(AM_CFLAGS)
612
613 test_env_replace_LDADD = \
614         libsystemd-basic.la
615
616 test_strv_SOURCES = \
617         src/test-strv.c
618
619 test_strv_CFLAGS = \
620         $(AM_CFLAGS)
621
622 test_strv_LDADD = \
623         libsystemd-basic.la
624
625 systemd_logger_SOURCES = \
626         src/logger.c \
627         src/sd-daemon.c \
628         src/tcpwrap.c
629
630 systemd_logger_LDADD = \
631         libsystemd-basic.la \
632         $(LIBWRAP_LIBS)
633
634 systemd_initctl_SOURCES = \
635         src/initctl.c \
636         src/sd-daemon.c \
637         src/dbus-common.c
638
639 systemd_initctl_CFLAGS = \
640         $(AM_CFLAGS) \
641         $(DBUS_CFLAGS)
642
643 systemd_initctl_LDADD = \
644         libsystemd-basic.la \
645         $(DBUS_LIBS)
646
647 systemd_update_utmp_SOURCES = \
648         src/update-utmp.c \
649         src/dbus-common.c \
650         src/utmp-wtmp.c
651
652 systemd_update_utmp_CFLAGS = \
653         $(AM_CFLAGS) \
654         $(DBUS_CFLAGS) \
655         $(AUDIT_CFLAGS)
656
657 systemd_update_utmp_LDADD = \
658         libsystemd-basic.la \
659         $(DBUS_LIBS) \
660         $(AUDIT_LIBS)
661
662 systemd_random_seed_SOURCES = \
663         src/random-seed.c
664
665 systemd_random_seed_CFLAGS = \
666         $(AM_CFLAGS)
667
668 systemd_random_seed_LDADD = \
669         libsystemd-basic.la
670
671 systemd_shutdownd_SOURCES = \
672         src/utmp-wtmp.c \
673         src/sd-daemon.c \
674         src/shutdownd.c
675
676 systemd_shutdownd_CFLAGS = \
677         $(AM_CFLAGS)
678
679 systemd_shutdownd_LDADD = \
680         libsystemd-basic.la
681
682 systemd_shutdown_SOURCES = \
683         src/mount-setup.c \
684         src/umount.c \
685         src/shutdown.c
686
687 systemd_shutdown_CFLAGS = \
688         $(AM_CFLAGS) \
689         $(UDEV_CFLAGS)
690
691 systemd_shutdown_LDADD = \
692         libsystemd-basic.la \
693         $(UDEV_LIBS)
694
695 systemd_modules_load_SOURCES = \
696         src/modules-load.c
697
698 systemd_modules_load_CFLAGS = \
699         $(AM_CFLAGS)
700
701 systemd_modules_load_LDADD = \
702         libsystemd-basic.la
703
704 systemd_tmpfiles_SOURCES = \
705         src/tmpfiles.c
706
707 systemd_tmpfiles_CFLAGS = \
708         $(AM_CFLAGS)
709
710 systemd_tmpfiles_LDADD = \
711         libsystemd-basic.la
712
713 systemd_fsck_SOURCES = \
714         src/fsck.c \
715         src/dbus-common.c
716
717 systemd_fsck_CFLAGS = \
718         $(AM_CFLAGS) \
719         $(UDEV_CFLAGS) \
720         $(DBUS_CFLAGS)
721
722 systemd_fsck_LDADD = \
723         libsystemd-basic.la \
724         $(UDEV_LIBS) \
725         $(DBUS_LIBS)
726
727 systemd_quotacheck_SOURCES = \
728         src/quotacheck.c
729
730 systemd_quotacheck_CFLAGS = \
731         $(AM_CFLAGS)
732
733 systemd_quotacheck_LDADD = \
734         libsystemd-basic.la
735
736 systemd_timestamp_SOURCES = \
737         src/timestamp.c
738
739 systemd_timestamp_CFLAGS = \
740         $(AM_CFLAGS)
741
742 systemd_timestamp_LDADD = \
743         libsystemd-basic.la
744
745 systemd_ac_power_SOURCES = \
746         src/ac-power.c
747
748 systemd_ac_power_CFLAGS = \
749         $(AM_CFLAGS) \
750         $(UDEV_CFLAGS)
751
752 systemd_ac_power_LDADD = \
753         libsystemd-basic.la \
754         $(UDEV_LIBS)
755
756 systemd_cryptsetup_SOURCES = \
757         src/cryptsetup.c \
758         src/ask-password-api.c
759
760 systemd_cryptsetup_CFLAGS = \
761         $(LIBCRYPTSETUP_CFLAGS) \
762         $(AM_CFLAGS)
763
764 systemd_cryptsetup_LDADD = \
765         $(LIBCRYPTSETUP_LIBS) \
766         libsystemd-basic.la
767
768 systemd_cryptsetup_generator_SOURCES = \
769         src/cryptsetup-generator.c \
770         src/unit-name.c
771
772 systemd_cryptsetup_generator_CFLAGS = \
773         $(AM_CFLAGS)
774
775 systemd_cryptsetup_generator_LDADD = \
776         libsystemd-basic.la
777
778 systemd_user_sessions_SOURCES = \
779         src/user-sessions.c \
780         src/cgroup-util.c
781
782 systemd_user_sessions_CFLAGS = \
783         $(AM_CFLAGS)
784
785 systemd_user_sessions_LDADD = \
786         libsystemd-basic.la
787
788 systemd_vconsole_setup_SOURCES = \
789         src/vconsole-setup.c
790
791 systemd_vconsole_setup_CFLAGS = \
792         $(AM_CFLAGS)
793
794 systemd_vconsole_setup_LDADD = \
795         libsystemd-basic.la
796
797 systemd_remount_api_vfs_SOURCES = \
798         src/remount-api-vfs.c \
799         src/mount-setup.c
800
801 systemd_remount_api_vfs_CFLAGS = \
802         $(AM_CFLAGS)
803
804 systemd_remount_api_vfs_LDADD = \
805         libsystemd-basic.la
806
807 systemd_cgroups_agent_SOURCES = \
808         src/cgroups-agent.c \
809         src/dbus-common.c
810
811 systemd_cgroups_agent_CFLAGS = \
812         $(AM_CFLAGS) \
813         $(DBUS_CFLAGS)
814
815 systemd_cgroups_agent_LDADD = \
816         libsystemd-basic.la \
817         $(DBUS_LIBS)
818
819 systemd_kmsg_syslogd_SOURCES = \
820         src/kmsg-syslogd.c \
821         src/sd-daemon.c \
822         src/fdset.c
823
824 systemd_kmsg_syslogd_CFLAGS = \
825         $(AM_CFLAGS)
826
827 systemd_kmsg_syslogd_LDADD = \
828         libsystemd-basic.la
829
830 systemctl_SOURCES = \
831         src/systemctl.c \
832         src/utmp-wtmp.c \
833         src/dbus-common.c \
834         src/path-lookup.c \
835         src/sd-daemon.c \
836         src/cgroup-show.c \
837         src/cgroup-util.c \
838         src/exit-status.c \
839         src/unit-name.c
840
841 systemctl_CFLAGS = \
842         $(AM_CFLAGS) \
843         $(DBUS_CFLAGS)
844
845 systemctl_LDADD = \
846         libsystemd-basic.la \
847         $(DBUS_LIBS)
848
849 systemd_notify_SOURCES = \
850         src/notify.c \
851         src/sd-daemon.c \
852         src/sd-readahead.c
853
854 systemd_notify_LDADD = \
855         libsystemd-basic.la
856
857 systemd_ask_password_SOURCES = \
858         src/ask-password.c \
859         src/ask-password-api.c
860
861 systemd_ask_password_LDADD = \
862         libsystemd-basic.la
863
864 systemd_reply_password_SOURCES = \
865         src/reply-password.c
866
867 systemd_reply_password_LDADD = \
868         libsystemd-basic.la
869
870 systemd_readahead_collect_SOURCES = \
871         src/readahead-collect.c \
872         src/sd-daemon.c \
873         src/readahead-common.c
874
875 systemd_readahead_collect_CFLAGS = \
876         $(UDEV_CFLAGS)
877
878 systemd_readahead_collect_LDADD = \
879         libsystemd-basic.la \
880         $(UDEV_LIBS)
881
882 systemd_readahead_replay_SOURCES = \
883         src/readahead-replay.c \
884         src/sd-daemon.c \
885         src/readahead-common.c
886
887 systemd_readahead_replay_CFLAGS = \
888         $(UDEV_CFLAGS)
889
890 systemd_readahead_replay_LDADD = \
891         libsystemd-basic.la \
892         $(UDEV_LIBS)
893
894 systemd_cgls_SOURCES = \
895         src/cgls.c \
896         src/cgroup-show.c \
897         src/cgroup-util.c
898
899 systemd_cgls_CFLAGS = \
900         $(AM_CFLAGS)
901
902 systemd_cgls_LDADD = \
903         libsystemd-basic.la
904
905 systemadm_SOURCES = \
906         src/systemadm.vala \
907         src/systemd-interfaces.vala
908
909 systemadm_CFLAGS = \
910         $(AM_CFLAGS) \
911         $(DBUSGLIB_CFLAGS) \
912         $(GTK_CFLAGS) \
913         -Wno-unused-variable \
914         -Wno-unused-function \
915         -Wno-shadow \
916         -Wno-format-nonliteral
917
918 systemadm_VALAFLAGS = \
919         --pkg=dbus-glib-1 \
920         --pkg=posix \
921         --pkg=gtk+-2.0 \
922         -g
923
924 systemadm_LDADD = \
925         $(DBUSGLIB_LIBS) \
926         $(GTK_LIBS)
927
928 systemd_gnome_ask_password_agent_SOURCES = \
929         src/gnome-ask-password-agent.vala
930
931 systemd_gnome_ask_password_agent_CFLAGS = \
932         $(AM_CFLAGS) \
933         $(DBUSGLIB_CFLAGS) \
934         $(GTK_CFLAGS) \
935         -Wno-unused-variable \
936         -Wno-unused-function \
937         -Wno-shadow \
938         -Wno-format-nonliteral
939
940 systemd_gnome_ask_password_agent_VALAFLAGS = \
941         --pkg=dbus-glib-1 \
942         --pkg=posix \
943         --pkg=gtk+-2.0 \
944         --pkg=linux \
945         --pkg=gio-unix-2.0 \
946         --pkg=libnotify \
947         -g
948
949 systemd_gnome_ask_password_agent_LDADD = \
950         $(DBUSGLIB_LIBS) \
951         $(GTK_LIBS)
952
953 systemd_tty_ask_password_agent_SOURCES = \
954         src/tty-ask-password-agent.c \
955         src/ask-password-api.c \
956         src/utmp-wtmp.c
957
958 systemd_tty_ask_password_agent_LDADD = \
959         libsystemd-basic.la
960
961 pam_systemd_la_SOURCES = \
962         src/pam-module.c \
963         src/cgroup-util.c \
964         src/sd-daemon.c
965
966 pam_systemd_la_CFLAGS = \
967         $(AM_CFLAGS)
968         -fvisibility=hidden
969
970 pam_systemd_la_LDFLAGS = \
971         -module \
972         -export-dynamic \
973         -avoid-version \
974         -shared \
975         -export-symbols-regex '^pam_sm_.*'
976
977 pam_systemd_la_LIBADD = \
978         libsystemd-basic.la \
979         $(PAM_LIBS)
980
981 SED_PROCESS = \
982         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
983         $(SED)  -e 's,@rootlibexecdir\@,$(rootlibexecdir),g' \
984                 -e 's,@rootbindir\@,$(rootbindir),g' \
985                 -e 's,@SPECIAL_SYSLOG_SERVICE\@,$(SPECIAL_SYSLOG_SERVICE),g' \
986                 -e 's,@SYSTEMCTL\@,$(rootbindir)/systemctl,g' \
987                 -e 's,@SYSTEMD_NOTIFY\@,$(rootbindir)/systemd-notify,g' \
988                 -e 's,@pkgsysconfdir\@,$(pkgsysconfdir),g' \
989                 -e 's,@pkgdatadir\@,$(pkgdatadir),g' \
990                 -e 's,@systemunitdir\@,$(systemunitdir),g' \
991                 -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
992                 -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
993                 -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' \
994                 -e 's,@prefix\@,$(prefix),g' \
995                 < $< > $@ || rm $@
996
997 units/%: units/%.in Makefile
998         $(SED_PROCESS)
999
1000 man/%: man/%.in Makefile
1001         $(SED_PROCESS)
1002
1003 %.pc: %.pc.in Makefile
1004         $(SED_PROCESS)
1005
1006 M4_PROCESS_SYSTEM = \
1007         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1008         $(M4) -P $(M4_DISTRO_FLAG) -DFOR_SYSTEM=1 < $< > $@ || rm $@
1009
1010 M4_PROCESS_SESSION = \
1011         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1012         $(M4) -P $(M4_DISTRO_FLAG) -DFOR_SESSION=1 < $< > $@ || rm $@
1013
1014 units/%: units/%.m4 Makefile
1015         $(M4_PROCESS_SYSTEM)
1016
1017 units/session/%: units/%.m4 Makefile
1018         $(M4_PROCESS_SESSION)
1019
1020 CLEANFILES = \
1021         $(nodist_systemunit_DATA) \
1022         $(nodist_sessionunit_DATA) \
1023         $(nodist_man_MANS) \
1024         ${XML_IN_FILES:.xml.in=.html} \
1025         $(pkgconfigdata_DATA)
1026
1027 if HAVE_VALAC
1028 CLEANFILES += \
1029         ${systemadm_SOURCES:.vala=.c}
1030 endif
1031
1032 if HAVE_XSLTPROC
1033 XSLTPROC_FLAGS = \
1034         --nonet \
1035         --param funcsynopsis.style "'ansi'"
1036
1037 XSLTPROC_PROCESS_MAN = \
1038         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1039         $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
1040
1041 XSLTPROC_PROCESS_MAN_IN = \
1042         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1043         $(XSLTPROC) -o ${@:.in=} $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< && \
1044         mv ${@:.in=} $@
1045
1046 XSLTPROC_PROCESS_HTML = \
1047         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1048         $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $<
1049
1050 XSLTPROC_PROCESS_HTML_IN = \
1051         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1052         $(XSLTPROC) -o ${@:.in=} $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $< && \
1053         mv ${@:.in=} $@
1054
1055 man/%.1: man/%.xml
1056         $(XSLTPROC_PROCESS_MAN)
1057
1058 man/%.1.in: man/%.xml.in
1059         $(XSLTPROC_PROCESS_MAN)
1060
1061 man/%.3: man/%.xml
1062         $(XSLTPROC_PROCESS_MAN)
1063
1064 man/%.3.in: man/%.xml.in
1065         $(XSLTPROC_PROCESS_MAN)
1066
1067 man/%.5: man/%.xml
1068         $(XSLTPROC_PROCESS_MAN)
1069
1070 man/%.5.in: man/%.xml.in
1071         $(XSLTPROC_PROCESS_MAN)
1072
1073 man/%.7: man/%.xml
1074         $(XSLTPROC_PROCESS_MAN)
1075
1076 man/%.7.in: man/%.xml.in
1077         $(XSLTPROC_PROCESS_MAN_IN)
1078
1079 man/%.8: man/%.xml
1080         $(XSLTPROC_PROCESS_MAN)
1081
1082 man/%.8.in: man/%.xml.in
1083         $(XSLTPROC_PROCESS_MAN_IN)
1084
1085 man/%.html: man/%.xml
1086         $(XSLTPROC_PROCESS_HTML)
1087
1088 man/%.html.in: man/%.xml.in
1089         $(XSLTPROC_PROCESS_HTML_IN)
1090
1091 CLEANFILES += \
1092         $(dist_man_MANS) \
1093         ${nodist_man_MANS:=.in} \
1094         ${XML_FILES:.xml=.html} \
1095         ${XML_IN_FILES:.xml.in=.html.in}
1096 endif
1097
1098 org.freedesktop.systemd1.%.xml: systemd
1099         $(AM_V_GEN)SYSTEMD_SKIP_API_MOUNTS=1 ./systemd --introspect=${@:.xml=} > $@
1100
1101 CLEANFILES += \
1102         $(dbusinterface_DATA)
1103
1104 install-data-hook:
1105         $(MKDIR_P) -m 0755 \
1106                 $(DESTDIR)$(systemunitdir) \
1107                 $(DESTDIR)$(sessionunitdir) \
1108                 $(DESTDIR)$(systemunitdir)/sysinit.target.wants \
1109                 $(DESTDIR)$(systemunitdir)/sockets.target.wants \
1110                 $(DESTDIR)$(systemunitdir)/basic.target.wants \
1111                 $(DESTDIR)$(systemunitdir)/shutdown.target.wants \
1112                 $(DESTDIR)$(systemunitdir)/local-fs.target.wants \
1113                 $(DESTDIR)$(systemunitdir)/runlevel1.target.wants \
1114                 $(DESTDIR)$(systemunitdir)/runlevel2.target.wants \
1115                 $(DESTDIR)$(systemunitdir)/runlevel3.target.wants \
1116                 $(DESTDIR)$(systemunitdir)/runlevel4.target.wants \
1117                 $(DESTDIR)$(systemunitdir)/runlevel5.target.wants \
1118                 $(DESTDIR)$(systemunitdir)/multi-user.target.wants \
1119                 $(DESTDIR)$(systemunitdir)/graphical.target.wants \
1120                 $(DESTDIR)$(pkgsysconfdir)/system \
1121                 $(DESTDIR)$(pkgsysconfdir)/system/sysinit.target.wants \
1122                 $(DESTDIR)$(pkgsysconfdir)/system/local-fs.target.wants \
1123                 $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants \
1124                 $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants \
1125                 $(DESTDIR)$(pkgsysconfdir)/session \
1126                 $(DESTDIR)$(sysconfdir)/xdg/systemd
1127         ( cd $(DESTDIR)$(sysconfdir)/xdg/systemd/ && \
1128                 rm -f session && \
1129                 $(LN_S) $(pkgsysconfdir)/session session )
1130         ( cd $(DESTDIR)$(systemunitdir)/sockets.target.wants && \
1131                 rm -f systemd-initctl.socket systemd-logger.socket systemd-shutdownd.socket syslog.socket && \
1132                 $(LN_S) ../systemd-logger.socket systemd-logger.socket && \
1133                 $(LN_S) ../systemd-initctl.socket systemd-initctl.socket && \
1134                 $(LN_S) ../systemd-shutdownd.socket systemd-shutdownd.socket && \
1135                 $(LN_S) ../syslog.socket syslog.socket )
1136         ( cd $(DESTDIR)$(systemunitdir)/runlevel1.target.wants && \
1137                 rm -f systemd-update-utmp-runlevel.service && \
1138                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
1139         ( cd $(DESTDIR)$(systemunitdir)/runlevel2.target.wants && \
1140                 rm -f systemd-update-utmp-runlevel.service && \
1141                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
1142         ( cd $(DESTDIR)$(systemunitdir)/runlevel3.target.wants && \
1143                 rm -f systemd-update-utmp-runlevel.service && \
1144                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
1145         ( cd $(DESTDIR)$(systemunitdir)/runlevel4.target.wants && \
1146                 rm -f systemd-update-utmp-runlevel.service && \
1147                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
1148         ( cd $(DESTDIR)$(systemunitdir)/runlevel5.target.wants && \
1149                 rm -f systemd-update-utmp-runlevel.service && \
1150                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
1151         ( cd $(DESTDIR)$(systemunitdir)/shutdown.target.wants && \
1152                 rm -f systemd-update-utmp-shutdown.service \
1153                         hwclock-save.service \
1154                         systemd-random-seed-save.service && \
1155                 $(LN_S) ../systemd-update-utmp-shutdown.service systemd-update-utmp-shutdown.service && \
1156                 $(LN_S) ../hwclock-save.service hwclock-save.service && \
1157                 $(LN_S) ../systemd-random-seed-save.service systemd-random-seed-save.service )
1158         ( cd $(DESTDIR)$(systemunitdir)/local-fs.target.wants && \
1159                 rm -f systemd-remount-api-vfs.service \
1160                         fsck-root.service \
1161                         remount-rootfs.service \
1162                         var-run.mount \
1163                         var-lock.mount && \
1164                 $(LN_S) ../systemd-remount-api-vfs.service systemd-remount-api-vfs.service && \
1165                 $(LN_S) ../fsck-root.service fsck-root.service && \
1166                 $(LN_S) ../remount-rootfs.service remount-rootfs.service && \
1167                 $(LN_S) ../var-run.mount var-run.mount && \
1168                 $(LN_S) ../var-lock.mount var-lock.mount )
1169         ( cd $(DESTDIR)$(sessionunitdir) && \
1170                 rm -f shutdown.target sockets.target local-fs.target swap.target bluetooth.target printer.target && \
1171                 $(LN_S) $(systemunitdir)/shutdown.target shutdown.target && \
1172                 $(LN_S) $(systemunitdir)/sockets.target sockets.target && \
1173                 $(LN_S) $(systemunitdir)/local-fs.target local-fs.target && \
1174                 $(LN_S) $(systemunitdir)/swap.target swap.target && \
1175                 $(LN_S) $(systemunitdir)/bluetooth.target bluetooth.target && \
1176                 $(LN_S) $(systemunitdir)/printer.target printer.target)
1177         ( cd $(DESTDIR)$(systemunitdir) && \
1178                 rm -f runlevel0.target runlevel1.target runlevel2.target runlevel3.target runlevel4.target runlevel5.target runlevel6.target && \
1179                 $(LN_S) poweroff.target runlevel0.target && \
1180                 $(LN_S) rescue.target runlevel1.target && \
1181                 $(LN_S) multi-user.target runlevel2.target && \
1182                 $(LN_S) multi-user.target runlevel3.target && \
1183                 $(LN_S) multi-user.target runlevel4.target && \
1184                 $(LN_S) graphical.target runlevel5.target && \
1185                 $(LN_S) reboot.target runlevel6.target )
1186         ( cd $(DESTDIR)$(systemunitdir) && \
1187                 rm -f default.target ctrl-alt-del.target && \
1188                 $(LN_S) graphical.target default.target && \
1189                 $(LN_S) reboot.target ctrl-alt-del.target )
1190         ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
1191                 rm -f getty.target systemd-user-sessions.service systemd-ask-password-wall.path && \
1192                 $(LN_S) ../getty.target getty.target && \
1193                 $(LN_S) ../systemd-user-sessions.service systemd-user-sessions.service && \
1194                 $(LN_S) ../systemd-ask-password-wall.path systemd-ask-password-wall.path )
1195         ( cd $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants && \
1196                 rm -f getty@tty1.service getty@tty2.service getty@tty3.service getty@tty4.service getty@tty5.service getty@tty6.service && \
1197                 $(LN_S) $(systemunitdir)/getty@.service getty@tty1.service && \
1198                 $(LN_S) $(systemunitdir)/getty@.service getty@tty2.service && \
1199                 $(LN_S) $(systemunitdir)/getty@.service getty@tty3.service && \
1200                 $(LN_S) $(systemunitdir)/getty@.service getty@tty4.service && \
1201                 $(LN_S) $(systemunitdir)/getty@.service getty@tty5.service && \
1202                 $(LN_S) $(systemunitdir)/getty@.service getty@tty6.service )
1203         ( cd $(DESTDIR)$(pkgsysconfdir)/system/local-fs.target.wants && \
1204                 rm -f quotaon.service quotacheck.service && \
1205                 $(LN_S) $(systemunitdir)/quotacheck.service quotacheck.service && \
1206                 $(LN_S) $(systemunitdir)/quotaon.service quotaon.service )
1207         ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
1208                 rm -f remote-fs.target && \
1209                 $(LN_S) $(systemunitdir)/remote-fs.target remote-fs.target )
1210         ( cd $(DESTDIR)$(pkgsysconfdir)/system/sysinit.target.wants && \
1211                 rm -f hwclock-load.service && \
1212                 $(LN_S) $(systemunitdir)/hwclock-load.service hwclock-load.service )
1213         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
1214                 rm -f dev-hugepages.automount \
1215                         dev-mqueue.automount \
1216                         proc-sys-fs-binfmt_misc.automount \
1217                         sys-kernel-debug.automount \
1218                         sys-kernel-security.automount \
1219                         systemd-vconsole-setup.service \
1220                         systemd-modules-load.service \
1221                         systemd-random-seed-load.service \
1222                         systemd-tmpfiles-setup.service \
1223                         sysctl.service && \
1224                 $(LN_S) ../dev-hugepages.automount dev-hugepages.automount && \
1225                 $(LN_S) ../dev-mqueue.automount dev-mqueue.automount && \
1226                 $(LN_S) ../proc-sys-fs-binfmt_misc.automount proc-sys-fs-binfmt_misc.automount && \
1227                 $(LN_S) ../sys-kernel-debug.automount sys-kernel-debug.automount && \
1228                 $(LN_S) ../sys-kernel-security.automount sys-kernel-security.automount && \
1229                 $(LN_S) ../systemd-vconsole-setup.service systemd-vconsole-setup.service && \
1230                 $(LN_S) ../systemd-modules-load.service systemd-modules-load.service && \
1231                 $(LN_S) ../systemd-random-seed-load.service systemd-random-seed-load.service && \
1232                 $(LN_S) ../systemd-tmpfiles-setup.service systemd-tmpfiles-setup.service && \
1233                 $(LN_S) ../sysctl.service sysctl.service )
1234         ( cd $(DESTDIR)$(systemunitdir)/basic.target.wants && \
1235                 rm -f systemd-tmpfiles-clean.timer && \
1236                 $(LN_S) ../systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.timer )
1237         ( cd $(DESTDIR)$(dbussessionservicedir) && \
1238                 rm -f org.freedesktop.systemd1.service && \
1239                 $(LN_S) ../system-services/org.freedesktop.systemd1.service org.freedesktop.systemd1.service )
1240 if TARGET_FEDORA
1241         $(MKDIR_P) -m 0755 \
1242                 $(DESTDIR)$(SYSTEM_SYSVINIT_PATH) \
1243                 $(DESTDIR)$(systemunitdir)/reboot.target.wants \
1244                 $(DESTDIR)$(systemunitdir)/kexec.target.wants \
1245                 $(DESTDIR)$(systemunitdir)/poweroff.target.wants \
1246                 $(DESTDIR)$(systemunitdir)/halt.target.wants \
1247                 $(DESTDIR)$(systemunitdir)/final.target.wants
1248         ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
1249                 rm -f rc-local.service && \
1250                 $(LN_S) $(systemunitdir)/rc-local.service rc-local.service )
1251         ( cd $(DESTDIR)$(systemunitdir)/final.target.wants && \
1252                 rm -f halt-local.service && \
1253                 $(LN_S) $(systemunitdir)/halt-local.service halt-local.service )
1254         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
1255                 rm -f plymouth-start.service systemd-ask-password-plymouth.path plymouth-read-write.service && \
1256                 $(LN_S) ../plymouth-start.service plymouth-start.service && \
1257                 $(LN_S) ../plymouth-read-write.service plymouth-read-write.service && \
1258                 $(LN_S) ../systemd-ask-password-plymouth.path systemd-ask-password-plymouth.path )
1259         ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
1260                 rm -f plymouth-quit.service  && \
1261                 $(LN_S) ../plymouth-quit.service plymouth-quit.service )
1262         ( cd $(DESTDIR)$(systemunitdir)/reboot.target.wants && \
1263                 rm -f plymouth-reboot.service && \
1264                 $(LN_S) ../plymouth-reboot.service plymouth-reboot.service )
1265         ( cd $(DESTDIR)$(systemunitdir)/kexec.target.wants && \
1266                 rm -f plymouth-kexec.service && \
1267                 $(LN_S) ../plymouth-kexec.service plymouth-kexec.service )
1268         ( cd $(DESTDIR)$(systemunitdir)/poweroff.target.wants && \
1269                 rm -f plymouth-poweroff.service && \
1270                 $(LN_S) ../plymouth-poweroff.service plymouth-poweroff.service )
1271         ( cd $(DESTDIR)$(systemunitdir)/halt.target.wants && \
1272                 rm -f plymouth-halt.service && \
1273                 $(LN_S) ../plymouth-halt.service plymouth-halt.service )
1274         ( cd $(DESTDIR)$(systemunitdir) && \
1275                 rm -f display-manager.service && \
1276                 $(LN_S) prefdm.service display-manager.service )
1277         ( cd $(DESTDIR)$(systemunitdir)/graphical.target.wants && \
1278                 rm -f display-manager.service && \
1279                 $(LN_S) $(systemunitdir)/display-manager.service display-manager.service )
1280 endif
1281 if TARGET_GENTOO
1282         ( cd $(DESTDIR)$(systemunitdir) && \
1283                 rm -f display-manager.service && \
1284                 $(LN_S) xdm.service display-manager.service )
1285         ( cd $(DESTDIR)$(systemunitdir)/graphical.target.wants && \
1286                 rm -f display-manager.service && \
1287                 $(LN_S) $(systemunitdir)/display-manager.service display-manager.service )
1288 endif
1289 if TARGET_DEBIAN_OR_UBUNTU
1290         ( cd $(DESTDIR)$(systemunitdir) && \
1291                 rm -f runlevel5.target && \
1292                 $(LN_S) multi-user.target runlevel5.target )
1293 endif
1294
1295 DISTCHECK_CONFIGURE_FLAGS = \
1296         --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
1297         --with-dbussessionservicedir=$$dc_install_base/$(dbussessionservicedir) \
1298         --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
1299         --with-dbusinterfacedir=$$dc_install_base/$(dbusinterfacedir) \
1300         --with-udevrulesdir=$$dc_install_base/$(udevrulesdir) \
1301         --with-pamlibdir=$$dc_install_base/$(pamlibdir) \
1302         --with-rootdir=$$dc_install_base/$(rootdir)
1303
1304 upload: all distcheck
1305         cp -v systemd-$(VERSION).tar.bz2 /home/lennart/git.fedora/systemd/
1306         scp systemd-$(VERSION).tar.bz2 fdo:/srv/www.freedesktop.org/www/software/systemd/
1307         scp man/*.html tango:public/systemd-man/
1308
1309 git-tag:
1310         git tag "v$(VERSION)" -m "systemd $(VERSION)"
1311
1312 # Opt out from a few services on Fedora for now, as long as rc.sysinit does this job
1313 fedora: install
1314         rm $(DESTDIR)/lib/systemd/system/local-fs.target.wants/var-run.mount
1315         rm $(DESTDIR)/lib/systemd/system/local-fs.target.wants/var-lock.mount