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