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