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