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