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