chiark / gitweb /
build-sys: fix make distcheck
[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
312 nodist_man_MANS = \
313         man/systemd.special.7
314
315 dist_noinst_DATA = \
316         man/systemd.unit.html \
317         man/systemd.service.html
318
319 nodist_noinst_DATA = \
320         man/systemd.special.html
321
322 EXTRA_DIST += \
323         man/systemd.unit.xml \
324         man/systemd.service.xml \
325         man/systemd.special.xml.in \
326         man/systemd.special.7.in \
327         man/systemd.special.html.in
328
329 systemd_SOURCES = \
330         src/main.c
331
332 systemd_CFLAGS = \
333         $(AM_CFLAGS) \
334         $(DBUS_CFLAGS) \
335         $(UDEV_CFLAGS) \
336         $(CGROUP_CFLAGS)
337
338 systemd_LDADD = \
339         libsystemd-core.la
340
341 test_engine_SOURCES = \
342         src/test-engine.c
343
344 test_engine_CFLAGS = $(systemd_CFLAGS)
345 test_engine_LDADD = $(systemd_LDADD)
346
347 test_job_type_SOURCES = \
348         src/test-job-type.c
349
350 test_job_type_CFLAGS = $(systemd_CFLAGS)
351 test_job_type_LDADD = $(systemd_LDADD)
352
353 test_ns_SOURCES = \
354         src/test-ns.c
355
356 test_ns_CFLAGS = $(systemd_CFLAGS)
357 test_ns_LDADD = $(systemd_LDADD)
358
359 test_loopback_SOURCES = \
360         src/test-loopback.c \
361         src/loopback-setup.c
362
363 test_loopback_LDADD = \
364         libsystemd-basic.la
365
366 test_daemon_SOURCES = \
367         src/test-daemon.c \
368         src/sd-daemon.c
369
370 test_daemon_LDADD = \
371         libsystemd-basic.la
372
373 test_cgroup_SOURCES = \
374         src/test-cgroup.c \
375         src/cgroup-util.c
376
377 test_cgroup_CFLAGS = \
378         $(AM_CFLAGS) \
379         $(CGROUP_CFLAGS)
380
381 test_cgroup_LDADD = \
382         libsystemd-basic.la \
383         $(CGROUP_LIBS)
384
385 systemd_logger_SOURCES = \
386         src/logger.c \
387         src/sd-daemon.c \
388         src/tcpwrap.c
389
390 systemd_logger_LDADD = \
391         libsystemd-basic.la \
392         $(LIBWRAP_LIBS)
393
394 systemd_initctl_SOURCES = \
395         src/initctl.c \
396         src/sd-daemon.c
397
398 systemd_initctl_CFLAGS = \
399         $(AM_CFLAGS) \
400         $(DBUS_CFLAGS)
401
402 systemd_initctl_LDADD = \
403         libsystemd-basic.la \
404         $(DBUS_LIBS)
405
406 systemd_cgroups_agent_SOURCES = \
407         src/cgroups-agent.c
408
409 systemd_cgroups_agent_CFLAGS = \
410         $(AM_CFLAGS) \
411         $(DBUS_CFLAGS)
412
413 systemd_cgroups_agent_LDADD = \
414         libsystemd-basic.la \
415         $(DBUS_LIBS)
416
417 systemctl_SOURCES = \
418         src/systemctl.c \
419         src/utmp-wtmp.c
420
421 systemctl_CFLAGS = \
422         $(AM_CFLAGS) \
423         $(DBUS_CFLAGS)
424
425 systemctl_LDADD = \
426         libsystemd-basic.la \
427         $(DBUS_LIBS)
428
429 systemd_notify_SOURCES = \
430         src/notify.c \
431         src/sd-daemon.c
432
433 systemd_notify_LDADD = \
434         libsystemd-basic.la
435
436 systemd_install_SOURCES = \
437         src/install.c \
438         src/path-lookup.c
439
440 systemd_install_LDADD = \
441         libsystemd-basic.la
442
443 # We don't really link here against D-Bus, however we indirectly include D-Bus header files
444 systemd_install_CFLAGS = \
445         $(AM_CFLAGS) \
446         $(DBUS_CFLAGS)
447
448 systemadm_SOURCES = \
449         src/systemadm.vala \
450         src/systemd-interfaces.vala
451
452 systemadm_CFLAGS = \
453         $(AM_CFLAGS) \
454         $(DBUSGLIB_CFLAGS) \
455         $(GTK_CFLAGS) \
456         -Wno-unused-variable \
457         -Wno-unused-function \
458         -Wno-shadow \
459         -Wno-format-nonliteral
460
461 systemadm_VALAFLAGS = \
462         --pkg=dbus-glib-1 \
463         --pkg=posix \
464         --pkg=gtk+-2.0 \
465         -g
466
467 systemadm_LDADD = \
468         $(DBUSGLIB_LIBS) \
469         $(GTK_LIBS)
470
471 pam_systemd_la_SOURCES = \
472         src/pam-module.c \
473         src/cgroup-util.c \
474         src/sd-daemon.c
475
476 pam_systemd_la_CFLAGS = \
477         $(AM_CFLAGS) \
478         $(CGROUP_CFLAGS) \
479         -fvisibility=hidden
480
481 pam_systemd_la_LDFLAGS = \
482         -module \
483         -export-dynamic \
484         -avoid-version \
485         -shared \
486         -export-symbols-regex '^pam_sm_.*'
487
488 pam_systemd_la_LIBADD = \
489         libsystemd-basic.la \
490         $(PAM_LIBS) \
491         $(CGROUP_LIBS)
492
493 SED_PROCESS = \
494         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
495         $(SED)  -e 's,@rootlibexecdir\@,$(rootlibexecdir),g' \
496                 -e 's,@SPECIAL_SYSLOG_SERVICE\@,$(SPECIAL_SYSLOG_SERVICE),g' \
497                 -e 's,@SPECIAL_DBUS_SERVICE\@,$(SPECIAL_DBUS_SERVICE),g' \
498                 -e 's,@SYSTEMCTL\@,$(rootbindir)/systemctl,g' \
499                 -e 's,@pkgsysconfdir\@,$(pkgsysconfdir),g' \
500                 -e 's,@pkgdatadir\@,$(pkgdatadir),g' \
501                 -e 's,@systemunitdir\@,$(systemunitdir),g' \
502                 -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
503                 -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
504                 -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' \
505                 -e 's,@prefix\@,$(prefix),g' \
506                 < $< > $@
507
508 units/%: units/%.in Makefile
509         $(SED_PROCESS)
510
511 man/%: man/%.in Makefile
512         $(SED_PROCESS)
513
514 %.pc: %.pc.in Makefile
515         $(SED_PROCESS)
516
517 M4_PROCESS_SYSTEM = \
518         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
519         $(M4) -P $(M4_DISTRO_FLAG) -DFOR_SYSTEM=1 < $< > $@
520
521 M4_PROCESS_SESSION = \
522         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
523         $(M4) -P $(M4_DISTRO_FLAG) -DFOR_SESSION=1 < $< > $@
524
525 units/%: units/%.m4 Makefile
526         $(M4_PROCESS_SYSTEM)
527
528 units/session/%: units/%.m4 Makefile
529         $(M4_PROCESS_SESSION)
530
531 CLEANFILES = \
532         units/systemd-initctl.service \
533         units/systemd-logger.service \
534         units/syslog.target \
535         units/sysinit.target \
536         units/getty@.service \
537         units/graphical.target \
538         units/multi-user.target \
539         units/remote-fs.target \
540         units/session/remote-fs.target \
541         units/session/exit.service \
542         man/systemd.special.7 \
543         man/systemd.special.html \
544         systemd.pc
545
546 if HAVE_VALAC
547 CLEANFILES += \
548         src/systemd-interfaces.c \
549         src/systemadm.c
550 endif
551
552 if HAVE_XSLTPROC
553 XSLTPROC_PROCESS_MAN = \
554         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
555         $(XSLTPROC) -o $@ --nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
556
557 XSLTPROC_PROCESS_MAN_IN = \
558         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
559         $(XSLTPROC) -o ${@:.in=} --nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< && \
560         mv ${@:.in=} $@
561
562 XSLTPROC_PROCESS_HTML = \
563         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
564         $(XSLTPROC) -o $@ --nonet http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $<
565
566 XSLTPROC_PROCESS_HTML_IN = \
567         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
568         $(XSLTPROC) -o ${@:.in=} --nonet http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $< && \
569         mv ${@:.in=} $@
570
571 man/%.5: man/%.xml
572         $(XSLTPROC_PROCESS_MAN)
573
574 man/%.5.in: man/%.xml.in
575         $(XSLTPROC_PROCESS_MAN)
576
577 man/%.7: man/%.xml
578         $(XSLTPROC_PROCESS_MAN)
579
580 man/%.7.in: man/%.xml.in
581         $(XSLTPROC_PROCESS_MAN_IN)
582
583 man/%.html: man/%.xml
584         $(XSLTPROC_PROCESS_HTML)
585
586 man/%.html.in: man/%.xml.in
587         $(XSLTPROC_PROCESS_HTML_IN)
588
589 CLEANFILES += \
590         $(dist_man_MANS) \
591         man/systemd.special.7.in \
592         man/systemd.unit.html \
593         man/systemd.service.html \
594         man/systemd.special.html.in
595 endif
596
597 org.freedesktop.systemd1.%.xml: systemd
598         $(AM_V_GEN)./systemd --introspect=${@:.xml=} > $@
599
600 CLEANFILES += $(dbusinterface_DATA)
601
602 install-data-hook:
603         $(MKDIR_P) -m 0755 \
604                 $(DESTDIR)$(systemunitdir) \
605                 $(DESTDIR)$(sessionunitdir) \
606                 $(DESTDIR)$(systemunitdir)/sockets.target.wants \
607                 $(DESTDIR)$(systemunitdir)/sysinit.target.wants \
608                 $(DESTDIR)$(pkgsysconfdir)/system \
609                 $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants \
610                 $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants \
611                 $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants \
612                 $(DESTDIR)$(pkgsysconfdir)/session \
613                 $(DESTDIR)$(sysconfdir)/xdg/systemd
614         $(MKDIR_P) -m 0755 $(DESTDIR)/cgroup/systemd || \
615                 echo "Don't forget to create /cgroup/systemd! Couldn't create it for you, continuing anyway."
616         ( cd $(DESTDIR)$(sysconfdir)/xdg/systemd/ && \
617                 rm -f session && \
618                 $(LN_S) $(pkgsysconfdir)/session session )
619         ( cd $(DESTDIR)$(systemunitdir)/sockets.target.wants && \
620                 rm -f systemd-initctl.socket systemd-logger.socket && \
621                 $(LN_S) ../systemd-logger.socket systemd-logger.socket && \
622                 $(LN_S) ../systemd-initctl.socket systemd-initctl.socket )
623         ( cd $(DESTDIR)$(sessionunitdir) && \
624                 rm -f shutdown.target sockets.target local-fs.target swap.target && \
625                 $(LN_S) $(systemunitdir)/shutdown.target shutdown.target && \
626                 $(LN_S) $(systemunitdir)/sockets.target sockets.target && \
627                 $(LN_S) $(systemunitdir)/local-fs.target local-fs.target && \
628                 $(LN_S) $(systemunitdir)/swap.target swap.target )
629         ( cd $(DESTDIR)$(systemunitdir) && \
630                 rm -f runlevel0.target runlevel1.target runlevel6.target && \
631                 $(LN_S) poweroff.target runlevel0.target && \
632                 $(LN_S) rescue.target runlevel1.target && \
633                 $(LN_S) reboot.target runlevel6.target )
634         ( cd $(DESTDIR)$(pkgsysconfdir)/system && \
635                 rm -f default.target ctrl-alt-del.target kbrequest.target && \
636                 $(LN_S) $(systemunitdir)/graphical.target default.target && \
637                 $(LN_S) $(systemunitdir)/reboot.target ctrl-alt-del.target && \
638                 $(LN_S) $(systemunitdir)/rescue.target kbrequest.target && \
639                 rm -f runlevel2.target runlevel3.target runlevel4.target runlevel5.target && \
640                 $(LN_S) $(systemunitdir)/multi-user.target runlevel2.target && \
641                 $(LN_S) $(systemunitdir)/multi-user.target runlevel3.target && \
642                 $(LN_S) $(systemunitdir)/multi-user.target runlevel4.target && \
643                 $(LN_S) $(systemunitdir)/graphical.target runlevel5.target )
644         ( cd $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants && \
645                 rm -f getty@tty1.service getty@tty2.service getty@tty3.service getty@tty4.service getty@tty5.service getty@tty6.service && \
646                 $(LN_S) $(systemunitdir)/getty@.service getty@tty1.service && \
647                 $(LN_S) $(systemunitdir)/getty@.service getty@tty2.service && \
648                 $(LN_S) $(systemunitdir)/getty@.service getty@tty3.service && \
649                 $(LN_S) $(systemunitdir)/getty@.service getty@tty4.service && \
650                 $(LN_S) $(systemunitdir)/getty@.service getty@tty5.service && \
651                 $(LN_S) $(systemunitdir)/getty@.service getty@tty6.service )
652         ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
653                 rm -f getty.target remote-fs.target && \
654                 $(LN_S) $(systemunitdir)/getty.target getty.target && \
655                 $(LN_S) $(systemunitdir)/remote-fs.target remote-fs.target )
656         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
657                 rm -f dev-hugepages.automount \
658                         dev-mqueue.automount \
659                         proc-sys-fs-binfmt_misc.automount \
660                         sys-kernel-debug.automount \
661                         sys-kernel-security.automount && \
662                 $(LN_S) ../dev-hugepages.automount dev-hugepages.automount && \
663                 $(LN_S) ../dev-mqueue.automount dev-mqueue.automount && \
664                 $(LN_S) ../proc-sys-fs-binfmt_misc.automount proc-sys-fs-binfmt_misc.automount && \
665                 $(LN_S) ../sys-kernel-debug.automount sys-kernel-debug.automount && \
666                 $(LN_S) ../sys-kernel-security.automount sys-kernel-security.automount )
667         ( cd $(DESTDIR)$(dbussessionservicedir) && \
668                 rm -f org.freedesktop.systemd1.service && \
669                 $(LN_S) ../system-services/org.freedesktop.systemd1.service org.freedesktop.systemd1.service )
670 if TARGET_FEDORA
671         ( cd $(DESTDIR)$(pkgsysconfdir)/system && \
672                 rm -f display-manager.service && \
673                 $(LN_S) $(systemunitdir)/prefdm.service display-manager.service )
674         ( cd $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants && \
675                 rm -f display-manager.service && \
676                 $(LN_S) ../display-manager.service display-manager.service )
677         ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
678                 rm -f rc-local.service && \
679                 $(LN_S) $(systemunitdir)/rc-local.service rc-local.service )
680         ( cd $(DESTDIR)$(systemunitdir) && \
681                 rm -f local.service && \
682                 $(LN_S) rc-local.service local.service )
683         ( cd $(DESTDIR)/etc/init.d && \
684                 $(LN_S) halt reboot > /dev/null 2>&1 || true )
685 endif
686 if TARGET_GENTOO
687         ( cd $(DESTDIR)$(pkgsysconfdir)/system && \
688                 rm -f display-manager.service && \
689                 $(LN_S) $(systemunitdir)/xdm.service display-manager.service )
690         ( cd $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants && \
691                 rm -f display-manager.service && \
692                 $(LN_S) ../display-manager.service display-manager.service )
693 endif
694
695 DISTCHECK_CONFIGURE_FLAGS = \
696         --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
697         --with-dbussessionservicedir=$$dc_install_base/$(dbussessionservicedir) \
698         --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
699         --with-dbusinterfacedir=$$dc_install_base/$(dbusinterfacedir) \
700         --with-udevrulesdir=$$dc_install_base/$(udevrulesdir) \
701         --with-pamlibdir=$$dc_install_base/$(pamlibdir) \
702         --with-rootdir=$$dc_install_base/$(rootdir)