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