chiark / gitweb /
systemctl: move status further down
[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/umount.target \
130         units/sigpwr.target \
131         units/sockets.target \
132         units/swap.target \
133         units/dbus.target \
134         units/systemd-initctl.socket \
135         units/systemd-logger.socket \
136         units/dev-hugepages.automount \
137         units/dev-hugepages.mount \
138         units/dev-mqueue.automount \
139         units/dev-mqueue.mount \
140         units/proc-sys-fs-binfmt_misc.automount \
141         units/proc-sys-fs-binfmt_misc.mount \
142         units/sys-kernel-debug.automount \
143         units/sys-kernel-debug.mount \
144         units/sys-kernel-security.automount \
145         units/sys-kernel-security.mount \
146         units/var-lock.mount \
147         units/var-run.mount
148
149 nodist_systemunit_DATA = \
150         units/sysinit.target \
151         units/getty@.service \
152         units/graphical.target \
153         units/remote-fs.target \
154         units/multi-user.target \
155         units/systemd-initctl.service \
156         units/systemd-logger.service \
157         units/syslog.target
158
159 dist_sessionunit_DATA = \
160         units/session/default.target
161
162 nodist_sessionunit_DATA = \
163         units/session/remote-fs.target \
164         units/session/exit.service
165
166 EXTRA_DIST = \
167         units/sysinit.target.m4 \
168         units/getty@.service.m4 \
169         units/graphical.target.m4 \
170         units/multi-user.target.m4 \
171         units/remote-fs.target.m4 \
172         units/systemd-initctl.service.in \
173         units/systemd-logger.service.in \
174         units/syslog.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         src/cgroup-util.c
488
489 systemctl_CFLAGS = \
490         $(AM_CFLAGS) \
491         $(DBUS_CFLAGS) \
492         $(CGROUP_CLAGS)
493
494 systemctl_LDADD = \
495         libsystemd-basic.la \
496         $(DBUS_LIBS) \
497         $(CGROUP_LIBS)
498
499 systemd_notify_SOURCES = \
500         src/notify.c \
501         src/sd-daemon.c
502
503 systemd_notify_LDADD = \
504         libsystemd-basic.la
505
506 systemd_install_SOURCES = \
507         src/install.c \
508         src/path-lookup.c \
509         src/dbus-common.c \
510         src/sd-daemon.c
511
512 systemd_install_LDADD = \
513         libsystemd-basic.la \
514         $(DBUS_LIBS)
515
516 systemd_install_CFLAGS = \
517         $(AM_CFLAGS) \
518         $(DBUS_CFLAGS)
519
520 systemd_cgls_SOURCES = \
521         src/systemd-cgls.c \
522         src/cgroup-show.c \
523         src/cgroup-util.c
524
525 systemd_cgls_CFLAGS = \
526         $(AM_CFLAGS) \
527         $(CGROUP_CLAGS)
528
529 systemd_cgls_LDADD = \
530         libsystemd-basic.la \
531         $(CGROUP_LIBS)
532
533 systemadm_SOURCES = \
534         src/systemadm.vala \
535         src/systemd-interfaces.vala
536
537 systemadm_CFLAGS = \
538         $(AM_CFLAGS) \
539         $(DBUSGLIB_CFLAGS) \
540         $(GTK_CFLAGS) \
541         -Wno-unused-variable \
542         -Wno-unused-function \
543         -Wno-shadow \
544         -Wno-format-nonliteral
545
546 systemadm_VALAFLAGS = \
547         --pkg=dbus-glib-1 \
548         --pkg=posix \
549         --pkg=gtk+-2.0 \
550         -g
551
552 systemadm_LDADD = \
553         $(DBUSGLIB_LIBS) \
554         $(GTK_LIBS)
555
556 pam_systemd_la_SOURCES = \
557         src/pam-module.c \
558         src/cgroup-util.c \
559         src/sd-daemon.c
560
561 pam_systemd_la_CFLAGS = \
562         $(AM_CFLAGS) \
563         $(CGROUP_CFLAGS) \
564         -fvisibility=hidden
565
566 pam_systemd_la_LDFLAGS = \
567         -module \
568         -export-dynamic \
569         -avoid-version \
570         -shared \
571         -export-symbols-regex '^pam_sm_.*'
572
573 pam_systemd_la_LIBADD = \
574         libsystemd-basic.la \
575         $(PAM_LIBS) \
576         $(CGROUP_LIBS)
577
578 SED_PROCESS = \
579         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
580         $(SED)  -e 's,@rootlibexecdir\@,$(rootlibexecdir),g' \
581                 -e 's,@SPECIAL_SYSLOG_SERVICE\@,$(SPECIAL_SYSLOG_SERVICE),g' \
582                 -e 's,@SYSTEMCTL\@,$(rootbindir)/systemctl,g' \
583                 -e 's,@pkgsysconfdir\@,$(pkgsysconfdir),g' \
584                 -e 's,@pkgdatadir\@,$(pkgdatadir),g' \
585                 -e 's,@systemunitdir\@,$(systemunitdir),g' \
586                 -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
587                 -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
588                 -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' \
589                 -e 's,@prefix\@,$(prefix),g' \
590                 < $< > $@
591
592 units/%: units/%.in Makefile
593         $(SED_PROCESS)
594
595 man/%: man/%.in Makefile
596         $(SED_PROCESS)
597
598 %.pc: %.pc.in Makefile
599         $(SED_PROCESS)
600
601 M4_PROCESS_SYSTEM = \
602         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
603         $(M4) -P $(M4_DISTRO_FLAG) -DFOR_SYSTEM=1 < $< > $@
604
605 M4_PROCESS_SESSION = \
606         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
607         $(M4) -P $(M4_DISTRO_FLAG) -DFOR_SESSION=1 < $< > $@
608
609 units/%: units/%.m4 Makefile
610         $(M4_PROCESS_SYSTEM)
611
612 units/session/%: units/%.m4 Makefile
613         $(M4_PROCESS_SESSION)
614
615 CLEANFILES = \
616         $(nodist_systemunit_DATA) \
617         $(nodist_sessionunit_DATA) \
618         $(nodist_man_MANS) \
619         ${XML_IN_FILES:.xml.in=.html} \
620         $(pkgconfigdata_DATA)
621
622 if HAVE_VALAC
623 CLEANFILES += \
624         ${systemadm_SOURCES:.vala=.c}
625 endif
626
627 if HAVE_XSLTPROC
628 XSLTPROC_FLAGS = \
629         --nonet \
630         --param funcsynopsis.style "'ansi'"
631
632 XSLTPROC_PROCESS_MAN = \
633         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
634         $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
635
636 XSLTPROC_PROCESS_MAN_IN = \
637         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
638         $(XSLTPROC) -o ${@:.in=} $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< && \
639         mv ${@:.in=} $@
640
641 XSLTPROC_PROCESS_HTML = \
642         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
643         $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $<
644
645 XSLTPROC_PROCESS_HTML_IN = \
646         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
647         $(XSLTPROC) -o ${@:.in=} $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $< && \
648         mv ${@:.in=} $@
649
650 man/%.1: man/%.xml
651         $(XSLTPROC_PROCESS_MAN)
652
653 man/%.1.in: man/%.xml.in
654         $(XSLTPROC_PROCESS_MAN)
655
656 man/%.3: man/%.xml
657         $(XSLTPROC_PROCESS_MAN)
658
659 man/%.3.in: man/%.xml.in
660         $(XSLTPROC_PROCESS_MAN)
661
662 man/%.5: man/%.xml
663         $(XSLTPROC_PROCESS_MAN)
664
665 man/%.5.in: man/%.xml.in
666         $(XSLTPROC_PROCESS_MAN)
667
668 man/%.7: man/%.xml
669         $(XSLTPROC_PROCESS_MAN)
670
671 man/%.7.in: man/%.xml.in
672         $(XSLTPROC_PROCESS_MAN_IN)
673
674 man/%.8: man/%.xml
675         $(XSLTPROC_PROCESS_MAN)
676
677 man/%.8.in: man/%.xml.in
678         $(XSLTPROC_PROCESS_MAN_IN)
679
680 man/%.html: man/%.xml
681         $(XSLTPROC_PROCESS_HTML)
682
683 man/%.html.in: man/%.xml.in
684         $(XSLTPROC_PROCESS_HTML_IN)
685
686 CLEANFILES += \
687         $(dist_man_MANS) \
688         ${nodist_man_MANS:=.in} \
689         ${XML_FILES:.xml=.html} \
690         ${XML_IN_FILES:.xml.in=.html.in}
691 endif
692
693 org.freedesktop.systemd1.%.xml: systemd
694         $(AM_V_GEN)SYSTEMD_SKIP_API_MOUNTS=1 ./systemd --introspect=${@:.xml=} > $@
695
696 CLEANFILES += \
697         $(dbusinterface_DATA)
698
699 install-data-hook:
700         $(MKDIR_P) -m 0755 \
701                 $(DESTDIR)$(systemunitdir) \
702                 $(DESTDIR)$(sessionunitdir) \
703                 $(DESTDIR)$(systemunitdir)/sockets.target.wants \
704                 $(DESTDIR)$(systemunitdir)/sysinit.target.wants \
705                 $(DESTDIR)$(pkgsysconfdir)/system \
706                 $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants \
707                 $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants \
708                 $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants \
709                 $(DESTDIR)$(pkgsysconfdir)/session \
710                 $(DESTDIR)$(sysconfdir)/xdg/systemd
711         $(MKDIR_P) -m 0755 $(DESTDIR)/cgroup || \
712                 echo "Don't forget to create /cgroup! Couldn't create it for you, continuing anyway."
713         ( cd $(DESTDIR)$(sysconfdir)/xdg/systemd/ && \
714                 rm -f session && \
715                 $(LN_S) $(pkgsysconfdir)/session session )
716         ( cd $(DESTDIR)$(systemunitdir)/sockets.target.wants && \
717                 rm -f systemd-initctl.socket systemd-logger.socket && \
718                 $(LN_S) ../systemd-logger.socket systemd-logger.socket && \
719                 $(LN_S) ../systemd-initctl.socket systemd-initctl.socket )
720         ( cd $(DESTDIR)$(sessionunitdir) && \
721                 rm -f shutdown.target sockets.target local-fs.target swap.target && \
722                 $(LN_S) $(systemunitdir)/shutdown.target shutdown.target && \
723                 $(LN_S) $(systemunitdir)/sockets.target sockets.target && \
724                 $(LN_S) $(systemunitdir)/local-fs.target local-fs.target && \
725                 $(LN_S) $(systemunitdir)/swap.target swap.target )
726         ( cd $(DESTDIR)$(systemunitdir) && \
727                 rm -f runlevel0.target runlevel1.target runlevel6.target && \
728                 $(LN_S) poweroff.target runlevel0.target && \
729                 $(LN_S) rescue.target runlevel1.target && \
730                 $(LN_S) reboot.target runlevel6.target )
731         ( cd $(DESTDIR)$(pkgsysconfdir)/system && \
732                 rm -f default.target ctrl-alt-del.target kbrequest.target && \
733                 $(LN_S) $(systemunitdir)/graphical.target default.target && \
734                 $(LN_S) $(systemunitdir)/reboot.target ctrl-alt-del.target && \
735                 $(LN_S) $(systemunitdir)/rescue.target kbrequest.target && \
736                 rm -f runlevel2.target runlevel3.target runlevel4.target runlevel5.target && \
737                 $(LN_S) $(systemunitdir)/multi-user.target runlevel2.target && \
738                 $(LN_S) $(systemunitdir)/multi-user.target runlevel3.target && \
739                 $(LN_S) $(systemunitdir)/multi-user.target runlevel4.target && \
740                 $(LN_S) $(systemunitdir)/graphical.target runlevel5.target )
741         ( cd $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants && \
742                 rm -f getty@tty1.service getty@tty2.service getty@tty3.service getty@tty4.service getty@tty5.service getty@tty6.service && \
743                 $(LN_S) $(systemunitdir)/getty@.service getty@tty1.service && \
744                 $(LN_S) $(systemunitdir)/getty@.service getty@tty2.service && \
745                 $(LN_S) $(systemunitdir)/getty@.service getty@tty3.service && \
746                 $(LN_S) $(systemunitdir)/getty@.service getty@tty4.service && \
747                 $(LN_S) $(systemunitdir)/getty@.service getty@tty5.service && \
748                 $(LN_S) $(systemunitdir)/getty@.service getty@tty6.service )
749         ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
750                 rm -f getty.target remote-fs.target && \
751                 $(LN_S) $(systemunitdir)/getty.target getty.target && \
752                 $(LN_S) $(systemunitdir)/remote-fs.target remote-fs.target )
753         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
754                 rm -f dev-hugepages.automount \
755                         dev-mqueue.automount \
756                         proc-sys-fs-binfmt_misc.automount \
757                         sys-kernel-debug.automount \
758                         sys-kernel-security.automount && \
759                 $(LN_S) ../dev-hugepages.automount dev-hugepages.automount && \
760                 $(LN_S) ../dev-mqueue.automount dev-mqueue.automount && \
761                 $(LN_S) ../proc-sys-fs-binfmt_misc.automount proc-sys-fs-binfmt_misc.automount && \
762                 $(LN_S) ../sys-kernel-debug.automount sys-kernel-debug.automount && \
763                 $(LN_S) ../sys-kernel-security.automount sys-kernel-security.automount )
764         ( cd $(DESTDIR)$(dbussessionservicedir) && \
765                 rm -f org.freedesktop.systemd1.service && \
766                 $(LN_S) ../system-services/org.freedesktop.systemd1.service org.freedesktop.systemd1.service )
767 if TARGET_FEDORA
768         $(MKDIR_P) -m 0755 \
769                 $(DESTDIR)$(SYSTEM_SYSVINIT_PATH)
770         ( cd $(DESTDIR)$(pkgsysconfdir)/system && \
771                 rm -f display-manager.service && \
772                 $(LN_S) $(systemunitdir)/prefdm.service display-manager.service )
773         ( cd $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants && \
774                 rm -f prefdm.service && \
775                 $(LN_S) $(systemunitdir)/prefdm.service prefdm.service )
776         ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
777                 rm -f rc-local.service && \
778                 $(LN_S) $(systemunitdir)/rc-local.service rc-local.service )
779         ( cd $(DESTDIR)$(systemunitdir) && \
780                 rm -f local.service && \
781                 $(LN_S) rc-local.service local.service )
782         ( cd $(DESTDIR)$(SYSTEM_SYSVINIT_PATH) && \
783                 $(LN_S) halt reboot > /dev/null 2>&1 || true )
784 endif
785 if TARGET_GENTOO
786         ( cd $(DESTDIR)$(pkgsysconfdir)/system && \
787                 rm -f display-manager.service && \
788                 $(LN_S) $(systemunitdir)/xdm.service display-manager.service )
789         ( cd $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants && \
790                 rm -f xdm.service && \
791                 $(LN_S) $(systemunitdir)/xdm.service xdm.service )
792 endif
793
794 DISTCHECK_CONFIGURE_FLAGS = \
795         --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
796         --with-dbussessionservicedir=$$dc_install_base/$(dbussessionservicedir) \
797         --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
798         --with-dbusinterfacedir=$$dc_install_base/$(dbusinterfacedir) \
799         --with-udevrulesdir=$$dc_install_base/$(udevrulesdir) \
800         --with-pamlibdir=$$dc_install_base/$(pamlibdir) \
801         --with-rootdir=$$dc_install_base/$(rootdir)
802
803 upload: all distcheck
804         cp -v systemd-$(VERSION).tar.bz2 /home/lennart/cvs.fedora/systemd/devel/
805         scp systemd-$(VERSION).tar.bz2 fdo:/srv/www.freedesktop.org/www/software/systemd/
806         scp man/*.html tango:public/systemd-man/
807
808 git-tag:
809         git tag "v$(VERSION)" -m "systemd $(VERSION)"