chiark / gitweb /
b650daba06e64f4c2f81b992f6c9ae58b64e4498
[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
29 # Our own, non-special dirs
30 pkgsysconfdir=$(sysconfdir)/systemd
31 sessionunitdir=$(pkgdatadir)/session
32
33 # And these are the special ones for /
34 rootdir=@rootdir@
35 rootbindir=$(rootdir)/bin
36 rootlibexecdir=$(rootdir)/lib/systemd
37 systemunitdir=$(rootdir)/lib/systemd/system
38
39 AM_CPPFLAGS = \
40         -include $(top_builddir)/config.h \
41         -DSYSTEM_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/system\" \
42         -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" \
43         -DSYSTEM_SYSVINIT_PATH=\"$(SYSTEM_SYSVINIT_PATH)\" \
44         -DSYSTEM_SYSVRCND_PATH=\"$(SYSTEM_SYSVRCND_PATH)\" \
45         -DSESSION_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/session\" \
46         -DSESSION_DATA_UNIT_PATH=\"$(sessionunitdir)\" \
47         -DCGROUP_AGENT_PATH=\"$(rootlibexecdir)/systemd-cgroups-agent\" \
48         -DSYSTEMD_BINARY_PATH=\"$(rootbindir)/systemd\" \
49         -DSYSTEMCTL_BINARY_PATH=\"$(rootbindir)/systemctl\" \
50         -DRUNTIME_DIR=\"$(localstatedir)/run\" \
51         -I $(top_srcdir)/src
52
53 rootbin_PROGRAMS = \
54         systemd \
55         systemctl \
56         systemd-notify
57
58 bin_PROGRAMS = \
59         systemd-install
60
61 if HAVE_GTK
62 bin_PROGRAMS += \
63         systemadm
64 endif
65
66 rootlibexec_PROGRAMS = \
67         systemd-logger \
68         systemd-cgroups-agent \
69         systemd-initctl
70
71 noinst_PROGRAMS = \
72         test-engine \
73         test-job-type \
74         test-ns \
75         test-loopback \
76         test-daemon \
77         test-cgroup
78
79 if HAVE_PAM
80 pamlib_LTLIBRARIES = \
81         pam_systemd.la
82 endif
83
84 dist_dbuspolicy_DATA = \
85         src/org.freedesktop.systemd1.conf
86
87 dist_dbussystemservice_DATA = \
88         src/org.freedesktop.systemd1.service
89
90 dist_udevrules_DATA = \
91         src/99-systemd.rules
92
93 dbusinterface_DATA = \
94         org.freedesktop.systemd1.Manager.xml \
95         org.freedesktop.systemd1.Job.xml \
96         org.freedesktop.systemd1.Unit.xml \
97         org.freedesktop.systemd1.Service.xml \
98         org.freedesktop.systemd1.Socket.xml \
99         org.freedesktop.systemd1.Timer.xml \
100         org.freedesktop.systemd1.Target.xml \
101         org.freedesktop.systemd1.Device.xml \
102         org.freedesktop.systemd1.Mount.xml \
103         org.freedesktop.systemd1.Automount.xml \
104         org.freedesktop.systemd1.Snapshot.xml \
105         org.freedesktop.systemd1.Swap.xml \
106         org.freedesktop.systemd1.Path.xml
107
108 dist_systemunit_DATA = \
109         units/emergency.service \
110         units/basic.target \
111         units/getty.target \
112         units/halt.target \
113         units/local-fs.target \
114         units/network.target \
115         units/nss-lookup.target \
116         units/mail-transfer-agent.target \
117         units/poweroff.target \
118         units/reboot.target \
119         units/remote-fs.target \
120         units/rescue.target \
121         units/rpcbind.target \
122         units/rtc-set.target \
123         units/shutdown.target \
124         units/sigpwr.target \
125         units/sockets.target \
126         units/swap.target \
127         units/systemd-initctl.socket \
128         units/systemd-logger.socket \
129         units/dev-hugepages.automount \
130         units/dev-hugepages.mount \
131         units/dev-mqueue.automount \
132         units/dev-mqueue.mount \
133         units/proc-sys-fs-binfmt_misc.automount \
134         units/proc-sys-fs-binfmt_misc.mount \
135         units/sys-kernel-debug.automount \
136         units/sys-kernel-debug.mount \
137         units/sys-kernel-security.automount \
138         units/sys-kernel-security.mount \
139         units/var-lock.mount \
140         units/var-run.mount
141
142 systemunit_DATA = \
143         units/sysinit.target \
144         units/getty@.service \
145         units/graphical.target \
146         units/multi-user.target \
147         units/systemd-initctl.service \
148         units/systemd-logger.service \
149         units/syslog.target
150
151 dist_sessionunit_DATA = \
152         units/session/default.target
153
154 sessionunit_DATA = \
155         units/session/remote-fs.target \
156         units/session/exit.service
157
158 EXTRA_DIST = \
159         units/sysinit.target.m4 \
160         units/getty@.service.m4 \
161         units/graphical.target.m4 \
162         units/multi-user.target.m4 \
163         units/remote-fs.target.m4 \
164         units/systemd-initctl.service.in \
165         units/systemd-logger.service.in \
166         units/syslog.target.in \
167         units/session/exit.service.in \
168         systemd.pc.in
169
170 if TARGET_FEDORA
171 dist_systemunit_DATA += \
172         units/fedora/halt.service \
173         units/fedora/killall.service \
174         units/fedora/poweroff.service \
175         units/fedora/prefdm.service \
176         units/fedora/rc-local.service \
177         units/fedora/reboot.service \
178         units/fedora/sysinit.service
179 endif
180
181 if TARGET_SUSE
182 dist_systemunit_DATA += \
183         units/suse/halt.service \
184         units/suse/poweroff.service \
185         units/suse/reboot.service
186 endif
187
188 if TARGET_GENTOO
189 dist_systemunit_DATA += \
190         units/gentoo/halt.service \
191         units/gentoo/killall.service \
192         units/gentoo/poweroff.service \
193         units/gentoo/reboot.service \
194         units/gentoo/xdm.service
195 endif
196
197 if TARGET_ARCH
198 dist_systemunit_DATA += \
199         units/arch/sysinit.service \
200         units/arch/rc-local.service \
201         units/arch/halt.service \
202         units/arch/poweroff.service \
203         units/arch/reboot.service
204 endif
205
206 dist_doc_DATA = \
207         README \
208         LICENSE \
209         DISTRO_PORTING \
210         src/sd-daemon.h \
211         src/sd-daemon.c
212
213 pkgconfigdata_DATA = \
214         systemd.pc
215
216 noinst_LTLIBRARIES = \
217         libsystemd-basic.la \
218         libsystemd-core.la
219
220 # This is needed because automake is buggy in how it generates the
221 # rules for C programs, but not Vala programs.  We therefore can't
222 # list the .h files as dependencies if we want make dist to work.
223
224 libsystemd_basic_la_SOURCES = \
225         src/util.c \
226         src/hashmap.c \
227         src/set.c \
228         src/strv.c \
229         src/conf-parser.c \
230         src/socket-util.c \
231         src/log.c \
232         src/ratelimit.c
233
234 libsystemd_core_la_SOURCES = \
235         src/unit.c \
236         src/job.c \
237         src/manager.c \
238         src/path-lookup.c \
239         src/load-fragment.c \
240         src/service.c \
241         src/automount.c \
242         src/mount.c \
243         src/swap.c \
244         src/device.c \
245         src/target.c \
246         src/snapshot.c \
247         src/socket.c \
248         src/timer.c \
249         src/path.c \
250         src/load-dropin.c \
251         src/execute.c \
252         src/dbus.c \
253         src/dbus-manager.c \
254         src/dbus-unit.c \
255         src/dbus-job.c \
256         src/dbus-service.c \
257         src/dbus-socket.c \
258         src/dbus-timer.c \
259         src/dbus-target.c \
260         src/dbus-mount.c \
261         src/dbus-automount.c \
262         src/dbus-swap.c \
263         src/dbus-snapshot.c \
264         src/dbus-device.c \
265         src/dbus-execute.c \
266         src/dbus-path.c \
267         src/cgroup.c \
268         src/mount-setup.c \
269         src/hostname-setup.c \
270         src/loopback-setup.c \
271         src/kmod-setup.c \
272         src/utmp-wtmp.c \
273         src/specifier.c \
274         src/unit-name.c \
275         src/fdset.c \
276         src/namespace.c \
277         src/tcpwrap.c \
278         src/cgroup-util.c
279
280 libsystemd_core_la_CFLAGS = \
281         $(AM_CFLAGS) \
282         $(DBUS_CFLAGS) \
283         $(UDEV_CFLAGS) \
284         $(CGROUP_CFLAGS)
285
286 libsystemd_core_la_LIBADD = \
287         libsystemd-basic.la \
288         $(DBUS_LIBS) \
289         $(UDEV_LIBS) \
290         $(CGROUP_LIBS) \
291         $(LIBWRAP_LIBS) \
292         $(PAM_LIBS)
293
294 EXTRA_DIST += \
295         ${libsystemd_basic_la_SOURCES:.c=.h} \
296         ${libsystemd_core_la_SOURCES:.c=.h} \
297         src/macro.h \
298         src/ioprio.h \
299         src/missing.h \
300         src/list.h \
301         src/securebits.h \
302         src/linux/auto_dev-ioctl.h \
303         src/initreq.h \
304         src/sd-daemon.h \
305         src/special.h
306
307 dist_man_MANS = \
308         man/systemd.unit.5 \
309         man/systemd.service.5 \
310         man/daemon.7 \
311         man/systemd.1 \
312         man/sd_notify.3 \
313         man/sd_booted.3 \
314         man/sd_listen_fds.3 \
315         man/sd_is_fifo.3 \
316         man/sd-daemon.7 \
317         man/runlevel.8 \
318         man/telinit.8 \
319         man/halt.8 \
320         man/shutdown.8 \
321         man/systemd-install.1 \
322         man/pam_systemd.8
323
324 nodist_man_MANS = \
325         man/systemd.special.7
326
327 dist_noinst_DATA = \
328         man/systemd.unit.html \
329         man/systemd.service.html \
330         man/daemon.html \
331         man/systemd.html \
332         man/sd_notify.html \
333         man/sd_booted.html \
334         man/sd_listen_fds.html \
335         man/sd_is_fifo.html \
336         man/sd-daemon.html \
337         man/runlevel.html \
338         man/telinit.html \
339         man/halt.html \
340         man/shutdown.html \
341         man/systemd-install.html \
342         man/pam_systemd.html
343
344 nodist_noinst_DATA = \
345         man/systemd.special.html
346
347 EXTRA_DIST += \
348         man/systemd.unit.xml \
349         man/systemd.service.xml \
350         man/systemd.special.xml.in \
351         man/systemd.special.7.in \
352         man/systemd.special.html.in \
353         man/daemon.xml \
354         man/systemd.xml \
355         man/sd_notify.xml \
356         man/sd_booted.xml \
357         man/sd_listen_fds.xml \
358         man/sd_is_fifo.xml \
359         man/sd-daemon.xml \
360         man/runlevel.xml \
361         man/telinit.xml \
362         man/halt.xml \
363         man/shutdown.xml \
364         man/systemd-install.xml \
365         man/pam_systemd.xml
366
367 systemd_SOURCES = \
368         src/main.c
369
370 systemd_CFLAGS = \
371         $(AM_CFLAGS) \
372         $(DBUS_CFLAGS) \
373         $(UDEV_CFLAGS) \
374         $(CGROUP_CFLAGS)
375
376 systemd_LDADD = \
377         libsystemd-core.la
378
379 test_engine_SOURCES = \
380         src/test-engine.c
381
382 test_engine_CFLAGS = $(systemd_CFLAGS)
383 test_engine_LDADD = $(systemd_LDADD)
384
385 test_job_type_SOURCES = \
386         src/test-job-type.c
387
388 test_job_type_CFLAGS = $(systemd_CFLAGS)
389 test_job_type_LDADD = $(systemd_LDADD)
390
391 test_ns_SOURCES = \
392         src/test-ns.c
393
394 test_ns_CFLAGS = $(systemd_CFLAGS)
395 test_ns_LDADD = $(systemd_LDADD)
396
397 test_loopback_SOURCES = \
398         src/test-loopback.c \
399         src/loopback-setup.c
400
401 test_loopback_LDADD = \
402         libsystemd-basic.la
403
404 test_daemon_SOURCES = \
405         src/test-daemon.c \
406         src/sd-daemon.c
407
408 test_daemon_LDADD = \
409         libsystemd-basic.la
410
411 test_cgroup_SOURCES = \
412         src/test-cgroup.c \
413         src/cgroup-util.c
414
415 test_cgroup_CFLAGS = \
416         $(AM_CFLAGS) \
417         $(CGROUP_CFLAGS)
418
419 test_cgroup_LDADD = \
420         libsystemd-basic.la \
421         $(CGROUP_LIBS)
422
423 systemd_logger_SOURCES = \
424         src/logger.c \
425         src/sd-daemon.c \
426         src/tcpwrap.c
427
428 systemd_logger_LDADD = \
429         libsystemd-basic.la \
430         $(LIBWRAP_LIBS)
431
432 systemd_initctl_SOURCES = \
433         src/initctl.c \
434         src/sd-daemon.c
435
436 systemd_initctl_CFLAGS = \
437         $(AM_CFLAGS) \
438         $(DBUS_CFLAGS)
439
440 systemd_initctl_LDADD = \
441         libsystemd-basic.la \
442         $(DBUS_LIBS)
443
444 systemd_cgroups_agent_SOURCES = \
445         src/cgroups-agent.c
446
447 systemd_cgroups_agent_CFLAGS = \
448         $(AM_CFLAGS) \
449         $(DBUS_CFLAGS)
450
451 systemd_cgroups_agent_LDADD = \
452         libsystemd-basic.la \
453         $(DBUS_LIBS)
454
455 systemctl_SOURCES = \
456         src/systemctl.c \
457         src/utmp-wtmp.c
458
459 systemctl_CFLAGS = \
460         $(AM_CFLAGS) \
461         $(DBUS_CFLAGS)
462
463 systemctl_LDADD = \
464         libsystemd-basic.la \
465         $(DBUS_LIBS)
466
467 systemd_notify_SOURCES = \
468         src/notify.c \
469         src/sd-daemon.c
470
471 systemd_notify_LDADD = \
472         libsystemd-basic.la
473
474 systemd_install_SOURCES = \
475         src/install.c \
476         src/path-lookup.c
477
478 systemd_install_LDADD = \
479         libsystemd-basic.la
480
481 # We don't really link here against D-Bus, however we indirectly include D-Bus header files
482 systemd_install_CFLAGS = \
483         $(AM_CFLAGS) \
484         $(DBUS_CFLAGS)
485
486 systemadm_SOURCES = \
487         src/systemadm.vala \
488         src/systemd-interfaces.vala
489
490 systemadm_CFLAGS = \
491         $(AM_CFLAGS) \
492         $(DBUSGLIB_CFLAGS) \
493         $(GTK_CFLAGS) \
494         -Wno-unused-variable \
495         -Wno-unused-function \
496         -Wno-shadow \
497         -Wno-format-nonliteral
498
499 systemadm_VALAFLAGS = \
500         --pkg=dbus-glib-1 \
501         --pkg=posix \
502         --pkg=gtk+-2.0 \
503         -g
504
505 systemadm_LDADD = \
506         $(DBUSGLIB_LIBS) \
507         $(GTK_LIBS)
508
509 pam_systemd_la_SOURCES = \
510         src/pam-module.c \
511         src/cgroup-util.c \
512         src/sd-daemon.c
513
514 pam_systemd_la_CFLAGS = \
515         $(AM_CFLAGS) \
516         $(CGROUP_CFLAGS) \
517         -fvisibility=hidden
518
519 pam_systemd_la_LDFLAGS = \
520         -module \
521         -export-dynamic \
522         -avoid-version \
523         -shared \
524         -export-symbols-regex '^pam_sm_.*'
525
526 pam_systemd_la_LIBADD = \
527         libsystemd-basic.la \
528         $(PAM_LIBS) \
529         $(CGROUP_LIBS)
530
531 SED_PROCESS = \
532         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
533         $(SED)  -e 's,@rootlibexecdir\@,$(rootlibexecdir),g' \
534                 -e 's,@SPECIAL_SYSLOG_SERVICE\@,$(SPECIAL_SYSLOG_SERVICE),g' \
535                 -e 's,@SPECIAL_DBUS_SERVICE\@,$(SPECIAL_DBUS_SERVICE),g' \
536                 -e 's,@SYSTEMCTL\@,$(rootbindir)/systemctl,g' \
537                 -e 's,@pkgsysconfdir\@,$(pkgsysconfdir),g' \
538                 -e 's,@pkgdatadir\@,$(pkgdatadir),g' \
539                 -e 's,@systemunitdir\@,$(systemunitdir),g' \
540                 -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
541                 -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
542                 -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' \
543                 -e 's,@prefix\@,$(prefix),g' \
544                 < $< > $@
545
546 units/%: units/%.in Makefile
547         $(SED_PROCESS)
548
549 man/%: man/%.in Makefile
550         $(SED_PROCESS)
551
552 %.pc: %.pc.in Makefile
553         $(SED_PROCESS)
554
555 M4_PROCESS_SYSTEM = \
556         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
557         $(M4) -P $(M4_DISTRO_FLAG) -DFOR_SYSTEM=1 < $< > $@
558
559 M4_PROCESS_SESSION = \
560         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
561         $(M4) -P $(M4_DISTRO_FLAG) -DFOR_SESSION=1 < $< > $@
562
563 units/%: units/%.m4 Makefile
564         $(M4_PROCESS_SYSTEM)
565
566 units/session/%: units/%.m4 Makefile
567         $(M4_PROCESS_SESSION)
568
569 CLEANFILES = \
570         units/systemd-initctl.service \
571         units/systemd-logger.service \
572         units/syslog.target \
573         units/sysinit.target \
574         units/getty@.service \
575         units/graphical.target \
576         units/multi-user.target \
577         units/remote-fs.target \
578         units/session/remote-fs.target \
579         units/session/exit.service \
580         man/systemd.special.7 \
581         man/systemd.special.html \
582         systemd.pc
583
584 if HAVE_VALAC
585 CLEANFILES += \
586         src/systemd-interfaces.c \
587         src/systemadm.c
588 endif
589
590 if HAVE_XSLTPROC
591 XSLTPROC_FLAGS = \
592         --nonet \
593         --param funcsynopsis.style "'ansi'"
594
595 XSLTPROC_PROCESS_MAN = \
596         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
597         $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
598
599 XSLTPROC_PROCESS_MAN_IN = \
600         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
601         $(XSLTPROC) -o ${@:.in=} $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< && \
602         mv ${@:.in=} $@
603
604 XSLTPROC_PROCESS_HTML = \
605         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
606         $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $<
607
608 XSLTPROC_PROCESS_HTML_IN = \
609         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
610         $(XSLTPROC) -o ${@:.in=} $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $< && \
611         mv ${@:.in=} $@
612
613 man/%.3: man/%.xml
614         $(XSLTPROC_PROCESS_MAN)
615
616 man/%.3.in: man/%.xml.in
617         $(XSLTPROC_PROCESS_MAN)
618
619 man/%.1: man/%.xml
620         $(XSLTPROC_PROCESS_MAN)
621
622 man/%.1.in: man/%.xml.in
623         $(XSLTPROC_PROCESS_MAN)
624
625 man/%.5: man/%.xml
626         $(XSLTPROC_PROCESS_MAN)
627
628 man/%.5.in: man/%.xml.in
629         $(XSLTPROC_PROCESS_MAN)
630
631 man/%.7: man/%.xml
632         $(XSLTPROC_PROCESS_MAN)
633
634 man/%.7.in: man/%.xml.in
635         $(XSLTPROC_PROCESS_MAN_IN)
636
637 man/%.8: man/%.xml
638         $(XSLTPROC_PROCESS_MAN)
639
640 man/%.8.in: man/%.xml.in
641         $(XSLTPROC_PROCESS_MAN_IN)
642
643 man/%.html: man/%.xml
644         $(XSLTPROC_PROCESS_HTML)
645
646 man/%.html.in: man/%.xml.in
647         $(XSLTPROC_PROCESS_HTML_IN)
648
649 CLEANFILES += \
650         $(dist_man_MANS) \
651         man/systemd.special.7.in \
652         man/systemd.unit.html \
653         man/systemd.service.html \
654         man/systemd.special.html.in \
655         man/daemon.html \
656         man/runlevel.html \
657         man/sd_booted.html \
658         man/sd-daemon.html \
659         man/sd_is_fifo.html \
660         man/sd_listen_fds.html \
661         man/sd_notify.html \
662         man/systemd.html
663 endif
664
665 org.freedesktop.systemd1.%.xml: systemd
666         $(AM_V_GEN)./systemd --introspect=${@:.xml=} > $@
667
668 CLEANFILES += $(dbusinterface_DATA)
669
670 install-data-hook:
671         $(MKDIR_P) -m 0755 \
672                 $(DESTDIR)$(systemunitdir) \
673                 $(DESTDIR)$(sessionunitdir) \
674                 $(DESTDIR)$(systemunitdir)/sockets.target.wants \
675                 $(DESTDIR)$(systemunitdir)/sysinit.target.wants \
676                 $(DESTDIR)$(pkgsysconfdir)/system \
677                 $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants \
678                 $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants \
679                 $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants \
680                 $(DESTDIR)$(pkgsysconfdir)/session \
681                 $(DESTDIR)$(sysconfdir)/xdg/systemd
682         $(MKDIR_P) -m 0755 $(DESTDIR)/cgroup || \
683                 echo "Don't forget to create /cgroup! Couldn't create it for you, continuing anyway."
684         ( cd $(DESTDIR)$(sysconfdir)/xdg/systemd/ && \
685                 rm -f session && \
686                 $(LN_S) $(pkgsysconfdir)/session session )
687         ( cd $(DESTDIR)$(systemunitdir)/sockets.target.wants && \
688                 rm -f systemd-initctl.socket systemd-logger.socket && \
689                 $(LN_S) ../systemd-logger.socket systemd-logger.socket && \
690                 $(LN_S) ../systemd-initctl.socket systemd-initctl.socket )
691         ( cd $(DESTDIR)$(sessionunitdir) && \
692                 rm -f shutdown.target sockets.target local-fs.target swap.target && \
693                 $(LN_S) $(systemunitdir)/shutdown.target shutdown.target && \
694                 $(LN_S) $(systemunitdir)/sockets.target sockets.target && \
695                 $(LN_S) $(systemunitdir)/local-fs.target local-fs.target && \
696                 $(LN_S) $(systemunitdir)/swap.target swap.target )
697         ( cd $(DESTDIR)$(systemunitdir) && \
698                 rm -f runlevel0.target runlevel1.target runlevel6.target && \
699                 $(LN_S) poweroff.target runlevel0.target && \
700                 $(LN_S) rescue.target runlevel1.target && \
701                 $(LN_S) reboot.target runlevel6.target )
702         ( cd $(DESTDIR)$(pkgsysconfdir)/system && \
703                 rm -f default.target ctrl-alt-del.target kbrequest.target && \
704                 $(LN_S) $(systemunitdir)/graphical.target default.target && \
705                 $(LN_S) $(systemunitdir)/reboot.target ctrl-alt-del.target && \
706                 $(LN_S) $(systemunitdir)/rescue.target kbrequest.target && \
707                 rm -f runlevel2.target runlevel3.target runlevel4.target runlevel5.target && \
708                 $(LN_S) $(systemunitdir)/multi-user.target runlevel2.target && \
709                 $(LN_S) $(systemunitdir)/multi-user.target runlevel3.target && \
710                 $(LN_S) $(systemunitdir)/multi-user.target runlevel4.target && \
711                 $(LN_S) $(systemunitdir)/graphical.target runlevel5.target )
712         ( cd $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants && \
713                 rm -f getty@tty1.service getty@tty2.service getty@tty3.service getty@tty4.service getty@tty5.service getty@tty6.service && \
714                 $(LN_S) $(systemunitdir)/getty@.service getty@tty1.service && \
715                 $(LN_S) $(systemunitdir)/getty@.service getty@tty2.service && \
716                 $(LN_S) $(systemunitdir)/getty@.service getty@tty3.service && \
717                 $(LN_S) $(systemunitdir)/getty@.service getty@tty4.service && \
718                 $(LN_S) $(systemunitdir)/getty@.service getty@tty5.service && \
719                 $(LN_S) $(systemunitdir)/getty@.service getty@tty6.service )
720         ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
721                 rm -f getty.target remote-fs.target && \
722                 $(LN_S) $(systemunitdir)/getty.target getty.target && \
723                 $(LN_S) $(systemunitdir)/remote-fs.target remote-fs.target )
724         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
725                 rm -f dev-hugepages.automount \
726                         dev-mqueue.automount \
727                         proc-sys-fs-binfmt_misc.automount \
728                         sys-kernel-debug.automount \
729                         sys-kernel-security.automount && \
730                 $(LN_S) ../dev-hugepages.automount dev-hugepages.automount && \
731                 $(LN_S) ../dev-mqueue.automount dev-mqueue.automount && \
732                 $(LN_S) ../proc-sys-fs-binfmt_misc.automount proc-sys-fs-binfmt_misc.automount && \
733                 $(LN_S) ../sys-kernel-debug.automount sys-kernel-debug.automount && \
734                 $(LN_S) ../sys-kernel-security.automount sys-kernel-security.automount )
735         ( cd $(DESTDIR)$(dbussessionservicedir) && \
736                 rm -f org.freedesktop.systemd1.service && \
737                 $(LN_S) ../system-services/org.freedesktop.systemd1.service org.freedesktop.systemd1.service )
738 if TARGET_FEDORA
739         $(MKDIR_P) -m 0755 \
740                 $(DESTDIR)$(SYSTEM_SYSVINIT_PATH)
741         ( cd $(DESTDIR)$(pkgsysconfdir)/system && \
742                 rm -f display-manager.service && \
743                 $(LN_S) $(systemunitdir)/prefdm.service display-manager.service )
744         ( cd $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants && \
745                 rm -f display-manager.service && \
746                 $(LN_S) ../display-manager.service display-manager.service )
747         ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
748                 rm -f rc-local.service && \
749                 $(LN_S) $(systemunitdir)/rc-local.service rc-local.service )
750         ( cd $(DESTDIR)$(systemunitdir) && \
751                 rm -f local.service && \
752                 $(LN_S) rc-local.service local.service )
753         ( cd $(DESTDIR)$(SYSTEM_SYSVINIT_PATH) && \
754                 $(LN_S) halt reboot > /dev/null 2>&1 || true )
755 endif
756 if TARGET_GENTOO
757         ( cd $(DESTDIR)$(pkgsysconfdir)/system && \
758                 rm -f display-manager.service && \
759                 $(LN_S) $(systemunitdir)/xdm.service display-manager.service )
760         ( cd $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants && \
761                 rm -f display-manager.service && \
762                 $(LN_S) ../display-manager.service display-manager.service )
763 endif
764
765 DISTCHECK_CONFIGURE_FLAGS = \
766         --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
767         --with-dbussessionservicedir=$$dc_install_base/$(dbussessionservicedir) \
768         --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
769         --with-dbusinterfacedir=$$dc_install_base/$(dbusinterfacedir) \
770         --with-udevrulesdir=$$dc_install_base/$(udevrulesdir) \
771         --with-pamlibdir=$$dc_install_base/$(pamlibdir) \
772         --with-rootdir=$$dc_install_base/$(rootdir)