chiark / gitweb /
dbus: properly name StartupTimestamp property
[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         units/dbus.target
151
152 dist_sessionunit_DATA = \
153         units/session/default.target
154
155 nodist_sessionunit_DATA = \
156         units/session/remote-fs.target \
157         units/session/exit.service
158
159 EXTRA_DIST = \
160         units/sysinit.target.m4 \
161         units/getty@.service.m4 \
162         units/graphical.target.m4 \
163         units/multi-user.target.m4 \
164         units/remote-fs.target.m4 \
165         units/systemd-initctl.service.in \
166         units/systemd-logger.service.in \
167         units/syslog.target.in \
168         units/dbus.target.in \
169         units/session/exit.service.in \
170         systemd.pc.in
171
172 if TARGET_FEDORA
173 dist_systemunit_DATA += \
174         units/fedora/halt.service \
175         units/fedora/killall.service \
176         units/fedora/poweroff.service \
177         units/fedora/prefdm.service \
178         units/fedora/rc-local.service \
179         units/fedora/reboot.service \
180         units/fedora/sysinit.service
181 endif
182
183 if TARGET_SUSE
184 dist_systemunit_DATA += \
185         units/suse/halt.service \
186         units/suse/poweroff.service \
187         units/suse/reboot.service
188 endif
189
190 if TARGET_GENTOO
191 dist_systemunit_DATA += \
192         units/gentoo/halt.service \
193         units/gentoo/killall.service \
194         units/gentoo/poweroff.service \
195         units/gentoo/reboot.service \
196         units/gentoo/xdm.service
197 endif
198
199 if TARGET_ARCH
200 dist_systemunit_DATA += \
201         units/arch/sysinit.service \
202         units/arch/rc-local.service \
203         units/arch/halt.service \
204         units/arch/poweroff.service \
205         units/arch/reboot.service
206 endif
207
208 dist_doc_DATA = \
209         README \
210         LICENSE \
211         DISTRO_PORTING \
212         src/sd-daemon.h \
213         src/sd-daemon.c
214
215 pkgconfigdata_DATA = \
216         systemd.pc
217
218 noinst_LTLIBRARIES = \
219         libsystemd-basic.la \
220         libsystemd-core.la
221
222 # This is needed because automake is buggy in how it generates the
223 # rules for C programs, but not Vala programs.  We therefore can't
224 # list the .h files as dependencies if we want make dist to work.
225
226 libsystemd_basic_la_SOURCES = \
227         src/util.c \
228         src/hashmap.c \
229         src/set.c \
230         src/strv.c \
231         src/conf-parser.c \
232         src/socket-util.c \
233         src/log.c \
234         src/ratelimit.c
235
236 libsystemd_core_la_SOURCES = \
237         src/unit.c \
238         src/job.c \
239         src/manager.c \
240         src/path-lookup.c \
241         src/load-fragment.c \
242         src/service.c \
243         src/automount.c \
244         src/mount.c \
245         src/swap.c \
246         src/device.c \
247         src/target.c \
248         src/snapshot.c \
249         src/socket.c \
250         src/timer.c \
251         src/path.c \
252         src/load-dropin.c \
253         src/execute.c \
254         src/dbus.c \
255         src/dbus-manager.c \
256         src/dbus-unit.c \
257         src/dbus-job.c \
258         src/dbus-service.c \
259         src/dbus-socket.c \
260         src/dbus-timer.c \
261         src/dbus-target.c \
262         src/dbus-mount.c \
263         src/dbus-automount.c \
264         src/dbus-swap.c \
265         src/dbus-snapshot.c \
266         src/dbus-device.c \
267         src/dbus-execute.c \
268         src/dbus-path.c \
269         src/cgroup.c \
270         src/mount-setup.c \
271         src/hostname-setup.c \
272         src/loopback-setup.c \
273         src/kmod-setup.c \
274         src/utmp-wtmp.c \
275         src/specifier.c \
276         src/unit-name.c \
277         src/fdset.c \
278         src/namespace.c \
279         src/tcpwrap.c \
280         src/cgroup-util.c
281
282 libsystemd_core_la_CFLAGS = \
283         $(AM_CFLAGS) \
284         $(DBUS_CFLAGS) \
285         $(UDEV_CFLAGS) \
286         $(CGROUP_CFLAGS)
287
288 libsystemd_core_la_LIBADD = \
289         libsystemd-basic.la \
290         $(DBUS_LIBS) \
291         $(UDEV_LIBS) \
292         $(CGROUP_LIBS) \
293         $(LIBWRAP_LIBS) \
294         $(PAM_LIBS)
295
296 EXTRA_DIST += \
297         ${libsystemd_basic_la_SOURCES:.c=.h} \
298         ${libsystemd_core_la_SOURCES:.c=.h} \
299         src/macro.h \
300         src/ioprio.h \
301         src/missing.h \
302         src/list.h \
303         src/securebits.h \
304         src/linux/auto_dev-ioctl.h \
305         src/initreq.h \
306         src/sd-daemon.h \
307         src/special.h
308
309
310 MANPAGES = \
311         man/systemd.1 \
312         man/systemctl.1 \
313         man/systemadm.1 \
314         man/systemd-install.1 \
315         man/systemd-notify.1 \
316         man/sd_notify.3 \
317         man/sd_booted.3 \
318         man/sd_listen_fds.3 \
319         man/sd_is_fifo.3 \
320         man/systemd.unit.5 \
321         man/systemd.service.5 \
322         man/systemd.socket.5 \
323         man/systemd.mount.5 \
324         man/systemd.automount.5 \
325         man/systemd.swap.5 \
326         man/systemd.timer.5 \
327         man/systemd.path.5 \
328         man/systemd.target.5 \
329         man/systemd.device.5 \
330         man/systemd.snapshot.5 \
331         man/systemd.exec.5 \
332         man/daemon.7 \
333         man/sd-daemon.7 \
334         man/runlevel.8 \
335         man/telinit.8 \
336         man/halt.8 \
337         man/shutdown.8 \
338         man/pam_systemd.8
339
340 MANPAGES_ALIAS = \
341         man/reboot.8 \
342         man/poweroff.8 \
343         man/sd_is_socket.3 \
344         man/sd_is_socket_unix.3 \
345         man/sd_is_socket_inet.3 \
346         man/sd_notifyf.3 \
347         man/init.1
348
349 man/reboot.8: man/halt.8
350 man/poweroff.8: man/halt.8
351 man/sd_is_socket.3: man/sd_is_fifo.3
352 man/sd_is_socket_unix.3: man/sd_is_fifo.3
353 man/sd_is_socket_inet.3: man/sd_is_fifo.3
354 man/sd_notifyf.3: man/sd_notify.3
355 man/init.1: man/systemd.1
356
357 dist_man_MANS = \
358         $(MANPAGES) \
359         $(MANPAGES_ALIAS)
360
361 nodist_man_MANS = \
362         man/systemd.special.7
363
364 XML_FILES = \
365         ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
366
367 XML_IN_FILES = \
368         ${patsubst %.1,%.xml.in,${patsubst %.3,%.xml.in,${patsubst %.5,%.xml.in,${patsubst %.7,%.xml.in,${patsubst %.8,%.xml.in,$(nodist_man_MANS)}}}}}
369
370 dist_noinst_DATA = \
371         ${XML_FILES:.xml=.html}
372
373 nodist_noinst_DATA = \
374         ${XML_IN_FILES:.xml.in=.html}
375
376 EXTRA_DIST += \
377         $(XML_FILES) \
378         $(XML_IN_FILES) \
379         ${nodist_man_MANS:=.in} \
380         ${XML_IN_FILES:.xml.in=.html.in}
381
382 systemd_SOURCES = \
383         src/main.c
384
385 systemd_CFLAGS = \
386         $(AM_CFLAGS) \
387         $(DBUS_CFLAGS) \
388         $(UDEV_CFLAGS) \
389         $(CGROUP_CFLAGS)
390
391 systemd_LDADD = \
392         libsystemd-core.la
393
394 test_engine_SOURCES = \
395         src/test-engine.c
396
397 test_engine_CFLAGS = $(systemd_CFLAGS)
398 test_engine_LDADD = $(systemd_LDADD)
399
400 test_job_type_SOURCES = \
401         src/test-job-type.c
402
403 test_job_type_CFLAGS = $(systemd_CFLAGS)
404 test_job_type_LDADD = $(systemd_LDADD)
405
406 test_ns_SOURCES = \
407         src/test-ns.c
408
409 test_ns_CFLAGS = $(systemd_CFLAGS)
410 test_ns_LDADD = $(systemd_LDADD)
411
412 test_loopback_SOURCES = \
413         src/test-loopback.c \
414         src/loopback-setup.c
415
416 test_loopback_LDADD = \
417         libsystemd-basic.la
418
419 test_daemon_SOURCES = \
420         src/test-daemon.c \
421         src/sd-daemon.c
422
423 test_daemon_LDADD = \
424         libsystemd-basic.la
425
426 test_cgroup_SOURCES = \
427         src/test-cgroup.c \
428         src/cgroup-util.c
429
430 test_cgroup_CFLAGS = \
431         $(AM_CFLAGS) \
432         $(CGROUP_CFLAGS)
433
434 test_cgroup_LDADD = \
435         libsystemd-basic.la \
436         $(CGROUP_LIBS)
437
438 systemd_logger_SOURCES = \
439         src/logger.c \
440         src/sd-daemon.c \
441         src/tcpwrap.c
442
443 systemd_logger_LDADD = \
444         libsystemd-basic.la \
445         $(LIBWRAP_LIBS)
446
447 systemd_initctl_SOURCES = \
448         src/initctl.c \
449         src/sd-daemon.c
450
451 systemd_initctl_CFLAGS = \
452         $(AM_CFLAGS) \
453         $(DBUS_CFLAGS)
454
455 systemd_initctl_LDADD = \
456         libsystemd-basic.la \
457         $(DBUS_LIBS)
458
459 systemd_cgroups_agent_SOURCES = \
460         src/cgroups-agent.c
461
462 systemd_cgroups_agent_CFLAGS = \
463         $(AM_CFLAGS) \
464         $(DBUS_CFLAGS)
465
466 systemd_cgroups_agent_LDADD = \
467         libsystemd-basic.la \
468         $(DBUS_LIBS)
469
470 systemctl_SOURCES = \
471         src/systemctl.c \
472         src/utmp-wtmp.c
473
474 systemctl_CFLAGS = \
475         $(AM_CFLAGS) \
476         $(DBUS_CFLAGS)
477
478 systemctl_LDADD = \
479         libsystemd-basic.la \
480         $(DBUS_LIBS)
481
482 systemd_notify_SOURCES = \
483         src/notify.c \
484         src/sd-daemon.c
485
486 systemd_notify_LDADD = \
487         libsystemd-basic.la
488
489 systemd_install_SOURCES = \
490         src/install.c \
491         src/path-lookup.c
492
493 systemd_install_LDADD = \
494         libsystemd-basic.la
495
496 # We don't really link here against D-Bus, however we indirectly include D-Bus header files
497 systemd_install_CFLAGS = \
498         $(AM_CFLAGS) \
499         $(DBUS_CFLAGS)
500
501 systemadm_SOURCES = \
502         src/systemadm.vala \
503         src/systemd-interfaces.vala
504
505 systemadm_CFLAGS = \
506         $(AM_CFLAGS) \
507         $(DBUSGLIB_CFLAGS) \
508         $(GTK_CFLAGS) \
509         -Wno-unused-variable \
510         -Wno-unused-function \
511         -Wno-shadow \
512         -Wno-format-nonliteral
513
514 systemadm_VALAFLAGS = \
515         --pkg=dbus-glib-1 \
516         --pkg=posix \
517         --pkg=gtk+-2.0 \
518         -g
519
520 systemadm_LDADD = \
521         $(DBUSGLIB_LIBS) \
522         $(GTK_LIBS)
523
524 pam_systemd_la_SOURCES = \
525         src/pam-module.c \
526         src/cgroup-util.c \
527         src/sd-daemon.c
528
529 pam_systemd_la_CFLAGS = \
530         $(AM_CFLAGS) \
531         $(CGROUP_CFLAGS) \
532         -fvisibility=hidden
533
534 pam_systemd_la_LDFLAGS = \
535         -module \
536         -export-dynamic \
537         -avoid-version \
538         -shared \
539         -export-symbols-regex '^pam_sm_.*'
540
541 pam_systemd_la_LIBADD = \
542         libsystemd-basic.la \
543         $(PAM_LIBS) \
544         $(CGROUP_LIBS)
545
546 SED_PROCESS = \
547         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
548         $(SED)  -e 's,@rootlibexecdir\@,$(rootlibexecdir),g' \
549                 -e 's,@SPECIAL_SYSLOG_SERVICE\@,$(SPECIAL_SYSLOG_SERVICE),g' \
550                 -e 's,@SPECIAL_DBUS_SERVICE\@,$(SPECIAL_DBUS_SERVICE),g' \
551                 -e 's,@SYSTEMCTL\@,$(rootbindir)/systemctl,g' \
552                 -e 's,@pkgsysconfdir\@,$(pkgsysconfdir),g' \
553                 -e 's,@pkgdatadir\@,$(pkgdatadir),g' \
554                 -e 's,@systemunitdir\@,$(systemunitdir),g' \
555                 -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
556                 -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
557                 -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' \
558                 -e 's,@prefix\@,$(prefix),g' \
559                 < $< > $@
560
561 units/%: units/%.in Makefile
562         $(SED_PROCESS)
563
564 man/%: man/%.in Makefile
565         $(SED_PROCESS)
566
567 %.pc: %.pc.in Makefile
568         $(SED_PROCESS)
569
570 M4_PROCESS_SYSTEM = \
571         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
572         $(M4) -P $(M4_DISTRO_FLAG) -DFOR_SYSTEM=1 < $< > $@
573
574 M4_PROCESS_SESSION = \
575         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
576         $(M4) -P $(M4_DISTRO_FLAG) -DFOR_SESSION=1 < $< > $@
577
578 units/%: units/%.m4 Makefile
579         $(M4_PROCESS_SYSTEM)
580
581 units/session/%: units/%.m4 Makefile
582         $(M4_PROCESS_SESSION)
583
584 CLEANFILES = \
585         $(nodist_systemunit_DATA) \
586         $(nodist_sessionunit_DATA) \
587         $(nodist_man_MANS) \
588         ${XML_IN_FILES:.xml.in=.html} \
589         $(pkgconfigdata_DATA)
590
591 if HAVE_VALAC
592 CLEANFILES += \
593         ${systemadm_SOURCES:.vala=.c}
594 endif
595
596 if HAVE_XSLTPROC
597 XSLTPROC_FLAGS = \
598         --nonet \
599         --param funcsynopsis.style "'ansi'"
600
601 XSLTPROC_PROCESS_MAN = \
602         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
603         $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
604
605 XSLTPROC_PROCESS_MAN_IN = \
606         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
607         $(XSLTPROC) -o ${@:.in=} $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< && \
608         mv ${@:.in=} $@
609
610 XSLTPROC_PROCESS_HTML = \
611         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
612         $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $<
613
614 XSLTPROC_PROCESS_HTML_IN = \
615         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
616         $(XSLTPROC) -o ${@:.in=} $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $< && \
617         mv ${@:.in=} $@
618
619 man/%.1: man/%.xml
620         $(XSLTPROC_PROCESS_MAN)
621
622 man/%.1.in: man/%.xml.in
623         $(XSLTPROC_PROCESS_MAN)
624
625 man/%.3: man/%.xml
626         $(XSLTPROC_PROCESS_MAN)
627
628 man/%.3.in: man/%.xml.in
629         $(XSLTPROC_PROCESS_MAN)
630
631 man/%.5: man/%.xml
632         $(XSLTPROC_PROCESS_MAN)
633
634 man/%.5.in: man/%.xml.in
635         $(XSLTPROC_PROCESS_MAN)
636
637 man/%.7: man/%.xml
638         $(XSLTPROC_PROCESS_MAN)
639
640 man/%.7.in: man/%.xml.in
641         $(XSLTPROC_PROCESS_MAN_IN)
642
643 man/%.8: man/%.xml
644         $(XSLTPROC_PROCESS_MAN)
645
646 man/%.8.in: man/%.xml.in
647         $(XSLTPROC_PROCESS_MAN_IN)
648
649 man/%.html: man/%.xml
650         $(XSLTPROC_PROCESS_HTML)
651
652 man/%.html.in: man/%.xml.in
653         $(XSLTPROC_PROCESS_HTML_IN)
654
655 CLEANFILES += \
656         $(dist_man_MANS) \
657         ${nodist_man_MANS:=.in} \
658         ${XML_FILES:.xml=.html} \
659         ${XML_IN_FILES:.xml.in=.html.in}
660 endif
661
662 org.freedesktop.systemd1.%.xml: systemd
663         $(AM_V_GEN)./systemd --introspect=${@:.xml=} > $@
664
665 CLEANFILES += \
666         $(dbusinterface_DATA)
667
668 install-data-hook:
669         $(MKDIR_P) -m 0755 \
670                 $(DESTDIR)$(systemunitdir) \
671                 $(DESTDIR)$(sessionunitdir) \
672                 $(DESTDIR)$(systemunitdir)/sockets.target.wants \
673                 $(DESTDIR)$(systemunitdir)/sysinit.target.wants \
674                 $(DESTDIR)$(pkgsysconfdir)/system \
675                 $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants \
676                 $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants \
677                 $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants \
678                 $(DESTDIR)$(pkgsysconfdir)/session \
679                 $(DESTDIR)$(sysconfdir)/xdg/systemd
680         $(MKDIR_P) -m 0755 $(DESTDIR)/cgroup || \
681                 echo "Don't forget to create /cgroup! Couldn't create it for you, continuing anyway."
682         ( cd $(DESTDIR)$(sysconfdir)/xdg/systemd/ && \
683                 rm -f session && \
684                 $(LN_S) $(pkgsysconfdir)/session session )
685         ( cd $(DESTDIR)$(systemunitdir)/sockets.target.wants && \
686                 rm -f systemd-initctl.socket systemd-logger.socket && \
687                 $(LN_S) ../systemd-logger.socket systemd-logger.socket && \
688                 $(LN_S) ../systemd-initctl.socket systemd-initctl.socket )
689         ( cd $(DESTDIR)$(sessionunitdir) && \
690                 rm -f shutdown.target sockets.target local-fs.target swap.target && \
691                 $(LN_S) $(systemunitdir)/shutdown.target shutdown.target && \
692                 $(LN_S) $(systemunitdir)/sockets.target sockets.target && \
693                 $(LN_S) $(systemunitdir)/local-fs.target local-fs.target && \
694                 $(LN_S) $(systemunitdir)/swap.target swap.target )
695         ( cd $(DESTDIR)$(systemunitdir) && \
696                 rm -f runlevel0.target runlevel1.target runlevel6.target && \
697                 $(LN_S) poweroff.target runlevel0.target && \
698                 $(LN_S) rescue.target runlevel1.target && \
699                 $(LN_S) reboot.target runlevel6.target )
700         ( cd $(DESTDIR)$(pkgsysconfdir)/system && \
701                 rm -f default.target ctrl-alt-del.target kbrequest.target && \
702                 $(LN_S) $(systemunitdir)/graphical.target default.target && \
703                 $(LN_S) $(systemunitdir)/reboot.target ctrl-alt-del.target && \
704                 $(LN_S) $(systemunitdir)/rescue.target kbrequest.target && \
705                 rm -f runlevel2.target runlevel3.target runlevel4.target runlevel5.target && \
706                 $(LN_S) $(systemunitdir)/multi-user.target runlevel2.target && \
707                 $(LN_S) $(systemunitdir)/multi-user.target runlevel3.target && \
708                 $(LN_S) $(systemunitdir)/multi-user.target runlevel4.target && \
709                 $(LN_S) $(systemunitdir)/graphical.target runlevel5.target )
710         ( cd $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants && \
711                 rm -f getty@tty1.service getty@tty2.service getty@tty3.service getty@tty4.service getty@tty5.service getty@tty6.service && \
712                 $(LN_S) $(systemunitdir)/getty@.service getty@tty1.service && \
713                 $(LN_S) $(systemunitdir)/getty@.service getty@tty2.service && \
714                 $(LN_S) $(systemunitdir)/getty@.service getty@tty3.service && \
715                 $(LN_S) $(systemunitdir)/getty@.service getty@tty4.service && \
716                 $(LN_S) $(systemunitdir)/getty@.service getty@tty5.service && \
717                 $(LN_S) $(systemunitdir)/getty@.service getty@tty6.service )
718         ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
719                 rm -f getty.target remote-fs.target && \
720                 $(LN_S) $(systemunitdir)/getty.target getty.target && \
721                 $(LN_S) $(systemunitdir)/remote-fs.target remote-fs.target )
722         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
723                 rm -f dev-hugepages.automount \
724                         dev-mqueue.automount \
725                         proc-sys-fs-binfmt_misc.automount \
726                         sys-kernel-debug.automount \
727                         sys-kernel-security.automount && \
728                 $(LN_S) ../dev-hugepages.automount dev-hugepages.automount && \
729                 $(LN_S) ../dev-mqueue.automount dev-mqueue.automount && \
730                 $(LN_S) ../proc-sys-fs-binfmt_misc.automount proc-sys-fs-binfmt_misc.automount && \
731                 $(LN_S) ../sys-kernel-debug.automount sys-kernel-debug.automount && \
732                 $(LN_S) ../sys-kernel-security.automount sys-kernel-security.automount )
733         ( cd $(DESTDIR)$(dbussessionservicedir) && \
734                 rm -f org.freedesktop.systemd1.service && \
735                 $(LN_S) ../system-services/org.freedesktop.systemd1.service org.freedesktop.systemd1.service )
736 if TARGET_FEDORA
737         $(MKDIR_P) -m 0755 \
738                 $(DESTDIR)$(SYSTEM_SYSVINIT_PATH)
739         ( cd $(DESTDIR)$(pkgsysconfdir)/system && \
740                 rm -f display-manager.service && \
741                 $(LN_S) $(systemunitdir)/prefdm.service display-manager.service )
742         ( cd $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants && \
743                 rm -f prefdm.service && \
744                 $(LN_S) ../prefdm.service prefdm.service )
745         ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
746                 rm -f rc-local.service && \
747                 $(LN_S) $(systemunitdir)/rc-local.service rc-local.service )
748         ( cd $(DESTDIR)$(systemunitdir) && \
749                 rm -f local.service && \
750                 $(LN_S) rc-local.service local.service )
751         ( cd $(DESTDIR)$(SYSTEM_SYSVINIT_PATH) && \
752                 $(LN_S) halt reboot > /dev/null 2>&1 || true )
753 endif
754 if TARGET_GENTOO
755         ( cd $(DESTDIR)$(pkgsysconfdir)/system && \
756                 rm -f display-manager.service && \
757                 $(LN_S) $(systemunitdir)/xdm.service display-manager.service )
758         ( cd $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants && \
759                 rm -f prefdm.service && \
760                 $(LN_S) ../prefdm.service prefdm.service )
761 endif
762
763 DISTCHECK_CONFIGURE_FLAGS = \
764         --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
765         --with-dbussessionservicedir=$$dc_install_base/$(dbussessionservicedir) \
766         --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
767         --with-dbusinterfacedir=$$dc_install_base/$(dbusinterfacedir) \
768         --with-udevrulesdir=$$dc_install_base/$(udevrulesdir) \
769         --with-pamlibdir=$$dc_install_base/$(pamlibdir) \
770         --with-rootdir=$$dc_install_base/$(rootdir)