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