chiark / gitweb /
fcc3287c5906f12dd45b45312bac50be71e68288
[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         LICENSE \
169         README \
170         DISTRO_PORTING \
171         systemd.pc.in
172
173 if TARGET_FEDORA
174 dist_systemunit_DATA += \
175         units/fedora/halt.service \
176         units/fedora/killall.service \
177         units/fedora/poweroff.service \
178         units/fedora/prefdm.service \
179         units/fedora/rc-local.service \
180         units/fedora/reboot.service \
181         units/fedora/sysinit.service
182 endif
183
184 if TARGET_SUSE
185 dist_systemunit_DATA += \
186         units/suse/halt.service \
187         units/suse/poweroff.service \
188         units/suse/reboot.service
189 endif
190
191 if TARGET_GENTOO
192 dist_systemunit_DATA += \
193         units/gentoo/halt.service \
194         units/gentoo/killall.service \
195         units/gentoo/poweroff.service \
196         units/gentoo/reboot.service \
197         units/gentoo/xdm.service
198 endif
199
200 if TARGET_ARCH
201 dist_systemunit_DATA += \
202         units/arch/sysinit.service \
203         units/arch/rc-local.service \
204         units/arch/halt.service \
205         units/arch/poweroff.service \
206         units/arch/reboot.service
207 endif
208
209 dist_doc_DATA = \
210         README \
211         src/sd-daemon.h \
212         src/sd-daemon.c
213
214 pkgconfigdata_DATA = \
215         systemd.pc
216
217 noinst_LTLIBRARIES = \
218         libsystemd-basic.la \
219         libsystemd-core.la
220
221 # This is needed because automake is buggy in how it generates the
222 # rules for C programs, but not Vala programs.  We therefore can't
223 # list the .h files as dependencies if we want make dist to work.
224
225 libsystemd_basic_la_SOURCES = \
226         src/util.c \
227         src/hashmap.c \
228         src/set.c \
229         src/strv.c \
230         src/conf-parser.c \
231         src/socket-util.c \
232         src/log.c \
233         src/ratelimit.c
234
235 libsystemd_core_la_SOURCES = \
236         src/unit.c \
237         src/job.c \
238         src/manager.c \
239         src/path-lookup.c \
240         src/load-fragment.c \
241         src/service.c \
242         src/automount.c \
243         src/mount.c \
244         src/swap.c \
245         src/device.c \
246         src/target.c \
247         src/snapshot.c \
248         src/socket.c \
249         src/timer.c \
250         src/path.c \
251         src/load-dropin.c \
252         src/execute.c \
253         src/dbus.c \
254         src/dbus-manager.c \
255         src/dbus-unit.c \
256         src/dbus-job.c \
257         src/dbus-service.c \
258         src/dbus-socket.c \
259         src/dbus-timer.c \
260         src/dbus-target.c \
261         src/dbus-mount.c \
262         src/dbus-automount.c \
263         src/dbus-swap.c \
264         src/dbus-snapshot.c \
265         src/dbus-device.c \
266         src/dbus-execute.c \
267         src/dbus-path.c \
268         src/cgroup.c \
269         src/mount-setup.c \
270         src/hostname-setup.c \
271         src/loopback-setup.c \
272         src/kmod-setup.c \
273         src/utmp-wtmp.c \
274         src/specifier.c \
275         src/unit-name.c \
276         src/fdset.c \
277         src/namespace.c \
278         src/tcpwrap.c \
279         src/cgroup-util.c
280
281 libsystemd_core_la_CFLAGS = \
282         $(AM_CFLAGS) \
283         $(DBUS_CFLAGS) \
284         $(UDEV_CFLAGS) \
285         $(CGROUP_CFLAGS)
286
287 libsystemd_core_la_LIBADD = \
288         libsystemd-basic.la \
289         $(DBUS_LIBS) \
290         $(UDEV_LIBS) \
291         $(CGROUP_LIBS) \
292         $(LIBWRAP_LIBS) \
293         $(PAM_LIBS)
294
295 EXTRA_DIST += \
296         ${libsystemd_basic_la_SOURCES:.c=.h} \
297         ${libsystemd_core_la_SOURCES:.c=.h} \
298         src/macro.h \
299         src/ioprio.h \
300         src/missing.h \
301         src/list.h \
302         src/securebits.h \
303         src/linux/auto_dev-ioctl.h \
304         src/initreq.h \
305         src/sd-daemon.h \
306         src/special.h
307
308 dist_man_MANS = \
309         man/systemd.unit.5 \
310         man/systemd.service.5 \
311         man/daemon.7
312
313 nodist_man_MANS = \
314         man/systemd.special.7
315
316 dist_noinst_DATA = \
317         man/systemd.unit.html \
318         man/systemd.service.html \
319         man/daemon.html
320
321 nodist_noinst_DATA = \
322         man/systemd.special.html
323
324 EXTRA_DIST += \
325         man/systemd.unit.xml \
326         man/systemd.service.xml \
327         man/systemd.special.xml.in \
328         man/systemd.special.7.in \
329         man/systemd.special.html.in \
330         man/daemon.xml
331
332 systemd_SOURCES = \
333         src/main.c
334
335 systemd_CFLAGS = \
336         $(AM_CFLAGS) \
337         $(DBUS_CFLAGS) \
338         $(UDEV_CFLAGS) \
339         $(CGROUP_CFLAGS)
340
341 systemd_LDADD = \
342         libsystemd-core.la
343
344 test_engine_SOURCES = \
345         src/test-engine.c
346
347 test_engine_CFLAGS = $(systemd_CFLAGS)
348 test_engine_LDADD = $(systemd_LDADD)
349
350 test_job_type_SOURCES = \
351         src/test-job-type.c
352
353 test_job_type_CFLAGS = $(systemd_CFLAGS)
354 test_job_type_LDADD = $(systemd_LDADD)
355
356 test_ns_SOURCES = \
357         src/test-ns.c
358
359 test_ns_CFLAGS = $(systemd_CFLAGS)
360 test_ns_LDADD = $(systemd_LDADD)
361
362 test_loopback_SOURCES = \
363         src/test-loopback.c \
364         src/loopback-setup.c
365
366 test_loopback_LDADD = \
367         libsystemd-basic.la
368
369 test_daemon_SOURCES = \
370         src/test-daemon.c \
371         src/sd-daemon.c
372
373 test_daemon_LDADD = \
374         libsystemd-basic.la
375
376 test_cgroup_SOURCES = \
377         src/test-cgroup.c \
378         src/cgroup-util.c
379
380 test_cgroup_CFLAGS = \
381         $(AM_CFLAGS) \
382         $(CGROUP_CFLAGS)
383
384 test_cgroup_LDADD = \
385         libsystemd-basic.la \
386         $(CGROUP_LIBS)
387
388 systemd_logger_SOURCES = \
389         src/logger.c \
390         src/sd-daemon.c \
391         src/tcpwrap.c
392
393 systemd_logger_LDADD = \
394         libsystemd-basic.la \
395         $(LIBWRAP_LIBS)
396
397 systemd_initctl_SOURCES = \
398         src/initctl.c \
399         src/sd-daemon.c
400
401 systemd_initctl_CFLAGS = \
402         $(AM_CFLAGS) \
403         $(DBUS_CFLAGS)
404
405 systemd_initctl_LDADD = \
406         libsystemd-basic.la \
407         $(DBUS_LIBS)
408
409 systemd_cgroups_agent_SOURCES = \
410         src/cgroups-agent.c
411
412 systemd_cgroups_agent_CFLAGS = \
413         $(AM_CFLAGS) \
414         $(DBUS_CFLAGS)
415
416 systemd_cgroups_agent_LDADD = \
417         libsystemd-basic.la \
418         $(DBUS_LIBS)
419
420 systemctl_SOURCES = \
421         src/systemctl.c \
422         src/utmp-wtmp.c
423
424 systemctl_CFLAGS = \
425         $(AM_CFLAGS) \
426         $(DBUS_CFLAGS)
427
428 systemctl_LDADD = \
429         libsystemd-basic.la \
430         $(DBUS_LIBS)
431
432 systemd_notify_SOURCES = \
433         src/notify.c \
434         src/sd-daemon.c
435
436 systemd_notify_LDADD = \
437         libsystemd-basic.la
438
439 systemd_install_SOURCES = \
440         src/install.c \
441         src/path-lookup.c
442
443 systemd_install_LDADD = \
444         libsystemd-basic.la
445
446 # We don't really link here against D-Bus, however we indirectly include D-Bus header files
447 systemd_install_CFLAGS = \
448         $(AM_CFLAGS) \
449         $(DBUS_CFLAGS)
450
451 systemadm_SOURCES = \
452         src/systemadm.vala \
453         src/systemd-interfaces.vala
454
455 systemadm_CFLAGS = \
456         $(AM_CFLAGS) \
457         $(DBUSGLIB_CFLAGS) \
458         $(GTK_CFLAGS) \
459         -Wno-unused-variable \
460         -Wno-unused-function \
461         -Wno-shadow \
462         -Wno-format-nonliteral
463
464 systemadm_VALAFLAGS = \
465         --pkg=dbus-glib-1 \
466         --pkg=posix \
467         --pkg=gtk+-2.0 \
468         -g
469
470 systemadm_LDADD = \
471         $(DBUSGLIB_LIBS) \
472         $(GTK_LIBS)
473
474 pam_systemd_la_SOURCES = \
475         src/pam-module.c \
476         src/cgroup-util.c \
477         src/sd-daemon.c
478
479 pam_systemd_la_CFLAGS = \
480         $(AM_CFLAGS) \
481         $(CGROUP_CFLAGS) \
482         -fvisibility=hidden
483
484 pam_systemd_la_LDFLAGS = \
485         -module \
486         -export-dynamic \
487         -avoid-version \
488         -shared \
489         -export-symbols-regex '^pam_sm_.*'
490
491 pam_systemd_la_LIBADD = \
492         libsystemd-basic.la \
493         $(PAM_LIBS) \
494         $(CGROUP_LIBS)
495
496 SED_PROCESS = \
497         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
498         $(SED)  -e 's,@rootlibexecdir\@,$(rootlibexecdir),g' \
499                 -e 's,@SPECIAL_SYSLOG_SERVICE\@,$(SPECIAL_SYSLOG_SERVICE),g' \
500                 -e 's,@SPECIAL_DBUS_SERVICE\@,$(SPECIAL_DBUS_SERVICE),g' \
501                 -e 's,@SYSTEMCTL\@,$(rootbindir)/systemctl,g' \
502                 -e 's,@pkgsysconfdir\@,$(pkgsysconfdir),g' \
503                 -e 's,@pkgdatadir\@,$(pkgdatadir),g' \
504                 -e 's,@systemunitdir\@,$(systemunitdir),g' \
505                 -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
506                 -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
507                 -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' \
508                 -e 's,@prefix\@,$(prefix),g' \
509                 < $< > $@
510
511 units/%: units/%.in Makefile
512         $(SED_PROCESS)
513
514 man/%: man/%.in Makefile
515         $(SED_PROCESS)
516
517 %.pc: %.pc.in Makefile
518         $(SED_PROCESS)
519
520 M4_PROCESS_SYSTEM = \
521         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
522         $(M4) -P $(M4_DISTRO_FLAG) -DFOR_SYSTEM=1 < $< > $@
523
524 M4_PROCESS_SESSION = \
525         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
526         $(M4) -P $(M4_DISTRO_FLAG) -DFOR_SESSION=1 < $< > $@
527
528 units/%: units/%.m4 Makefile
529         $(M4_PROCESS_SYSTEM)
530
531 units/session/%: units/%.m4 Makefile
532         $(M4_PROCESS_SESSION)
533
534 CLEANFILES = \
535         units/systemd-initctl.service \
536         units/systemd-logger.service \
537         units/syslog.target \
538         units/sysinit.target \
539         units/getty@.service \
540         units/graphical.target \
541         units/multi-user.target \
542         units/remote-fs.target \
543         units/session/remote-fs.target \
544         units/session/exit.service \
545         man/systemd.special.7 \
546         man/systemd.special.html \
547         systemd.pc
548
549 if HAVE_VALAC
550 CLEANFILES += \
551         src/systemd-interfaces.c \
552         src/systemadm.c
553 endif
554
555 if HAVE_XSLTPROC
556 XSLTPROC_PROCESS_MAN = \
557         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
558         $(XSLTPROC) -o $@ --nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
559
560 XSLTPROC_PROCESS_MAN_IN = \
561         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
562         $(XSLTPROC) -o ${@:.in=} --nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< && \
563         mv ${@:.in=} $@
564
565 XSLTPROC_PROCESS_HTML = \
566         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
567         $(XSLTPROC) -o $@ --nonet http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $<
568
569 XSLTPROC_PROCESS_HTML_IN = \
570         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
571         $(XSLTPROC) -o ${@:.in=} --nonet http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $< && \
572         mv ${@:.in=} $@
573
574 man/%.5: man/%.xml
575         $(XSLTPROC_PROCESS_MAN)
576
577 man/%.5.in: man/%.xml.in
578         $(XSLTPROC_PROCESS_MAN)
579
580 man/%.7: man/%.xml
581         $(XSLTPROC_PROCESS_MAN)
582
583 man/%.7.in: man/%.xml.in
584         $(XSLTPROC_PROCESS_MAN_IN)
585
586 man/%.html: man/%.xml
587         $(XSLTPROC_PROCESS_HTML)
588
589 man/%.html.in: man/%.xml.in
590         $(XSLTPROC_PROCESS_HTML_IN)
591
592 CLEANFILES += \
593         $(dist_man_MANS) \
594         man/systemd.special.7.in \
595         man/systemd.unit.html \
596         man/systemd.service.html \
597         man/systemd.special.html.in
598 endif
599
600 org.freedesktop.systemd1.%.xml: systemd
601         $(AM_V_GEN)./systemd --introspect=${@:.xml=} > $@
602
603 CLEANFILES += $(dbusinterface_DATA)
604
605 install-data-hook:
606         $(MKDIR_P) -m 0755 \
607                 $(DESTDIR)$(systemunitdir) \
608                 $(DESTDIR)$(sessionunitdir) \
609                 $(DESTDIR)$(systemunitdir)/sockets.target.wants \
610                 $(DESTDIR)$(systemunitdir)/sysinit.target.wants \
611                 $(DESTDIR)$(pkgsysconfdir)/system \
612                 $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants \
613                 $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants \
614                 $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants \
615                 $(DESTDIR)$(pkgsysconfdir)/session \
616                 $(DESTDIR)$(sysconfdir)/xdg/systemd
617         $(MKDIR_P) -m 0755 $(DESTDIR)/cgroup/systemd || \
618                 echo "Don't forget to create /cgroup/systemd! Couldn't create it for you, continuing anyway."
619         ( cd $(DESTDIR)$(sysconfdir)/xdg/systemd/ && \
620                 rm -f session && \
621                 $(LN_S) $(pkgsysconfdir)/session session )
622         ( cd $(DESTDIR)$(systemunitdir)/sockets.target.wants && \
623                 rm -f systemd-initctl.socket systemd-logger.socket && \
624                 $(LN_S) ../systemd-logger.socket systemd-logger.socket && \
625                 $(LN_S) ../systemd-initctl.socket systemd-initctl.socket )
626         ( cd $(DESTDIR)$(sessionunitdir) && \
627                 rm -f shutdown.target sockets.target local-fs.target swap.target && \
628                 $(LN_S) $(systemunitdir)/shutdown.target shutdown.target && \
629                 $(LN_S) $(systemunitdir)/sockets.target sockets.target && \
630                 $(LN_S) $(systemunitdir)/local-fs.target local-fs.target && \
631                 $(LN_S) $(systemunitdir)/swap.target swap.target )
632         ( cd $(DESTDIR)$(systemunitdir) && \
633                 rm -f runlevel0.target runlevel1.target runlevel6.target && \
634                 $(LN_S) poweroff.target runlevel0.target && \
635                 $(LN_S) rescue.target runlevel1.target && \
636                 $(LN_S) reboot.target runlevel6.target )
637         ( cd $(DESTDIR)$(pkgsysconfdir)/system && \
638                 rm -f default.target ctrl-alt-del.target kbrequest.target && \
639                 $(LN_S) $(systemunitdir)/graphical.target default.target && \
640                 $(LN_S) $(systemunitdir)/reboot.target ctrl-alt-del.target && \
641                 $(LN_S) $(systemunitdir)/rescue.target kbrequest.target && \
642                 rm -f runlevel2.target runlevel3.target runlevel4.target runlevel5.target && \
643                 $(LN_S) $(systemunitdir)/multi-user.target runlevel2.target && \
644                 $(LN_S) $(systemunitdir)/multi-user.target runlevel3.target && \
645                 $(LN_S) $(systemunitdir)/multi-user.target runlevel4.target && \
646                 $(LN_S) $(systemunitdir)/graphical.target runlevel5.target )
647         ( cd $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants && \
648                 rm -f getty@tty1.service getty@tty2.service getty@tty3.service getty@tty4.service getty@tty5.service getty@tty6.service && \
649                 $(LN_S) $(systemunitdir)/getty@.service getty@tty1.service && \
650                 $(LN_S) $(systemunitdir)/getty@.service getty@tty2.service && \
651                 $(LN_S) $(systemunitdir)/getty@.service getty@tty3.service && \
652                 $(LN_S) $(systemunitdir)/getty@.service getty@tty4.service && \
653                 $(LN_S) $(systemunitdir)/getty@.service getty@tty5.service && \
654                 $(LN_S) $(systemunitdir)/getty@.service getty@tty6.service )
655         ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
656                 rm -f getty.target remote-fs.target && \
657                 $(LN_S) $(systemunitdir)/getty.target getty.target && \
658                 $(LN_S) $(systemunitdir)/remote-fs.target remote-fs.target )
659         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
660                 rm -f dev-hugepages.automount \
661                         dev-mqueue.automount \
662                         proc-sys-fs-binfmt_misc.automount \
663                         sys-kernel-debug.automount \
664                         sys-kernel-security.automount && \
665                 $(LN_S) ../dev-hugepages.automount dev-hugepages.automount && \
666                 $(LN_S) ../dev-mqueue.automount dev-mqueue.automount && \
667                 $(LN_S) ../proc-sys-fs-binfmt_misc.automount proc-sys-fs-binfmt_misc.automount && \
668                 $(LN_S) ../sys-kernel-debug.automount sys-kernel-debug.automount && \
669                 $(LN_S) ../sys-kernel-security.automount sys-kernel-security.automount )
670         ( cd $(DESTDIR)$(dbussessionservicedir) && \
671                 rm -f org.freedesktop.systemd1.service && \
672                 $(LN_S) ../system-services/org.freedesktop.systemd1.service org.freedesktop.systemd1.service )
673 if TARGET_FEDORA
674         ( cd $(DESTDIR)$(pkgsysconfdir)/system && \
675                 rm -f display-manager.service && \
676                 $(LN_S) $(systemunitdir)/prefdm.service display-manager.service )
677         ( cd $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants && \
678                 rm -f display-manager.service && \
679                 $(LN_S) ../display-manager.service display-manager.service )
680         ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
681                 rm -f rc-local.service && \
682                 $(LN_S) $(systemunitdir)/rc-local.service rc-local.service )
683         ( cd $(DESTDIR)$(systemunitdir) && \
684                 rm -f local.service && \
685                 $(LN_S) rc-local.service local.service )
686         ( cd $(DESTDIR)/etc/init.d && \
687                 $(LN_S) halt reboot > /dev/null 2>&1 || true )
688 endif
689 if TARGET_GENTOO
690         ( cd $(DESTDIR)$(pkgsysconfdir)/system && \
691                 rm -f display-manager.service && \
692                 $(LN_S) $(systemunitdir)/xdm.service display-manager.service )
693         ( cd $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants && \
694                 rm -f display-manager.service && \
695                 $(LN_S) ../display-manager.service display-manager.service )
696 endif
697
698 DISTCHECK_CONFIGURE_FLAGS = \
699         --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
700         --with-dbussessionservicedir=$$dc_install_base/$(dbussessionservicedir) \
701         --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
702         --with-dbusinterfacedir=$$dc_install_base/$(dbusinterfacedir) \
703         --with-udevrulesdir=$$dc_install_base/$(udevrulesdir) \
704         --with-pamlibdir=$$dc_install_base/$(pamlibdir) \
705         --with-rootdir=$$dc_install_base/$(rootdir)