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