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