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