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