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