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