chiark / gitweb /
logind: implement basic version of AttachDevice() D-Bus call
[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 polkitpolicydir=$(datadir)/polkit-1/actions
29 bashcompletiondir=$(sysconfdir)/bash_completion.d
30
31 # Our own, non-special dirs
32 pkgsysconfdir=$(sysconfdir)/systemd
33 userunitdir=$(prefix)/lib/systemd/user
34 tmpfilesdir=$(prefix)/lib/tmpfiles.d
35 usergeneratordir=$(pkglibexecdir)/user-generators
36
37 # And these are the special ones for /
38 rootdir=@rootdir@
39 rootbindir=$(rootdir)/bin
40 rootlibexecdir=$(rootdir)/lib/systemd
41 systemgeneratordir=$(rootlibexecdir)/system-generators
42 systemshutdowndir=$(rootlibexecdir)/system-shutdown
43 systemunitdir=$(rootdir)/lib/systemd/system
44
45 AM_CPPFLAGS = \
46         -include $(top_builddir)/config.h \
47         -DSYSTEM_CONFIG_FILE=\"$(pkgsysconfdir)/system.conf\" \
48         -DSYSTEM_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/system\" \
49         -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" \
50         -DSYSTEM_SYSVINIT_PATH=\"$(SYSTEM_SYSVINIT_PATH)\" \
51         -DSYSTEM_SYSVRCND_PATH=\"$(SYSTEM_SYSVRCND_PATH)\" \
52         -DUSER_CONFIG_FILE=\"$(pkgsysconfdir)/user.conf\" \
53         -DUSER_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/user\" \
54         -DUSER_DATA_UNIT_PATH=\"$(userunitdir)\" \
55         -DSYSTEMD_CGROUP_AGENT_PATH=\"$(rootlibexecdir)/systemd-cgroups-agent\" \
56         -DSYSTEMD_BINARY_PATH=\"$(rootbindir)/systemd\" \
57         -DSYSTEMD_SHUTDOWN_BINARY_PATH=\"$(rootlibexecdir)/systemd-shutdown\" \
58         -DSYSTEMCTL_BINARY_PATH=\"$(rootbindir)/systemctl\" \
59         -DSYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH=\"$(rootbindir)/systemd-tty-ask-password-agent\" \
60         -DSYSTEMD_STDIO_BRIDGE_BINARY_PATH=\"$(bindir)/systemd-stdio-bridge\" \
61         -DRUNTIME_DIR=\"/run\" \
62         -DRANDOM_SEED=\"$(localstatedir)/lib/random-seed\" \
63         -DSYSTEMD_CRYPTSETUP_PATH=\"$(rootlibexecdir)/systemd-cryptsetup\" \
64         -DSYSTEM_GENERATOR_PATH=\"$(systemgeneratordir)\" \
65         -DUSER_GENERATOR_PATH=\"$(usergeneratordir)\" \
66         -DSYSTEM_SHUTDOWN_PATH=\"$(systemshutdowndir)\" \
67         -I $(top_srcdir)/src
68
69 if TARGET_GENTOO
70 AM_CPPFLAGS += \
71         -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
72         -DKBD_SETFONT=\"/usr/bin/setfont\" \
73         -DDEFAULT_FONT=\"LatArCyrHeb-16\"
74 else
75 if TARGET_ARCH
76 AM_CPPFLAGS += \
77         -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
78         -DKBD_SETFONT=\"/usr/bin/setfont\" \
79         -DDEFAULT_FONT=\"LatArCyrHeb-16\"
80 else
81 if TARGET_FRUGALWARE
82 AM_CPPFLAGS += \
83         -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
84         -DKBD_SETFONT=\"/usr/bin/setfont\" \
85         -DDEFAULT_FONT=\"LatArCyrHeb-16\"
86 else
87 if TARGET_MANDRIVA
88 AM_CPPFLAGS += \
89         -DKBD_LOADKEYS=\"/bin/loadkeys\" \
90         -DKBD_SETFONT=\"/bin/setfont\" \
91         -DDEFAULT_FONT=\"LatArCyrHeb-16\"
92 else
93 if TARGET_MEEGO
94 AM_CPPFLAGS += \
95         -DKBD_LOADKEYS=\"/bin/loadkeys\" \
96         -DKBD_SETFONT=\"/bin/setfont\" \
97         -DDEFAULT_FONT=\"LatArCyrHeb-16\"
98 else
99 if TARGET_ANGSTROM
100 AM_CPPFLAGS += \
101         -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
102         -DKBD_SETFONT=\"/usr/bin/setfont\" \
103         -DDEFAULT_FONT=\"LatArCyrHeb-16\"
104 else
105 AM_CPPFLAGS += \
106         -DKBD_LOADKEYS=\"/bin/loadkeys\" \
107         -DKBD_SETFONT=\"/bin/setfont\" \
108         -DDEFAULT_FONT=\"latarcyrheb-sun16\"
109 endif
110 endif
111 endif
112 endif
113 endif
114 endif
115
116 rootbin_PROGRAMS = \
117         systemd \
118         systemctl \
119         systemd-notify \
120         systemd-ask-password \
121         systemd-tty-ask-password-agent \
122         systemd-tmpfiles \
123         systemd-machine-id-setup
124
125 bin_PROGRAMS = \
126         systemd-cgls \
127         systemd-stdio-bridge \
128         systemd-nspawn
129
130 dist_bin_SCRIPTS = \
131         src/systemd-analyze
132
133 if HAVE_GTK
134 bin_PROGRAMS += \
135         systemadm \
136         systemd-gnome-ask-password-agent
137 endif
138
139 rootlibexec_PROGRAMS = \
140         systemd-logger \
141         systemd-cgroups-agent \
142         systemd-initctl \
143         systemd-update-utmp \
144         systemd-random-seed \
145         systemd-shutdownd \
146         systemd-shutdown \
147         systemd-modules-load \
148         systemd-remount-api-vfs \
149         systemd-kmsg-syslogd \
150         systemd-vconsole-setup \
151         systemd-reply-password \
152         systemd-readahead-collect \
153         systemd-readahead-replay \
154         systemd-user-sessions \
155         systemd-fsck \
156         systemd-quotacheck \
157         systemd-timestamp \
158         systemd-ac-power \
159         systemd-detect-virt \
160         systemd-sysctl \
161         systemd-hostnamed \
162         systemd-localed \
163         systemd-timedated \
164         systemd-logind \
165         systemd-uaccess
166
167 if ENABLE_BINFMT
168 rootlibexec_PROGRAMS += \
169         systemd-binfmt
170 endif
171
172 systemgenerator_PROGRAMS = \
173         systemd-getty-generator
174
175 if HAVE_LIBCRYPTSETUP
176 rootlibexec_PROGRAMS += \
177         systemd-cryptsetup
178
179 systemgenerator_PROGRAMS += \
180         systemd-cryptsetup-generator
181 endif
182
183 noinst_PROGRAMS = \
184         test-engine \
185         test-job-type \
186         test-ns \
187         test-loopback \
188         test-hostname \
189         test-daemon \
190         test-cgroup \
191         test-env-replace \
192         test-strv
193
194 if HAVE_PAM
195 pamlib_LTLIBRARIES = \
196         pam_systemd.la
197 endif
198
199 dist_pkgsysconf_DATA = \
200         src/system.conf
201
202 dist_dbuspolicy_DATA = \
203         src/org.freedesktop.systemd1.conf \
204         src/org.freedesktop.hostname1.conf \
205         src/org.freedesktop.locale1.conf \
206         src/org.freedesktop.timedate1.conf \
207         src/org.freedesktop.login1.conf
208
209 dist_dbussystemservice_DATA = \
210         src/org.freedesktop.systemd1.service \
211         src/org.freedesktop.hostname1.service \
212         src/org.freedesktop.locale1.service \
213         src/org.freedesktop.timedate1.service \
214         src/org.freedesktop.login1.service
215
216 dist_udevrules_DATA = \
217         src/70-uaccess.rules \
218         src/71-seat.rules \
219         src/73-seat-late.rules \
220         src/99-systemd.rules
221
222 dbusinterface_DATA = \
223         org.freedesktop.systemd1.Manager.xml \
224         org.freedesktop.systemd1.Job.xml \
225         org.freedesktop.systemd1.Unit.xml \
226         org.freedesktop.systemd1.Service.xml \
227         org.freedesktop.systemd1.Socket.xml \
228         org.freedesktop.systemd1.Timer.xml \
229         org.freedesktop.systemd1.Target.xml \
230         org.freedesktop.systemd1.Device.xml \
231         org.freedesktop.systemd1.Mount.xml \
232         org.freedesktop.systemd1.Automount.xml \
233         org.freedesktop.systemd1.Snapshot.xml \
234         org.freedesktop.systemd1.Swap.xml \
235         org.freedesktop.systemd1.Path.xml \
236         org.freedesktop.hostname1.xml \
237         org.freedesktop.locale1.xml \
238         org.freedesktop.timedate1.xml
239
240 dist_bashcompletion_DATA = \
241         src/systemctl-bash-completion.sh
242
243 dist_tmpfiles_DATA = \
244         tmpfiles.d/systemd.conf \
245         tmpfiles.d/x11.conf
246
247 if HAVE_SYSV_COMPAT
248 dist_tmpfiles_DATA += \
249         tmpfiles.d/legacy.conf
250 endif
251
252 dist_systemunit_DATA = \
253         units/graphical.target \
254         units/multi-user.target \
255         units/emergency.service \
256         units/emergency.target \
257         units/sysinit.target \
258         units/basic.target \
259         units/getty.target \
260         units/halt.target \
261         units/kexec.target \
262         units/local-fs.target \
263         units/remote-fs.target \
264         units/cryptsetup.target \
265         units/network.target \
266         units/nss-lookup.target \
267         units/mail-transfer-agent.target \
268         units/http-daemon.target \
269         units/poweroff.target \
270         units/reboot.target \
271         units/rescue.target \
272         units/rpcbind.target \
273         units/time-sync.target \
274         units/shutdown.target \
275         units/final.target \
276         units/umount.target \
277         units/sigpwr.target \
278         units/sockets.target \
279         units/swap.target \
280         units/systemd-initctl.socket \
281         units/systemd-logger.socket \
282         units/systemd-shutdownd.socket \
283         units/syslog.socket \
284         units/dev-hugepages.automount \
285         units/dev-hugepages.mount \
286         units/dev-mqueue.automount \
287         units/dev-mqueue.mount \
288         units/sys-kernel-debug.automount \
289         units/sys-kernel-debug.mount \
290         units/sys-kernel-security.automount \
291         units/sys-kernel-security.mount \
292         units/var-run.mount \
293         units/media.mount \
294         units/remount-rootfs.service \
295         units/printer.target \
296         units/sound.target \
297         units/bluetooth.target \
298         units/smartcard.target \
299         units/systemd-readahead-done.timer \
300         units/systemd-tmpfiles-clean.timer \
301         units/quotaon.service \
302         units/systemd-ask-password-wall.path \
303         units/systemd-ask-password-console.path \
304         units/syslog.target
305
306 if HAVE_SYSV_COMPAT
307 dist_systemunit_DATA += \
308         units/var-lock.mount
309 endif
310
311 if ENABLE_BINFMT
312 dist_systemunit_DATA += \
313         units/proc-sys-fs-binfmt_misc.automount \
314         units/proc-sys-fs-binfmt_misc.mount
315 endif
316
317 nodist_systemunit_DATA = \
318         units/getty@.service \
319         units/serial-getty@.service \
320         units/console-shell.service \
321         units/systemd-initctl.service \
322         units/systemd-logger.service \
323         units/systemd-shutdownd.service \
324         units/systemd-hostnamed.service \
325         units/systemd-localed.service \
326         units/systemd-timedated.service \
327         units/systemd-logind.service \
328         units/systemd-kmsg-syslogd.service \
329         units/systemd-modules-load.service \
330         units/systemd-vconsole-setup.service \
331         units/systemd-remount-api-vfs.service \
332         units/systemd-update-utmp-runlevel.service \
333         units/systemd-update-utmp-shutdown.service \
334         units/systemd-random-seed-save.service \
335         units/systemd-random-seed-load.service \
336         units/systemd-readahead-collect.service \
337         units/systemd-readahead-replay.service \
338         units/systemd-readahead-done.service \
339         units/systemd-tmpfiles-setup.service \
340         units/systemd-tmpfiles-clean.service \
341         units/systemd-user-sessions.service \
342         units/systemd-ask-password-wall.service \
343         units/systemd-ask-password-console.service \
344         units/systemd-sysctl.service \
345         units/halt.service \
346         units/poweroff.service \
347         units/reboot.service \
348         units/kexec.service \
349         units/fsck@.service \
350         units/fsck-root.service \
351         units/quotacheck.service \
352         units/rescue.service
353
354 if ENABLE_BINFMT
355 nodist_systemunit_DATA += \
356         units/systemd-binfmt.service
357 endif
358
359 dist_userunit_DATA = \
360         units/user/default.target \
361         units/user/exit.target
362
363 nodist_userunit_DATA = \
364         units/user/exit.service
365
366 EXTRA_DIST = \
367         units/getty@.service.m4 \
368         units/serial-getty@.service.m4 \
369         units/console-shell.service.m4 \
370         units/rescue.service.m4 \
371         units/systemd-initctl.service.in \
372         units/systemd-logger.service.in \
373         units/systemd-shutdownd.service.in \
374         units/systemd-hostnamed.service.in \
375         units/systemd-localed.service.in \
376         units/systemd-timedated.service.in \
377         units/systemd-logind.service.in \
378         units/systemd-kmsg-syslogd.service.in \
379         units/systemd-modules-load.service.in \
380         units/systemd-vconsole-setup.service.in \
381         units/systemd-remount-api-vfs.service.in \
382         units/systemd-update-utmp-runlevel.service.in \
383         units/systemd-update-utmp-shutdown.service.in \
384         units/systemd-random-seed-save.service.in \
385         units/systemd-random-seed-load.service.in \
386         units/systemd-readahead-collect.service.in \
387         units/systemd-readahead-replay.service.in \
388         units/systemd-readahead-done.service.in \
389         units/systemd-tmpfiles-setup.service.in \
390         units/systemd-tmpfiles-clean.service.in \
391         units/systemd-user-sessions.service.in \
392         units/systemd-ask-password-wall.service.in \
393         units/systemd-ask-password-console.service.in \
394         units/systemd-sysctl.service.in \
395         units/halt.service.in \
396         units/poweroff.service.in \
397         units/reboot.service.in \
398         units/kexec.service.in \
399         units/user/exit.service.in \
400         units/fsck@.service.in \
401         units/fsck-root.service.in \
402         units/quotacheck.service.in \
403         systemd.pc.in \
404         introspect.awk \
405         src/org.freedesktop.systemd1.policy.in
406
407 if ENABLE_BINFMT
408 EXTRA_DIST += \
409         units/systemd-binfmt.service.in
410 endif
411
412 if TARGET_FEDORA
413 dist_systemunit_DATA += \
414         units/fedora/prefdm.service \
415         units/fedora/rc-local.service \
416         units/fedora/halt-local.service
417 endif
418
419 if TARGET_MANDRIVA
420 dist_systemunit_DATA += \
421         units/mandriva/prefdm.service \
422         units/fedora/rc-local.service \
423         units/fedora/halt-local.service
424 endif
425
426 if TARGET_FRUGALWARE
427 dist_systemunit_DATA += \
428         units/frugalware/display-manager.service
429 endif
430
431 if HAVE_PLYMOUTH
432 dist_systemunit_DATA += \
433         units/plymouth-start.service \
434         units/plymouth-read-write.service \
435         units/plymouth-quit.service \
436         units/plymouth-quit-wait.service \
437         units/plymouth-reboot.service \
438         units/plymouth-kexec.service \
439         units/plymouth-poweroff.service \
440         units/plymouth-halt.service \
441         units/systemd-ask-password-plymouth.path
442
443 nodist_systemunit_DATA += \
444         units/systemd-ask-password-plymouth.service
445
446 EXTRA_DIST += \
447         units/systemd-ask-password-plymouth.service.in
448 endif
449
450 dist_doc_DATA = \
451         README \
452         LICENSE \
453         DISTRO_PORTING \
454         src/sd-daemon.h \
455         src/sd-daemon.c \
456         src/sd-readahead.h \
457         src/sd-readahead.c
458
459 pkgconfigdata_DATA = \
460         systemd.pc
461
462 nodist_polkitpolicy_DATA = \
463         src/org.freedesktop.systemd1.policy
464
465 dist_polkitpolicy_DATA = \
466         src/org.freedesktop.hostname1.policy \
467         src/org.freedesktop.locale1.policy \
468         src/org.freedesktop.timedate1.policy \
469         src/org.freedesktop.login1.policy
470
471 noinst_LTLIBRARIES = \
472         libsystemd-basic.la \
473         libsystemd-core.la \
474         libsystemd-daemon.la
475
476 libsystemd_basic_la_SOURCES = \
477         src/util.c \
478         src/label.c \
479         src/hashmap.c \
480         src/set.c \
481         src/strv.c \
482         src/conf-parser.c \
483         src/socket-util.c \
484         src/log.c \
485         src/ratelimit.c \
486         src/exit-status.c
487
488 libsystemd_basic_la_CFLAGS = \
489         $(AM_CFLAGS) \
490         $(SELINUX_CFLAGS)
491
492 libsystemd_basic_la_LIBADD = \
493         $(SELINUX_LIBS)
494
495 libsystemd_core_la_SOURCES = \
496         src/unit.c \
497         src/job.c \
498         src/manager.c \
499         src/path-lookup.c \
500         src/load-fragment.c \
501         src/service.c \
502         src/automount.c \
503         src/mount.c \
504         src/swap.c \
505         src/device.c \
506         src/target.c \
507         src/snapshot.c \
508         src/socket.c \
509         src/timer.c \
510         src/path.c \
511         src/load-dropin.c \
512         src/execute.c \
513         src/utmp-wtmp.c \
514         src/dbus.c \
515         src/dbus-manager.c \
516         src/dbus-unit.c \
517         src/dbus-job.c \
518         src/dbus-service.c \
519         src/dbus-socket.c \
520         src/dbus-timer.c \
521         src/dbus-target.c \
522         src/dbus-mount.c \
523         src/dbus-automount.c \
524         src/dbus-swap.c \
525         src/dbus-snapshot.c \
526         src/dbus-device.c \
527         src/dbus-execute.c \
528         src/dbus-path.c \
529         src/cgroup.c \
530         src/mount-setup.c \
531         src/hostname-setup.c \
532         src/selinux-setup.c \
533         src/loopback-setup.c \
534         src/kmod-setup.c \
535         src/locale-setup.c \
536         src/machine-id-setup.c \
537         src/specifier.c \
538         src/unit-name.c \
539         src/fdset.c \
540         src/namespace.c \
541         src/tcpwrap.c \
542         src/cgroup-util.c \
543         src/condition.c \
544         src/dbus-common.c
545
546 libsystemd_core_la_CFLAGS = \
547         $(AM_CFLAGS) \
548         $(DBUS_CFLAGS) \
549         $(UDEV_CFLAGS) \
550         $(LIBWRAP_CFLAGS) \
551         $(PAM_CFLAGS) \
552         $(AUDIT_CFLAGS)
553
554 libsystemd_core_la_LIBADD = \
555         libsystemd-basic.la \
556         $(DBUS_LIBS) \
557         $(UDEV_LIBS) \
558         $(LIBWRAP_LIBS) \
559         $(PAM_LIBS) \
560         $(AUDIT_LIBS)
561
562 libsystemd_daemon_la_SOURCES = \
563         src/sd-daemon.c
564
565 # This is needed because automake is buggy in how it generates the
566 # rules for C programs, but not Vala programs.  We therefore can't
567 # list the .h files as dependencies if we want make dist to work.
568
569 EXTRA_DIST += \
570         ${libsystemd_basic_la_SOURCES:.c=.h} \
571         ${libsystemd_core_la_SOURCES:.c=.h} \
572         ${libsystemd_daemon_la_SOURCES:.c=.h} \
573         src/macro.h \
574         src/def.h \
575         src/ioprio.h \
576         src/missing.h \
577         src/list.h \
578         src/securebits.h \
579         src/linux/auto_dev-ioctl.h \
580         src/linux/fanotify.h \
581         src/initreq.h \
582         src/sd-readahead.h \
583         src/special.h \
584         src/dbus-common.h \
585         src/bus-errors.h \
586         src/cgroup-show.h \
587         src/build.h \
588         src/shutdownd.h \
589         src/umount.h \
590         src/readahead-common.h \
591         src/ask-password-api.h
592
593 MANPAGES = \
594         man/systemd.1 \
595         man/systemctl.1 \
596         man/systemadm.1 \
597         man/systemd-cgls.1 \
598         man/systemd-nspawn.1 \
599         man/systemd-tmpfiles.8 \
600         man/systemd-notify.1 \
601         man/sd_notify.3 \
602         man/sd_readahead.3 \
603         man/sd_booted.3 \
604         man/sd_listen_fds.3 \
605         man/sd_is_fifo.3 \
606         man/systemd.unit.5 \
607         man/systemd.service.5 \
608         man/systemd.socket.5 \
609         man/systemd.mount.5 \
610         man/systemd.automount.5 \
611         man/systemd.swap.5 \
612         man/systemd.timer.5 \
613         man/systemd.path.5 \
614         man/systemd.target.5 \
615         man/systemd.device.5 \
616         man/systemd.snapshot.5 \
617         man/systemd.exec.5 \
618         man/daemon.7 \
619         man/sd-daemon.7 \
620         man/sd-readahead.7 \
621         man/runlevel.8 \
622         man/telinit.8 \
623         man/halt.8 \
624         man/shutdown.8 \
625         man/pam_systemd.8 \
626         man/systemd.conf.5 \
627         man/tmpfiles.d.5 \
628         man/hostname.5 \
629         man/machine-id.5 \
630         man/vconsole.conf.5 \
631         man/locale.conf.5 \
632         man/os-release.5 \
633         man/machine-info.5 \
634         man/modules-load.d.5 \
635         man/sysctl.d.5 \
636         man/systemd-ask-password.1
637
638 if ENABLE_BINFMT
639 MANPAGES += \
640         man/binfmt.d.5
641 endif
642
643 MANPAGES_ALIAS = \
644         man/reboot.8 \
645         man/poweroff.8 \
646         man/sd_is_socket.3 \
647         man/sd_is_socket_unix.3 \
648         man/sd_is_socket_inet.3 \
649         man/sd_notifyf.3 \
650         man/init.1
651
652 man/reboot.8: man/halt.8
653 man/poweroff.8: man/halt.8
654 man/sd_is_socket.3: man/sd_is_fifo.3
655 man/sd_is_socket_unix.3: man/sd_is_fifo.3
656 man/sd_is_socket_inet.3: man/sd_is_fifo.3
657 man/sd_notifyf.3: man/sd_notify.3
658 man/init.1: man/systemd.1
659
660 dist_man_MANS = \
661         $(MANPAGES) \
662         $(MANPAGES_ALIAS)
663
664 nodist_man_MANS = \
665         man/systemd.special.7
666
667 XML_FILES = \
668         ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
669
670 XML_IN_FILES = \
671         ${patsubst %.1,%.xml.in,${patsubst %.3,%.xml.in,${patsubst %.5,%.xml.in,${patsubst %.7,%.xml.in,${patsubst %.8,%.xml.in,$(nodist_man_MANS)}}}}}
672
673 dist_noinst_DATA = \
674         ${XML_FILES:.xml=.html}
675
676 nodist_noinst_DATA = \
677         ${XML_IN_FILES:.xml.in=.html}
678
679 EXTRA_DIST += \
680         $(XML_FILES) \
681         $(XML_IN_FILES) \
682         ${nodist_man_MANS:=.in} \
683         ${XML_IN_FILES:.xml.in=.html.in}
684
685 systemd_SOURCES = \
686         src/main.c
687
688 systemd_CFLAGS = \
689         $(AM_CFLAGS) \
690         $(DBUS_CFLAGS) \
691         $(UDEV_CFLAGS)
692
693 systemd_LDADD = \
694         libsystemd-core.la
695
696 test_engine_SOURCES = \
697         src/test-engine.c
698
699 test_engine_CFLAGS = $(systemd_CFLAGS)
700 test_engine_LDADD = $(systemd_LDADD)
701
702 test_job_type_SOURCES = \
703         src/test-job-type.c
704
705 test_job_type_CFLAGS = $(systemd_CFLAGS)
706 test_job_type_LDADD = $(systemd_LDADD)
707
708 test_ns_SOURCES = \
709         src/test-ns.c
710
711 test_ns_CFLAGS = $(systemd_CFLAGS)
712 test_ns_LDADD = $(systemd_LDADD)
713
714 test_loopback_SOURCES = \
715         src/test-loopback.c \
716         src/loopback-setup.c
717
718 test_loopback_LDADD = \
719         libsystemd-basic.la
720
721 test_hostname_SOURCES = \
722         src/test-hostname.c \
723         src/hostname-setup.c
724
725 test_hostname_LDADD = \
726         libsystemd-basic.la
727
728 test_daemon_SOURCES = \
729         src/test-daemon.c
730
731 test_daemon_LDADD = \
732         libsystemd-basic.la \
733         libsystemd-daemon.la
734
735 test_cgroup_SOURCES = \
736         src/test-cgroup.c \
737         src/cgroup-util.c
738
739 test_cgroup_CFLAGS = \
740         $(AM_CFLAGS)
741
742 test_cgroup_LDADD = \
743         libsystemd-basic.la
744
745 test_env_replace_SOURCES = \
746         src/test-env-replace.c
747
748 test_env_replace_CFLAGS = \
749         $(AM_CFLAGS)
750
751 test_env_replace_LDADD = \
752         libsystemd-basic.la
753
754 test_strv_SOURCES = \
755         src/test-strv.c \
756         src/specifier.c
757
758 test_strv_CFLAGS = \
759         $(AM_CFLAGS)
760
761 test_strv_LDADD = \
762         libsystemd-basic.la
763
764 systemd_logger_SOURCES = \
765         src/logger.c \
766         src/tcpwrap.c
767
768 systemd_logger_LDADD = \
769         libsystemd-basic.la \
770         libsystemd-daemon.la \
771         $(LIBWRAP_LIBS)
772
773 systemd_initctl_SOURCES = \
774         src/initctl.c \
775         src/dbus-common.c
776
777 systemd_initctl_CFLAGS = \
778         $(AM_CFLAGS) \
779         $(DBUS_CFLAGS)
780
781 systemd_initctl_LDADD = \
782         libsystemd-basic.la \
783         libsystemd-daemon.la \
784         $(DBUS_LIBS)
785
786 systemd_update_utmp_SOURCES = \
787         src/update-utmp.c \
788         src/dbus-common.c \
789         src/utmp-wtmp.c
790
791 systemd_update_utmp_CFLAGS = \
792         $(AM_CFLAGS) \
793         $(DBUS_CFLAGS) \
794         $(AUDIT_CFLAGS)
795
796 systemd_update_utmp_LDADD = \
797         libsystemd-basic.la \
798         $(DBUS_LIBS) \
799         $(AUDIT_LIBS)
800
801 systemd_random_seed_SOURCES = \
802         src/random-seed.c
803
804 systemd_random_seed_CFLAGS = \
805         $(AM_CFLAGS)
806
807 systemd_random_seed_LDADD = \
808         libsystemd-basic.la
809
810 systemd_shutdownd_SOURCES = \
811         src/utmp-wtmp.c \
812         src/shutdownd.c
813
814 systemd_shutdownd_CFLAGS = \
815         $(AM_CFLAGS)
816
817 systemd_shutdownd_LDADD = \
818         libsystemd-basic.la \
819         libsystemd-daemon.la
820
821 systemd_hostnamed_SOURCES = \
822         src/hostnamed.c \
823         src/dbus-common.c \
824         src/polkit.c
825
826 systemd_hostnamed_CFLAGS = \
827         $(AM_CFLAGS) \
828         $(DBUS_CFLAGS)
829
830 systemd_hostnamed_LDADD = \
831         libsystemd-basic.la \
832         libsystemd-daemon.la \
833         $(DBUS_LIBS)
834
835 systemd_localed_SOURCES = \
836         src/localed.c \
837         src/dbus-common.c \
838         src/polkit.c
839
840 systemd_localed_CFLAGS = \
841         $(AM_CFLAGS) \
842         $(DBUS_CFLAGS)
843
844 systemd_localed_LDADD = \
845         libsystemd-basic.la \
846         libsystemd-daemon.la \
847         $(DBUS_LIBS)
848
849 systemd_timedated_SOURCES = \
850         src/timedated.c \
851         src/dbus-common.c \
852         src/polkit.c
853
854 systemd_timedated_CFLAGS = \
855         $(AM_CFLAGS) \
856         $(DBUS_CFLAGS)
857
858 systemd_timedated_LDADD = \
859         libsystemd-basic.la \
860         libsystemd-daemon.la \
861         $(DBUS_LIBS)
862
863 systemd_logind_SOURCES = \
864         src/logind.c \
865         src/logind-dbus.c \
866         src/logind-device.c \
867         src/logind-seat.c \
868         src/logind-seat-dbus.c \
869         src/logind-session.c \
870         src/logind-session-dbus.c \
871         src/logind-user.c \
872         src/logind-user-dbus.c \
873         src/logind-acl.c \
874         src/dbus-common.c \
875         src/dbus-loop.c \
876         src/cgroup-util.c \
877         src/polkit.c
878
879 systemd_logind_CFLAGS = \
880         $(AM_CFLAGS) \
881         $(DBUS_CFLAGS) \
882         $(UDEV_CFLAGS) \
883         $(ACL_CFLAGS)
884
885 systemd_logind_LDADD = \
886         libsystemd-basic.la \
887         libsystemd-daemon.la \
888         $(DBUS_LIBS) \
889         $(UDEV_LIBS) \
890         $(ACL_LIBS)
891
892 systemd_uaccess_SOURCES = \
893         src/uaccess.c \
894         src/logind-acl.c
895
896 systemd_uaccess_CFLAGS = \
897         $(AM_CFLAGS) \
898         $(UDEV_CFLAGS) \
899         $(ACL_CFLAGS)
900
901 systemd_uaccess_LDADD = \
902         libsystemd-basic.la \
903         $(UDEV_LIBS) \
904         $(ACL_LIBS)
905
906 systemd_shutdown_SOURCES = \
907         src/mount-setup.c \
908         src/umount.c \
909         src/shutdown.c
910
911 systemd_shutdown_CFLAGS = \
912         $(AM_CFLAGS) \
913         $(UDEV_CFLAGS)
914
915 systemd_shutdown_LDADD = \
916         libsystemd-basic.la \
917         $(UDEV_LIBS)
918
919 systemd_modules_load_SOURCES = \
920         src/modules-load.c
921
922 systemd_modules_load_CFLAGS = \
923         $(AM_CFLAGS)
924
925 systemd_modules_load_LDADD = \
926         libsystemd-basic.la
927
928 systemd_tmpfiles_SOURCES = \
929         src/tmpfiles.c
930
931 systemd_tmpfiles_CFLAGS = \
932         $(AM_CFLAGS)
933
934 systemd_tmpfiles_LDADD = \
935         libsystemd-basic.la
936
937 systemd_machine_id_setup_SOURCES = \
938         src/machine-id-setup.c \
939         src/machine-id-main.c
940
941 systemd_machine_id_setup_CFLAGS = \
942         $(AM_CFLAGS)
943
944 systemd_machine_id_setup_LDADD = \
945         libsystemd-basic.la
946
947 systemd_sysctl_SOURCES = \
948         src/sysctl.c
949
950 systemd_sysctl_CFLAGS = \
951         $(AM_CFLAGS)
952
953 systemd_sysctl_LDADD = \
954         libsystemd-basic.la
955
956 systemd_binfmt_SOURCES = \
957         src/binfmt.c
958
959 systemd_binfmt_CFLAGS = \
960         $(AM_CFLAGS)
961
962 systemd_binfmt_LDADD = \
963         libsystemd-basic.la
964
965 systemd_fsck_SOURCES = \
966         src/fsck.c \
967         src/dbus-common.c
968
969 systemd_fsck_CFLAGS = \
970         $(AM_CFLAGS) \
971         $(UDEV_CFLAGS) \
972         $(DBUS_CFLAGS)
973
974 systemd_fsck_LDADD = \
975         libsystemd-basic.la \
976         $(UDEV_LIBS) \
977         $(DBUS_LIBS)
978
979 systemd_quotacheck_SOURCES = \
980         src/quotacheck.c
981
982 systemd_quotacheck_CFLAGS = \
983         $(AM_CFLAGS)
984
985 systemd_quotacheck_LDADD = \
986         libsystemd-basic.la
987
988 systemd_timestamp_SOURCES = \
989         src/timestamp.c
990
991 systemd_timestamp_CFLAGS = \
992         $(AM_CFLAGS)
993
994 systemd_timestamp_LDADD = \
995         libsystemd-basic.la
996
997 systemd_ac_power_SOURCES = \
998         src/ac-power.c
999
1000 systemd_ac_power_CFLAGS = \
1001         $(AM_CFLAGS) \
1002         $(UDEV_CFLAGS)
1003
1004 systemd_ac_power_LDADD = \
1005         libsystemd-basic.la \
1006         $(UDEV_LIBS)
1007
1008 systemd_detect_virt_SOURCES = \
1009         src/detect-virt.c
1010
1011 systemd_detect_virt_CFLAGS = \
1012         $(AM_CFLAGS)
1013
1014 systemd_detect_virt_LDADD = \
1015         libsystemd-basic.la
1016
1017 systemd_cryptsetup_SOURCES = \
1018         src/cryptsetup.c \
1019         src/ask-password-api.c
1020
1021 systemd_cryptsetup_CFLAGS = \
1022         $(LIBCRYPTSETUP_CFLAGS) \
1023         $(UDEV_CFLAGS) \
1024         $(AM_CFLAGS)
1025
1026 systemd_cryptsetup_LDADD = \
1027         $(LIBCRYPTSETUP_LIBS) \
1028         $(UDEV_LIBS) \
1029         libsystemd-basic.la
1030
1031 systemd_cryptsetup_generator_SOURCES = \
1032         src/cryptsetup-generator.c \
1033         src/unit-name.c
1034
1035 systemd_cryptsetup_generator_CFLAGS = \
1036         $(AM_CFLAGS)
1037
1038 systemd_cryptsetup_generator_LDADD = \
1039         libsystemd-basic.la
1040
1041 systemd_getty_generator_SOURCES = \
1042         src/getty-generator.c \
1043         src/unit-name.c
1044
1045 systemd_getty_generator_CFLAGS = \
1046         $(AM_CFLAGS)
1047
1048 systemd_getty_generator_LDADD = \
1049         libsystemd-basic.la
1050
1051 systemd_user_sessions_SOURCES = \
1052         src/user-sessions.c \
1053         src/cgroup-util.c
1054
1055 systemd_user_sessions_CFLAGS = \
1056         $(AM_CFLAGS)
1057
1058 systemd_user_sessions_LDADD = \
1059         libsystemd-basic.la
1060
1061 systemd_vconsole_setup_SOURCES = \
1062         src/vconsole-setup.c
1063
1064 systemd_vconsole_setup_CFLAGS = \
1065         $(AM_CFLAGS)
1066
1067 systemd_vconsole_setup_LDADD = \
1068         libsystemd-basic.la
1069
1070 systemd_remount_api_vfs_SOURCES = \
1071         src/remount-api-vfs.c \
1072         src/mount-setup.c \
1073         src/exit-status.c
1074
1075 systemd_remount_api_vfs_CFLAGS = \
1076         $(AM_CFLAGS)
1077
1078 systemd_remount_api_vfs_LDADD = \
1079         libsystemd-basic.la
1080
1081 systemd_cgroups_agent_SOURCES = \
1082         src/cgroups-agent.c \
1083         src/dbus-common.c
1084
1085 systemd_cgroups_agent_CFLAGS = \
1086         $(AM_CFLAGS) \
1087         $(DBUS_CFLAGS)
1088
1089 systemd_cgroups_agent_LDADD = \
1090         libsystemd-basic.la \
1091         $(DBUS_LIBS)
1092
1093 systemd_kmsg_syslogd_SOURCES = \
1094         src/kmsg-syslogd.c \
1095         src/fdset.c
1096
1097 systemd_kmsg_syslogd_CFLAGS = \
1098         $(AM_CFLAGS)
1099
1100 systemd_kmsg_syslogd_LDADD = \
1101         libsystemd-basic.la \
1102         libsystemd-daemon.la
1103
1104 systemctl_SOURCES = \
1105         src/systemctl.c \
1106         src/utmp-wtmp.c \
1107         src/dbus-common.c \
1108         src/path-lookup.c \
1109         src/cgroup-show.c \
1110         src/cgroup-util.c \
1111         src/exit-status.c \
1112         src/unit-name.c
1113
1114 systemctl_CFLAGS = \
1115         $(AM_CFLAGS) \
1116         $(DBUS_CFLAGS)
1117
1118 systemctl_LDADD = \
1119         libsystemd-basic.la \
1120         libsystemd-daemon.la \
1121         $(DBUS_LIBS)
1122
1123 systemd_notify_SOURCES = \
1124         src/notify.c \
1125         src/sd-readahead.c
1126
1127 systemd_notify_LDADD = \
1128         libsystemd-basic.la \
1129         libsystemd-daemon.la
1130
1131 systemd_ask_password_SOURCES = \
1132         src/ask-password.c \
1133         src/ask-password-api.c
1134
1135 systemd_ask_password_LDADD = \
1136         libsystemd-basic.la
1137
1138 systemd_reply_password_SOURCES = \
1139         src/reply-password.c
1140
1141 systemd_reply_password_LDADD = \
1142         libsystemd-basic.la
1143
1144 systemd_readahead_collect_SOURCES = \
1145         src/readahead-collect.c \
1146         src/readahead-common.c
1147
1148 systemd_readahead_collect_CFLAGS = \
1149         $(UDEV_CFLAGS)
1150
1151 systemd_readahead_collect_LDADD = \
1152         libsystemd-basic.la \
1153         libsystemd-daemon.la \
1154         $(UDEV_LIBS)
1155
1156 systemd_readahead_replay_SOURCES = \
1157         src/readahead-replay.c \
1158         src/readahead-common.c
1159
1160 systemd_readahead_replay_CFLAGS = \
1161         $(UDEV_CFLAGS)
1162
1163 systemd_readahead_replay_LDADD = \
1164         libsystemd-basic.la \
1165         libsystemd-daemon.la \
1166         $(UDEV_LIBS)
1167
1168 systemd_cgls_SOURCES = \
1169         src/cgls.c \
1170         src/cgroup-show.c \
1171         src/cgroup-util.c
1172
1173 systemd_cgls_CFLAGS = \
1174         $(AM_CFLAGS)
1175
1176 systemd_cgls_LDADD = \
1177         libsystemd-basic.la
1178
1179 systemd_nspawn_SOURCES = \
1180         src/nspawn.c \
1181         src/cgroup-util.c
1182
1183 systemd_nspawn_CFLAGS = \
1184         $(AM_CFLAGS)
1185
1186 systemd_nspawn_LDADD = \
1187         libsystemd-basic.la \
1188         libsystemd-daemon.la
1189
1190 systemd_stdio_bridge_SOURCES = \
1191         src/bridge.c
1192
1193 systemd_stdio_bridge_LDADD = \
1194         libsystemd-basic.la
1195
1196 systemadm_SOURCES = \
1197         src/systemadm.vala \
1198         src/systemd-interfaces.vala
1199
1200 systemadm_CFLAGS = \
1201         $(AM_CFLAGS) \
1202         $(GTK_CFLAGS) \
1203         -Wno-unused-variable \
1204         -Wno-unused-function \
1205         -Wno-shadow \
1206         -Wno-format-nonliteral
1207
1208 systemadm_VALAFLAGS = \
1209         --pkg=posix \
1210         --pkg=gtk+-2.0 \
1211         -g
1212
1213 systemadm_LDADD = \
1214         $(GTK_LIBS)
1215
1216 systemd_gnome_ask_password_agent_SOURCES = \
1217         src/gnome-ask-password-agent.vala
1218
1219 systemd_gnome_ask_password_agent_CFLAGS = \
1220         $(AM_CFLAGS) \
1221         $(LIBNOTIFY_CFLAGS) \
1222         $(GTK_CFLAGS) \
1223         -Wno-unused-variable \
1224         -Wno-unused-function \
1225         -Wno-shadow \
1226         -Wno-format-nonliteral
1227
1228 systemd_gnome_ask_password_agent_VALAFLAGS = \
1229         --pkg=posix \
1230         --pkg=gtk+-2.0 \
1231         --pkg=linux \
1232         --pkg=gio-unix-2.0 \
1233         --pkg=libnotify
1234 if LIBNOTIFY07
1235 systemd_gnome_ask_password_agent_VALAFLAGS += \
1236         -D LIBNOTIFY07
1237 endif
1238 systemd_gnome_ask_password_agent_VALAFLAGS += \
1239         -g
1240
1241 systemd_gnome_ask_password_agent_LDADD = \
1242         $(LIBNOTIFY_LIBS) \
1243         $(GTK_LIBS)
1244
1245 systemd_tty_ask_password_agent_SOURCES = \
1246         src/tty-ask-password-agent.c \
1247         src/ask-password-api.c \
1248         src/utmp-wtmp.c
1249
1250 systemd_tty_ask_password_agent_LDADD = \
1251         libsystemd-basic.la
1252
1253 pam_systemd_la_SOURCES = \
1254         src/pam-module.c \
1255         src/dbus-common.c
1256
1257 pam_systemd_la_CFLAGS = \
1258         $(AM_CFLAGS) \
1259         $(PAM_CFLAGS) \
1260         $(DBUS_CFLAGS) \
1261         -fvisibility=hidden
1262
1263 pam_systemd_la_LDFLAGS = \
1264         -module \
1265         -export-dynamic \
1266         -avoid-version \
1267         -shared \
1268         -export-symbols-regex '^pam_sm_.*'
1269
1270 pam_systemd_la_LIBADD = \
1271         libsystemd-basic.la \
1272         libsystemd-daemon.la \
1273         $(PAM_LIBS) \
1274         $(DBUS_LIBS)
1275
1276 SED_PROCESS = \
1277         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1278         $(SED)  -e 's,@rootlibexecdir\@,$(rootlibexecdir),g' \
1279                 -e 's,@rootbindir\@,$(rootbindir),g' \
1280                 -e 's,@bindir\@,$(bindir),g' \
1281                 -e 's,@SYSTEMCTL\@,$(rootbindir)/systemctl,g' \
1282                 -e 's,@SYSTEMD_NOTIFY\@,$(rootbindir)/systemd-notify,g' \
1283                 -e 's,@pkgsysconfdir\@,$(pkgsysconfdir),g' \
1284                 -e 's,@pkgdatadir\@,$(pkgdatadir),g' \
1285                 -e 's,@pkglibexecdir\@,$(pkglibexecdir),g' \
1286                 -e 's,@systemunitdir\@,$(systemunitdir),g' \
1287                 -e 's,@userunitdir\@,$(userunitdir),g' \
1288                 -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
1289                 -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
1290                 -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' \
1291                 -e 's,@prefix\@,$(prefix),g' \
1292                 < $< > $@ || rm $@
1293
1294 units/%: units/%.in Makefile
1295         $(SED_PROCESS)
1296
1297 man/%: man/%.in Makefile
1298         $(SED_PROCESS)
1299
1300 %.pc: %.pc.in Makefile
1301         $(SED_PROCESS)
1302
1303 src/%.policy: src/%.policy.in Makefile
1304         $(SED_PROCESS)
1305
1306 M4_PROCESS_SYSTEM = \
1307         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1308         $(M4) -P $(M4_DISTRO_FLAG) -DFOR_SYSTEM=1 < $< > $@ || rm $@
1309
1310 M4_PROCESS_USER = \
1311         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1312         $(M4) -P $(M4_DISTRO_FLAG) -DFOR_USER=1 < $< > $@ || rm $@
1313
1314 units/%: units/%.m4 Makefile
1315         $(M4_PROCESS_SYSTEM)
1316
1317 units/user/%: units/%.m4 Makefile
1318         $(M4_PROCESS_USER)
1319
1320 CLEANFILES = \
1321         $(nodist_systemunit_DATA) \
1322         $(nodist_userunit_DATA) \
1323         $(nodist_man_MANS) \
1324         ${XML_IN_FILES:.xml.in=.html} \
1325         $(pkgconfigdata_DATA) \
1326         src/org.freedesktop.systemd1.policy
1327
1328 if HAVE_VALAC
1329 CLEANFILES += \
1330         ${systemadm_SOURCES:.vala=.c}
1331 endif
1332
1333 if HAVE_XSLTPROC
1334 XSLTPROC_FLAGS = \
1335         --nonet \
1336         --param funcsynopsis.style "'ansi'"
1337
1338 XSLTPROC_PROCESS_MAN = \
1339         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1340         $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
1341
1342 XSLTPROC_PROCESS_MAN_IN = \
1343         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1344         $(XSLTPROC) -o ${@:.in=} $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< && \
1345         mv ${@:.in=} $@
1346
1347 XSLTPROC_PROCESS_HTML = \
1348         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1349         $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $<
1350
1351 XSLTPROC_PROCESS_HTML_IN = \
1352         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1353         $(XSLTPROC) -o ${@:.in=} $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $< && \
1354         mv ${@:.in=} $@
1355
1356 man/%.1: man/%.xml
1357         $(XSLTPROC_PROCESS_MAN)
1358
1359 man/%.1.in: man/%.xml.in
1360         $(XSLTPROC_PROCESS_MAN)
1361
1362 man/%.3: man/%.xml
1363         $(XSLTPROC_PROCESS_MAN)
1364
1365 man/%.3.in: man/%.xml.in
1366         $(XSLTPROC_PROCESS_MAN)
1367
1368 man/%.5: man/%.xml
1369         $(XSLTPROC_PROCESS_MAN)
1370
1371 man/%.5.in: man/%.xml.in
1372         $(XSLTPROC_PROCESS_MAN)
1373
1374 man/%.7: man/%.xml
1375         $(XSLTPROC_PROCESS_MAN)
1376
1377 man/%.7.in: man/%.xml.in
1378         $(XSLTPROC_PROCESS_MAN_IN)
1379
1380 man/%.8: man/%.xml
1381         $(XSLTPROC_PROCESS_MAN)
1382
1383 man/%.8.in: man/%.xml.in
1384         $(XSLTPROC_PROCESS_MAN_IN)
1385
1386 man/%.html: man/%.xml
1387         $(XSLTPROC_PROCESS_HTML)
1388
1389 man/%.html.in: man/%.xml.in
1390         $(XSLTPROC_PROCESS_HTML_IN)
1391
1392 CLEANFILES += \
1393         $(dist_man_MANS) \
1394         ${nodist_man_MANS:=.in} \
1395         ${XML_FILES:.xml=.html} \
1396         ${XML_IN_FILES:.xml.in=.html.in}
1397 endif
1398
1399 DBUS_PREPROCESS = $(CPP) -P $(DBUS_CFLAGS) -imacros dbus/dbus-protocol.h
1400
1401 org.freedesktop.systemd1.%.xml: systemd
1402         $(AM_V_GEN)$(OBJCOPY) -O binary -j introspect.$* $< $@.tmp && \
1403                 $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
1404                 $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
1405
1406 org.freedesktop.hostname1.xml: systemd-hostnamed
1407         $(AM_V_GEN)$(OBJCOPY) -O binary -j introspect.hostname1 $< $@.tmp && \
1408                 $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
1409                 $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
1410
1411 org.freedesktop.locale1.xml: systemd-localed
1412         $(AM_V_GEN)$(OBJCOPY) -O binary -j introspect.locale1 $< $@.tmp && \
1413                 $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
1414                 $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
1415
1416 org.freedesktop.timedate1.xml: systemd-timedated
1417         $(AM_V_GEN)$(OBJCOPY) -O binary -j introspect.timedate1 $< $@.tmp && \
1418                 $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
1419                 $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
1420
1421 CLEANFILES += \
1422         $(dbusinterface_DATA)
1423
1424 install-data-hook:
1425         $(MKDIR_P) -m 0755 \
1426                 $(DESTDIR)$(tmpfilesdir) \
1427                 $(DESTDIR)$(sysconfdir)/tmpfiles.d \
1428                 $(DESTDIR)$(prefix)/lib/modules-load.d \
1429                 $(DESTDIR)$(sysconfdir)/modules-load.d \
1430                 $(DESTDIR)$(prefix)/lib/sysctl.d \
1431                 $(DESTDIR)$(sysconfdir)/sysctl.d \
1432                 $(DESTDIR)$(systemshutdowndir) \
1433                 $(DESTDIR)$(systemgeneratordir) \
1434                 $(DESTDIR)$(usergeneratordir)
1435 if ENABLE_BINFMT
1436         $(MKDIR_P) -m 0755 \
1437                 $(DESTDIR)$(prefix)/lib/binfmt.d \
1438                 $(DESTDIR)$(sysconfdir)/binfmt.d
1439 endif
1440         $(MKDIR_P) -m 0755 \
1441                 $(DESTDIR)$(systemunitdir) \
1442                 $(DESTDIR)$(userunitdir) \
1443                 $(DESTDIR)$(systemunitdir)/sysinit.target.wants \
1444                 $(DESTDIR)$(systemunitdir)/sockets.target.wants \
1445                 $(DESTDIR)$(systemunitdir)/basic.target.wants \
1446                 $(DESTDIR)$(systemunitdir)/shutdown.target.wants \
1447                 $(DESTDIR)$(systemunitdir)/local-fs.target.wants \
1448                 $(DESTDIR)$(systemunitdir)/runlevel1.target.wants \
1449                 $(DESTDIR)$(systemunitdir)/runlevel2.target.wants \
1450                 $(DESTDIR)$(systemunitdir)/runlevel3.target.wants \
1451                 $(DESTDIR)$(systemunitdir)/runlevel4.target.wants \
1452                 $(DESTDIR)$(systemunitdir)/runlevel5.target.wants \
1453                 $(DESTDIR)$(systemunitdir)/multi-user.target.wants \
1454                 $(DESTDIR)$(systemunitdir)/graphical.target.wants \
1455                 $(DESTDIR)$(pkgsysconfdir)/system \
1456                 $(DESTDIR)$(pkgsysconfdir)/system/sysinit.target.wants \
1457                 $(DESTDIR)$(pkgsysconfdir)/system/local-fs.target.wants \
1458                 $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants \
1459                 $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants \
1460                 $(DESTDIR)$(pkgsysconfdir)/user \
1461                 $(DESTDIR)$(dbussessionservicedir) \
1462                 $(DESTDIR)$(sysconfdir)/xdg/systemd
1463         ( cd $(DESTDIR)$(sysconfdir)/xdg/systemd/ && \
1464                 rm -f user && \
1465                 $(LN_S) $(pkgsysconfdir)/user user )
1466         ( cd $(DESTDIR)$(systemunitdir)/sockets.target.wants && \
1467                 rm -f systemd-initctl.socket systemd-logger.socket systemd-shutdownd.socket syslog.socket && \
1468                 $(LN_S) ../systemd-logger.socket systemd-logger.socket && \
1469                 $(LN_S) ../systemd-initctl.socket systemd-initctl.socket && \
1470                 $(LN_S) ../systemd-shutdownd.socket systemd-shutdownd.socket && \
1471                 $(LN_S) ../syslog.socket syslog.socket )
1472         ( cd $(DESTDIR)$(systemunitdir)/runlevel1.target.wants && \
1473                 rm -f systemd-update-utmp-runlevel.service && \
1474                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
1475         ( cd $(DESTDIR)$(systemunitdir)/runlevel2.target.wants && \
1476                 rm -f systemd-update-utmp-runlevel.service && \
1477                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
1478         ( cd $(DESTDIR)$(systemunitdir)/runlevel3.target.wants && \
1479                 rm -f systemd-update-utmp-runlevel.service && \
1480                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
1481         ( cd $(DESTDIR)$(systemunitdir)/runlevel4.target.wants && \
1482                 rm -f systemd-update-utmp-runlevel.service && \
1483                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
1484         ( cd $(DESTDIR)$(systemunitdir)/runlevel5.target.wants && \
1485                 rm -f systemd-update-utmp-runlevel.service && \
1486                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
1487         ( cd $(DESTDIR)$(systemunitdir)/shutdown.target.wants && \
1488                 rm -f systemd-update-utmp-shutdown.service \
1489                         systemd-random-seed-save.service && \
1490                 $(LN_S) ../systemd-update-utmp-shutdown.service systemd-update-utmp-shutdown.service && \
1491                 $(LN_S) ../systemd-random-seed-save.service systemd-random-seed-save.service )
1492         ( cd $(DESTDIR)$(systemunitdir)/local-fs.target.wants && \
1493                 rm -f systemd-remount-api-vfs.service \
1494                         fsck-root.service \
1495                         remount-rootfs.service \
1496                         var-run.mount \
1497                         media.mount && \
1498                 $(LN_S) ../systemd-remount-api-vfs.service systemd-remount-api-vfs.service && \
1499                 $(LN_S) ../fsck-root.service fsck-root.service && \
1500                 $(LN_S) ../remount-rootfs.service remount-rootfs.service && \
1501                 $(LN_S) ../var-run.mount var-run.mount && \
1502                 $(LN_S) ../media.mount media.mount )
1503         ( cd $(DESTDIR)$(userunitdir) && \
1504                 rm -f shutdown.target sockets.target bluetooth.target printer.target sound.target && \
1505                 $(LN_S) $(systemunitdir)/shutdown.target shutdown.target && \
1506                 $(LN_S) $(systemunitdir)/sockets.target sockets.target && \
1507                 $(LN_S) $(systemunitdir)/bluetooth.target bluetooth.target && \
1508                 $(LN_S) $(systemunitdir)/printer.target printer.target && \
1509                 $(LN_S) $(systemunitdir)/sound.target sound.target )
1510         ( cd $(DESTDIR)$(systemunitdir) && \
1511                 rm -f runlevel0.target runlevel1.target runlevel2.target runlevel3.target runlevel4.target runlevel5.target runlevel6.target && \
1512                 $(LN_S) poweroff.target runlevel0.target && \
1513                 $(LN_S) rescue.target runlevel1.target && \
1514                 $(LN_S) multi-user.target runlevel2.target && \
1515                 $(LN_S) multi-user.target runlevel3.target && \
1516                 $(LN_S) multi-user.target runlevel4.target && \
1517                 $(LN_S) graphical.target runlevel5.target && \
1518                 $(LN_S) reboot.target runlevel6.target )
1519         ( cd $(DESTDIR)$(systemunitdir) && \
1520                 rm -f default.target ctrl-alt-del.target dbus-org.freedesktop.hostname1.service dbus-org.freedesktop.locale1.service dbus-org.freedesktop.timedate1.service dbus-org.freedesktop.login1.service autovt@.service && \
1521                 $(LN_S) graphical.target default.target && \
1522                 $(LN_S) reboot.target ctrl-alt-del.target && \
1523                 $(LN_S) systemd-hostnamed.service dbus-org.freedesktop.hostname1.service && \
1524                 $(LN_S) systemd-localed.service dbus-org.freedesktop.locale1.service && \
1525                 $(LN_S) systemd-timedated.service dbus-org.freedesktop.timedate1.service && \
1526                 $(LN_S) systemd-logind.service dbus-org.freedesktop.login1.service && \
1527                 $(LN_S) getty@.service autovt@.service )
1528         ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
1529                 rm -f getty.target systemd-user-sessions.service systemd-ask-password-wall.path systemd-logind.service && \
1530                 $(LN_S) ../getty.target getty.target && \
1531                 $(LN_S) ../systemd-user-sessions.service systemd-user-sessions.service && \
1532                 $(LN_S) ../systemd-ask-password-wall.path systemd-ask-password-wall.path && \
1533                 $(LN_S) ../systemd-logind.service systemd-logind.service )
1534         ( cd $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants && \
1535                 rm -f getty@tty1.service && \
1536                 $(LN_S) $(systemunitdir)/getty@.service getty@tty1.service )
1537         ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
1538                 rm -f remote-fs.target && \
1539                 $(LN_S) $(systemunitdir)/remote-fs.target remote-fs.target )
1540         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
1541                 rm -f dev-hugepages.automount \
1542                         dev-mqueue.automount \
1543                         sys-kernel-debug.automount \
1544                         sys-kernel-security.automount \
1545                         systemd-vconsole-setup.service \
1546                         systemd-modules-load.service \
1547                         systemd-random-seed-load.service \
1548                         systemd-tmpfiles-setup.service \
1549                         systemd-sysctl.service \
1550                         systemd-ask-password-console.path \
1551                         systemd-kmsg-syslogd.service \
1552                         cryptsetup.target && \
1553                 $(LN_S) ../dev-hugepages.automount dev-hugepages.automount && \
1554                 $(LN_S) ../dev-mqueue.automount dev-mqueue.automount && \
1555                 $(LN_S) ../sys-kernel-debug.automount sys-kernel-debug.automount && \
1556                 $(LN_S) ../sys-kernel-security.automount sys-kernel-security.automount && \
1557                 $(LN_S) ../systemd-vconsole-setup.service systemd-vconsole-setup.service && \
1558                 $(LN_S) ../systemd-modules-load.service systemd-modules-load.service && \
1559                 $(LN_S) ../systemd-random-seed-load.service systemd-random-seed-load.service && \
1560                 $(LN_S) ../systemd-tmpfiles-setup.service systemd-tmpfiles-setup.service && \
1561                 $(LN_S) ../systemd-sysctl.service systemd-sysctl.service && \
1562                 $(LN_S) ../systemd-ask-password-console.path systemd-ask-password-console.path && \
1563                 $(LN_S) ../systemd-kmsg-syslogd.service && \
1564                 $(LN_S) ../cryptsetup.target cryptsetup.target )
1565 if ENABLE_BINFMT
1566         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
1567                 rm -f systemd-binfmt.service \
1568                         proc-sys-fs-binfmt_misc.automount && \
1569                 $(LN_S) ../systemd-binfmt.service systemd-binfmt.service && \
1570                 $(LN_S) ../proc-sys-fs-binfmt_misc.automount proc-sys-fs-binfmt_misc.automount )
1571 endif
1572         ( cd $(DESTDIR)$(systemunitdir)/basic.target.wants && \
1573                 rm -f systemd-tmpfiles-clean.timer && \
1574                 $(LN_S) ../systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.timer )
1575         ( cd $(DESTDIR)$(dbussessionservicedir) && \
1576                 rm -f org.freedesktop.systemd1.service && \
1577                 $(LN_S) ../system-services/org.freedesktop.systemd1.service org.freedesktop.systemd1.service )
1578 if HAVE_PLYMOUTH
1579         $(MKDIR_P) -m 0755 \
1580                 $(DESTDIR)$(SYSTEM_SYSVINIT_PATH) \
1581                 $(DESTDIR)$(systemunitdir)/reboot.target.wants \
1582                 $(DESTDIR)$(systemunitdir)/kexec.target.wants \
1583                 $(DESTDIR)$(systemunitdir)/poweroff.target.wants \
1584                 $(DESTDIR)$(systemunitdir)/halt.target.wants
1585         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
1586                 rm -f plymouth-start.service plymouth-read-write.service && \
1587                 $(LN_S) ../plymouth-start.service plymouth-start.service && \
1588                 $(LN_S) ../plymouth-read-write.service plymouth-read-write.service )
1589         ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
1590                 rm -f plymouth-quit.service plymouth-quit-wait.service && \
1591                 $(LN_S) ../plymouth-quit.service plymouth-quit.service && \
1592                 $(LN_S) ../plymouth-quit-wait.service plymouth-quit-wait.service )
1593         ( cd $(DESTDIR)$(systemunitdir)/reboot.target.wants && \
1594                 rm -f plymouth-reboot.service && \
1595                 $(LN_S) ../plymouth-reboot.service plymouth-reboot.service )
1596         ( cd $(DESTDIR)$(systemunitdir)/kexec.target.wants && \
1597                 rm -f plymouth-kexec.service && \
1598                 $(LN_S) ../plymouth-kexec.service plymouth-kexec.service )
1599         ( cd $(DESTDIR)$(systemunitdir)/poweroff.target.wants && \
1600                 rm -f plymouth-poweroff.service && \
1601                 $(LN_S) ../plymouth-poweroff.service plymouth-poweroff.service )
1602         ( cd $(DESTDIR)$(systemunitdir)/halt.target.wants && \
1603                 rm -f plymouth-halt.service && \
1604                 $(LN_S) ../plymouth-halt.service plymouth-halt.service )
1605 endif
1606 if TARGET_MEEGO
1607         $(MKDIR_P) -m 0755 $(DESTDIR)$(systemunitdir)/final.target.wants
1608         ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
1609                 rm -f network.target && \
1610                 $(LN_S) $(systemunitdir)/network.target network.target )
1611         ( cd $(DESTDIR)$(pkgsysconfdir)/system/sysinit.target.wants && \
1612                 rm -f * )
1613         ( cd $(DESTDIR)$(pkgsysconfdir)/system/local-fs.target.wants && \
1614                 rm -f * )
1615         ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
1616                 rm -f * )
1617         ( cd $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants && \
1618                 rm -f * )
1619 endif
1620
1621 if TARGET_FEDORA
1622         $(MKDIR_P) -m 0755 $(DESTDIR)$(systemunitdir)/final.target.wants
1623         ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
1624                 rm -f rc-local.service && \
1625                 $(LN_S) $(systemunitdir)/rc-local.service rc-local.service )
1626         ( cd $(DESTDIR)$(systemunitdir)/final.target.wants && \
1627                 rm -f halt-local.service && \
1628                 $(LN_S) $(systemunitdir)/halt-local.service halt-local.service )
1629         ( cd $(DESTDIR)$(systemunitdir) && \
1630                 rm -f display-manager.service single.service && \
1631                 $(LN_S) prefdm.service display-manager.service && \
1632                 $(LN_S) rescue.service single.service )
1633         ( cd $(DESTDIR)$(systemunitdir)/graphical.target.wants && \
1634                 rm -f display-manager.service && \
1635                 $(LN_S) $(systemunitdir)/display-manager.service display-manager.service )
1636 endif
1637
1638 if TARGET_MANDRIVA
1639         $(MKDIR_P) -m 0755 $(DESTDIR)$(systemunitdir)/final.target.wants
1640         ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
1641                 rm -f rc-local.service && \
1642                 $(LN_S) $(systemunitdir)/rc-local.service rc-local.service )
1643         ( cd $(DESTDIR)$(systemunitdir)/final.target.wants && \
1644                 rm -f halt-local.service && \
1645                 $(LN_S) $(systemunitdir)/halt-local.service halt-local.service )
1646         ( cd $(DESTDIR)$(systemunitdir) && \
1647                 rm -f display-manager.service dm.service single.service && \
1648                 $(LN_S) prefdm.service display-manager.service && \
1649                 $(LN_S) prefdm.service dm.service && \
1650                 $(LN_S) rescue.service single.service )
1651         ( cd $(DESTDIR)$(systemunitdir)/graphical.target.wants && \
1652                 rm -f display-manager.service && \
1653                 $(LN_S) $(systemunitdir)/display-manager.service display-manager.service )
1654 endif
1655
1656 if TARGET_DEBIAN_OR_UBUNTU
1657         ( cd $(DESTDIR)$(systemunitdir) && \
1658                 rm -f runlevel5.target && \
1659                 $(LN_S) multi-user.target runlevel5.target )
1660 endif
1661
1662 if HAVE_SYSV_COMPAT
1663         ( cd $(DESTDIR)$(systemunitdir)/local-fs.target.wants && \
1664                 rm -f var-lock.mount && \
1665                 $(LN_S) ../var-lock.mount var-lock.mount )
1666 endif
1667
1668 DISTCHECK_CONFIGURE_FLAGS = \
1669         --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
1670         --with-dbussessionservicedir=$$dc_install_base/$(dbussessionservicedir) \
1671         --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
1672         --with-dbusinterfacedir=$$dc_install_base/$(dbusinterfacedir) \
1673         --with-udevrulesdir=$$dc_install_base/$(udevrulesdir) \
1674         --with-pamlibdir=$$dc_install_base/$(pamlibdir) \
1675         --with-rootdir=$$dc_install_base/$(rootdir)
1676
1677 upload: all distcheck
1678         cp -v systemd-$(VERSION).tar.bz2 /home/lennart/git.fedora/systemd/
1679         scp systemd-$(VERSION).tar.bz2 fdo:/srv/www.freedesktop.org/www/software/systemd/
1680         scp man/*.html tango:public/systemd-man/
1681
1682 git-tag:
1683         git tag "v$(VERSION)" -m "systemd $(VERSION)"