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