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