chiark / gitweb /
journal: fix memleak, call set_free before return
[elogind.git] / Makefile.am
1 #  -*- Mode: makefile; indent-tabs-mode: t -*- */
2 #
3 #  This file is part of systemd.
4 #
5 #  Copyright 2010-2012 Lennart Poettering
6 #  Copyright 2010-2012 Kay Sievers
7 #
8 #  systemd is free software; you can redistribute it and/or modify it
9 #  under the terms of the GNU Lesser General Public License as published by
10 #  the Free Software Foundation; either version 2.1 of the License, or
11 #  (at your option) any later version.
12 #
13 #  systemd is distributed in the hope that it will be useful, but
14 #  WITHOUT ANY WARRANTY; without even the implied warranty of
15 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 #  Lesser General Public License for more details.
17 #
18 #  You should have received a copy of the GNU Lesser General Public License
19 #  along with systemd; If not, see <http://www.gnu.org/licenses/>.
20
21 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
22 AM_MAKEFLAGS = --no-print-directory
23
24 SUBDIRS = . po
25
26 # remove targets if the command fails
27 .DELETE_ON_ERROR:
28
29 LIBUDEV_CURRENT=3
30 LIBUDEV_REVISION=0
31 LIBUDEV_AGE=2
32
33 LIBGUDEV_CURRENT=1
34 LIBGUDEV_REVISION=2
35 LIBGUDEV_AGE=1
36
37 LIBSYSTEMD_LOGIN_CURRENT=3
38 LIBSYSTEMD_LOGIN_REVISION=9
39 LIBSYSTEMD_LOGIN_AGE=3
40
41 LIBSYSTEMD_DAEMON_CURRENT=0
42 LIBSYSTEMD_DAEMON_REVISION=5
43 LIBSYSTEMD_DAEMON_AGE=0
44
45 LIBSYSTEMD_ID128_CURRENT=0
46 LIBSYSTEMD_ID128_REVISION=15
47 LIBSYSTEMD_ID128_AGE=0
48
49 LIBSYSTEMD_JOURNAL_CURRENT=6
50 LIBSYSTEMD_JOURNAL_REVISION=0
51 LIBSYSTEMD_JOURNAL_AGE=6
52
53 # Dirs of external packages
54 dbuspolicydir=@dbuspolicydir@
55 dbussessionservicedir=@dbussessionservicedir@
56 dbussystemservicedir=@dbussystemservicedir@
57 dbusinterfacedir=@dbusinterfacedir@
58 pamlibdir=@pamlibdir@
59 pkgconfigdatadir=$(datadir)/pkgconfig
60 pkgconfiglibdir=$(libdir)/pkgconfig
61 polkitpolicydir=$(datadir)/polkit-1/actions
62 bashcompletiondir=$(sysconfdir)/bash_completion.d
63 rpmmacrosdir=$(sysconfdir)/rpm
64 sysvinitdir=$(SYSTEM_SYSVINIT_PATH)
65 varlogdir=$(localstatedir)/log
66
67 # Our own, non-special dirs
68 pkgsysconfdir=$(sysconfdir)/systemd
69 userunitdir=$(prefix)/lib/systemd/user
70 userpresetdir=$(prefix)/lib/systemd/user-preset
71 tmpfilesdir=$(prefix)/lib/tmpfiles.d
72 sysctldir=$(prefix)/lib/sysctl.d
73 usergeneratordir=$(prefix)/lib/systemd/user-generators
74 pkgincludedir=$(includedir)/systemd
75 systemgeneratordir=$(rootlibexecdir)/system-generators
76 systemshutdowndir=$(rootlibexecdir)/system-shutdown
77 systemsleepdir=$(rootlibexecdir)/system-sleep
78 systemunitdir=$(rootprefix)/lib/systemd/system
79 systempresetdir=$(rootprefix)/lib/systemd/system-preset
80 udevlibexecdir=$(rootprefix)/lib/udev
81 udevhomedir = $(udevlibexecdir)
82 udevrulesdir = $(udevlibexecdir)/rules.d
83 udevhwdbdir = $(udevlibexecdir)/hwdb.d
84
85 # And these are the special ones for /
86 rootprefix=@rootprefix@
87 rootbindir=$(rootprefix)/bin
88 rootlibexecdir=$(rootprefix)/lib/systemd
89
90 CLEANFILES = $(BUILT_SOURCES)
91 EXTRA_DIST =
92 BUILT_SOURCES =
93 INSTALL_EXEC_HOOKS =
94 UNINSTALL_EXEC_HOOKS =
95 INSTALL_DATA_HOOKS =
96 DISTCLEAN_LOCAL_HOOKS =
97 pkginclude_HEADERS =
98 noinst_LTLIBRARIES =
99 lib_LTLIBRARIES =
100 include_HEADERS =
101 pkgconfiglib_DATA =
102 polkitpolicy_in_files =
103 polkitpolicy_files =
104 dist_udevrules_DATA =
105 nodist_udevrules_DATA =
106 dist_man_MANS =
107 dist_pkgsysconf_DATA =
108 dist_pkgdata_DATA =
109 dist_dbuspolicy_DATA =
110 dbusinterface_DATA =
111 dist_dbussystemservice_DATA =
112 check_PROGRAMS =
113 check_DATA =
114 noinst_PROGRAMS =
115 TESTS =
116 udevlibexec_PROGRAMS =
117
118 AM_CPPFLAGS = \
119         -include $(top_builddir)/config.h \
120         -DSYSCONFDIR=\""$(sysconfdir)"\" \
121         -DSYSTEM_CONFIG_FILE=\"$(pkgsysconfdir)/system.conf\" \
122         -DSYSTEM_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/system\" \
123         -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" \
124         -DSYSTEM_SYSVINIT_PATH=\"$(SYSTEM_SYSVINIT_PATH)\" \
125         -DSYSTEM_SYSVRCND_PATH=\"$(SYSTEM_SYSVRCND_PATH)\" \
126         -DUSER_CONFIG_FILE=\"$(pkgsysconfdir)/user.conf\" \
127         -DUSER_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/user\" \
128         -DUSER_DATA_UNIT_PATH=\"$(userunitdir)\" \
129         -DSYSTEMD_CGROUP_AGENT_PATH=\"$(rootlibexecdir)/systemd-cgroups-agent\" \
130         -DSYSTEMD_BINARY_PATH=\"$(rootlibexecdir)/systemd\" \
131         -DSYSTEMD_SHUTDOWN_BINARY_PATH=\"$(rootlibexecdir)/systemd-shutdown\" \
132         -DSYSTEMD_SLEEP_BINARY_PATH=\"$(rootlibexecdir)/systemd-sleep\" \
133         -DSYSTEMCTL_BINARY_PATH=\"$(rootbindir)/systemctl\" \
134         -DSYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH=\"$(rootbindir)/systemd-tty-ask-password-agent\" \
135         -DSYSTEMD_STDIO_BRIDGE_BINARY_PATH=\"$(bindir)/systemd-stdio-bridge\" \
136         -DROOTPREFIX=\"$(rootprefix)\" \
137         -DRUNTIME_DIR=\"/run\" \
138         -DRANDOM_SEED=\"$(localstatedir)/lib/random-seed\" \
139         -DSYSTEMD_CRYPTSETUP_PATH=\"$(rootlibexecdir)/systemd-cryptsetup\" \
140         -DSYSTEM_GENERATOR_PATH=\"$(systemgeneratordir)\" \
141         -DUSER_GENERATOR_PATH=\"$(usergeneratordir)\" \
142         -DSYSTEM_SHUTDOWN_PATH=\"$(systemshutdowndir)\" \
143         -DSYSTEM_SLEEP_PATH=\"$(systemsleepdir)\" \
144         -DSYSTEMD_KBD_MODEL_MAP=\"$(pkgdatadir)/kbd-model-map\" \
145         -DX_SERVER=\"$(bindir)/X\" \
146         -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\" \
147         -DPOLKIT_AGENT_BINARY_PATH=\"$(bindir)/pkttyagent\" \
148         -I $(top_srcdir)/src \
149         -I $(top_srcdir)/src/shared \
150         -I $(top_srcdir)/src/login \
151         -I $(top_srcdir)/src/journal \
152         -I $(top_srcdir)/src/systemd \
153         -I $(top_builddir)/src/core \
154         -I $(top_srcdir)/src/core \
155         -I $(top_srcdir)/src/libudev \
156         -I $(top_srcdir)/src/udev \
157         $(OUR_CPPFLAGS)
158
159 AM_CFLAGS = $(OUR_CFLAGS)
160 AM_LDFLAGS = $(OUR_LDFLAGS)
161
162 # ------------------------------------------------------------------------------
163 if TARGET_GENTOO
164 AM_CPPFLAGS += \
165         -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
166         -DKBD_SETFONT=\"/usr/bin/setfont\"
167 else
168 if TARGET_ARCH
169 AM_CPPFLAGS += \
170         -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
171         -DKBD_SETFONT=\"/usr/bin/setfont\"
172 else
173 if TARGET_FRUGALWARE
174 AM_CPPFLAGS += \
175         -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
176         -DKBD_SETFONT=\"/usr/bin/setfont\"
177 else
178 if TARGET_MANDRIVA
179 AM_CPPFLAGS += \
180         -DKBD_LOADKEYS=\"/bin/loadkeys\" \
181         -DKBD_SETFONT=\"/bin/setfont\"
182 else
183 if TARGET_ANGSTROM
184 AM_CPPFLAGS += \
185         -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
186         -DKBD_SETFONT=\"/usr/bin/setfont\"
187 else
188 if TARGET_MAGEIA
189 AM_CPPFLAGS += \
190         -DKBD_LOADKEYS=\"/bin/loadkeys\" \
191         -DKBD_SETFONT=\"/bin/setfont\"
192 else
193 AM_CPPFLAGS += \
194         -DKBD_LOADKEYS=\"/bin/loadkeys\" \
195         -DKBD_SETFONT=\"/bin/setfont\"
196 endif
197 endif
198 endif
199 endif
200 endif
201 endif
202
203 # ------------------------------------------------------------------------------
204 rootbin_PROGRAMS = \
205         systemctl \
206         systemd-notify \
207         systemd-ask-password \
208         systemd-tty-ask-password-agent \
209         systemd-tmpfiles \
210         systemd-machine-id-setup
211
212 bin_PROGRAMS = \
213         systemd-cgls \
214         systemd-cgtop \
215         systemd-stdio-bridge \
216         systemd-nspawn \
217         systemd-detect-virt \
218         systemd-delta
219
220 dist_bin_SCRIPTS = \
221         src/analyze/systemd-analyze
222
223 rootlibexec_PROGRAMS = \
224         systemd \
225         systemd-cgroups-agent \
226         systemd-initctl \
227         systemd-update-utmp \
228         systemd-shutdownd \
229         systemd-shutdown \
230         systemd-modules-load \
231         systemd-remount-fs \
232         systemd-reply-password \
233         systemd-fsck \
234         systemd-timestamp \
235         systemd-ac-power \
236         systemd-sysctl \
237         systemd-sleep
238
239 systemgenerator_PROGRAMS = \
240         systemd-getty-generator \
241         systemd-fstab-generator \
242         systemd-system-update-generator
243
244 dist_bashcompletion_DATA = \
245         bash-completion/systemd-bash-completion.sh
246
247 dist_tmpfiles_DATA = \
248         tmpfiles.d/systemd.conf \
249         tmpfiles.d/tmp.conf \
250         tmpfiles.d/x11.conf
251
252 if HAVE_SYSV_COMPAT
253 dist_tmpfiles_DATA += \
254         tmpfiles.d/legacy.conf
255 endif
256
257 dist_systemunit_DATA = \
258         units/graphical.target \
259         units/multi-user.target \
260         units/emergency.service \
261         units/emergency.target \
262         units/sysinit.target \
263         units/basic.target \
264         units/getty.target \
265         units/halt.target \
266         units/kexec.target \
267         units/local-fs.target \
268         units/local-fs-pre.target \
269         units/remote-fs.target \
270         units/remote-fs-pre.target \
271         units/network.target \
272         units/nss-lookup.target \
273         units/nss-user-lookup.target \
274         units/mail-transfer-agent.target \
275         units/hibernate.target \
276         units/hybrid-sleep.target \
277         units/http-daemon.target \
278         units/poweroff.target \
279         units/reboot.target \
280         units/rescue.target \
281         units/rpcbind.target \
282         units/time-sync.target \
283         units/shutdown.target \
284         units/final.target \
285         units/umount.target \
286         units/sigpwr.target \
287         units/sleep.target \
288         units/sockets.target \
289         units/suspend.target \
290         units/swap.target \
291         units/systemd-initctl.socket \
292         units/systemd-shutdownd.socket \
293         units/syslog.socket \
294         units/dev-hugepages.mount \
295         units/dev-mqueue.mount \
296         units/sys-kernel-config.mount \
297         units/sys-kernel-debug.mount \
298         units/sys-fs-fuse-connections.mount \
299         units/tmp.mount \
300         units/printer.target \
301         units/sound.target \
302         units/bluetooth.target \
303         units/smartcard.target \
304         units/systemd-tmpfiles-clean.timer \
305         units/quotaon.service \
306         units/systemd-ask-password-wall.path \
307         units/systemd-ask-password-console.path \
308         units/syslog.target \
309         units/systemd-udevd-control.socket \
310         units/systemd-udevd-kernel.socket \
311         units/system-update.target
312
313 nodist_systemunit_DATA = \
314         units/getty@.service \
315         units/serial-getty@.service \
316         units/console-shell.service \
317         units/console-getty.service \
318         units/systemd-initctl.service \
319         units/systemd-shutdownd.service \
320         units/systemd-modules-load.service \
321         units/systemd-remount-fs.service \
322         units/systemd-update-utmp-runlevel.service \
323         units/systemd-update-utmp-shutdown.service \
324         units/systemd-tmpfiles-setup.service \
325         units/systemd-tmpfiles-clean.service \
326         units/systemd-ask-password-wall.service \
327         units/systemd-ask-password-console.service \
328         units/systemd-sysctl.service \
329         units/emergency.service \
330         units/rescue.service \
331         units/user@.service \
332         units/systemd-hibernate.service \
333         units/systemd-hybrid-sleep.service \
334         units/systemd-suspend.service \
335         units/systemd-halt.service \
336         units/systemd-poweroff.service \
337         units/systemd-reboot.service \
338         units/systemd-kexec.service \
339         units/systemd-fsck@.service \
340         units/systemd-fsck-root.service \
341         units/systemd-udevd.service \
342         units/systemd-udev-trigger.service \
343         units/systemd-udev-settle.service \
344         units/debug-shell.service
345
346 dist_userunit_DATA = \
347         units/user/default.target \
348         units/user/exit.target
349
350 nodist_userunit_DATA = \
351         units/user/systemd-exit.service
352
353 EXTRA_DIST += \
354         units/getty@.service.m4 \
355         units/serial-getty@.service.m4 \
356         units/console-shell.service.m4.in \
357         units/console-getty.service.m4.in \
358         units/rescue.service.m4.in \
359         units/systemd-initctl.service.in \
360         units/systemd-shutdownd.service.in \
361         units/systemd-modules-load.service.in \
362         units/systemd-remount-fs.service.in \
363         units/systemd-update-utmp-runlevel.service.in \
364         units/systemd-update-utmp-shutdown.service.in \
365         units/systemd-tmpfiles-setup.service.in \
366         units/systemd-tmpfiles-clean.service.in \
367         units/systemd-ask-password-wall.service.in \
368         units/systemd-ask-password-console.service.in \
369         units/systemd-sysctl.service.in \
370         units/emergency.service.in \
371         units/systemd-halt.service.in \
372         units/systemd-poweroff.service.in \
373         units/systemd-reboot.service.in \
374         units/systemd-kexec.service.in \
375         units/user/systemd-exit.service.in \
376         units/systemd-fsck@.service.in \
377         units/systemd-fsck-root.service.in \
378         units/user@.service.in \
379         units/systemd-udevd.service \
380         units/systemd-udev-trigger.service \
381         units/systemd-udev-settle.service \
382         units/debug-shell.service.in \
383         units/systemd-hibernate.service.in \
384         units/systemd-hybrid-sleep.service.in \
385         units/systemd-suspend.service.in \
386         units/quotaon.service.in \
387         introspect.awk \
388         man/custom-html.xsl
389
390 if TARGET_FEDORA
391 dist_systemunit_DATA += \
392         units/fedora/rc-local.service \
393         units/fedora/halt-local.service
394 systemgenerator_PROGRAMS += \
395         systemd-rc-local-generator
396 endif
397
398 if TARGET_MANDRIVA
399 dist_systemunit_DATA += \
400         units/fedora/rc-local.service \
401         units/fedora/halt-local.service
402 systemgenerator_PROGRAMS += \
403         systemd-rc-local-generator
404 endif
405
406 if TARGET_FRUGALWARE
407 dist_systemunit_DATA += \
408         units/frugalware/display-manager.service
409 endif
410
411 if TARGET_SUSE
412 dist_systemunit_DATA += \
413         units/suse/rc-local.service \
414         units/suse/halt-local.service
415 systemgenerator_PROGRAMS += \
416         systemd-rc-local-generator
417 endif
418
419 if TARGET_MAGEIA
420 dist_systemunit_DATA += \
421         units/fedora/rc-local.service \
422         units/fedora/halt-local.service
423 systemgenerator_PROGRAMS += \
424         systemd-rc-local-generator
425 endif
426
427 dist_doc_DATA = \
428         README \
429         NEWS \
430         LICENSE.LGPL2.1 \
431         LICENSE.GPL2 \
432         LICENSE.MIT \
433         DISTRO_PORTING
434
435 @INTLTOOL_POLICY_RULE@
436
437 # ------------------------------------------------------------------------------
438 MANPAGES = \
439         man/systemd.1 \
440         man/systemctl.1 \
441         man/systemd-cgls.1 \
442         man/systemd-delta.1 \
443         man/systemd-cgtop.1 \
444         man/systemd-nspawn.1 \
445         man/systemd-tmpfiles.8 \
446         man/systemd-notify.1 \
447         man/systemd.unit.5 \
448         man/systemd.service.5 \
449         man/systemd.socket.5 \
450         man/systemd.mount.5 \
451         man/systemd.automount.5 \
452         man/systemd.swap.5 \
453         man/systemd.timer.5 \
454         man/systemd.path.5 \
455         man/systemd.target.5 \
456         man/systemd.device.5 \
457         man/systemd.snapshot.5 \
458         man/systemd.exec.5 \
459         man/systemd.kill.5 \
460         man/systemd.special.7 \
461         man/systemd.journal-fields.7 \
462         man/kernel-command-line.7 \
463         man/daemon.7 \
464         man/bootup.7 \
465         man/runlevel.8 \
466         man/telinit.8 \
467         man/halt.8 \
468         man/shutdown.8 \
469         man/pam_systemd.8 \
470         man/systemd.conf.5 \
471         man/tmpfiles.d.5 \
472         man/hostname.5 \
473         man/localtime.5 \
474         man/machine-id.5 \
475         man/locale.conf.5 \
476         man/os-release.5 \
477         man/machine-info.5 \
478         man/modules-load.d.5 \
479         man/systemd-modules-load.service.8 \
480         man/sysctl.d.5 \
481         man/systemd-sysctl.service.8 \
482         man/systemd-ask-password.1 \
483         man/systemd-cat.1 \
484         man/systemd-machine-id-setup.1 \
485         man/systemd-detect-virt.1 \
486         man/journald.conf.5 \
487         man/systemd-journald.service.8 \
488         man/journalctl.1 \
489         man/systemd-coredumpctl.1 \
490         man/systemd-inhibit.1 \
491         man/systemd-remount-fs.service.8 \
492         man/systemd-update-utmp-runlevel.service.8 \
493         man/systemd-initctl.service.8 \
494         man/systemd-shutdownd.service.8 \
495         man/systemd-suspend.service.8 \
496         man/systemd-halt.service.8 \
497         man/systemd-fsck@.service.8 \
498         man/systemd-ask-password-console.service.8 \
499         man/systemd-analyze.1 \
500         man/systemd-tty-ask-password-agent.1 \
501         man/systemd-getty-generator.8 \
502         man/systemd-system-update-generator.8 \
503         man/systemd-fstab-generator.8 \
504         man/systemd.preset.5 \
505         man/sd-id128.3 \
506         man/sd_id128_to_string.3 \
507         man/sd_id128_randomize.3 \
508         man/sd_id128_get_machine.3 \
509         man/sd-journal.3 \
510         man/sd_journal_print.3 \
511         man/sd_journal_stream_fd.3 \
512         man/sd_journal_open.3 \
513         man/sd_journal_next.3 \
514         man/sd_journal_get_data.3 \
515         man/sd_journal_get_realtime_usec.3 \
516         man/sd_journal_get_cutoff_realtime_usec.3 \
517         man/sd_journal_get_cursor.3 \
518         man/sd_journal_get_fd.3 \
519         man/sd_journal_get_usage.3 \
520         man/sd_journal_add_match.3 \
521         man/sd_journal_seek_head.3 \
522         man/sd_journal_query_unique.3
523
524 MANPAGES_ALIAS = \
525         man/reboot.8 \
526         man/poweroff.8 \
527         man/init.1 \
528         man/systemd-modules-load.8 \
529         man/systemd-sysctl.8 \
530         man/systemd-journald.socket.8 \
531         man/systemd-journald.8 \
532         man/systemd-remount-fs.8 \
533         man/systemd-update-utmp-shutdown.service.8 \
534         man/systemd-update-utmp.8 \
535         man/systemd-initctl.socket.8 \
536         man/systemd-initctl.8 \
537         man/systemd-shutdownd.socket.8 \
538         man/systemd-shutdownd.8 \
539         man/systemd-hibernate.service.8 \
540         man/systemd-hybrid-sleep.service.8 \
541         man/systemd-sleep.8 \
542         man/systemd-shutdown.8 \
543         man/systemd-poweroff.service.8 \
544         man/systemd-reboot.service.8 \
545         man/systemd-kexec.service.8 \
546         man/systemd-fsck.8 \
547         man/systemd-fsck-root.service.8 \
548         man/systemd-ask-password-console.path.8 \
549         man/systemd-ask-password-wall.service.8 \
550         man/systemd-ask-password-wall.path.8 \
551         man/systemd-tmpfiles-setup.service.8 \
552         man/systemd-tmpfiles-clean.service.8 \
553         man/systemd-tmpfiles-clean.timer.8 \
554         man/sd_id128_t.3 \
555         man/SD_ID128_MAKE.3 \
556         man/SD_ID128_CONST_STR.3 \
557         man/SD_ID128_FORMAT_STR.3 \
558         man/SD_ID128_FORMAT_VAL.3 \
559         man/sd_id128_equal.3 \
560         man/sd_id128_from_string.3 \
561         man/sd_id128_get_boot.3 \
562         man/sd_journal_printv.3 \
563         man/sd_journal_send.3 \
564         man/sd_journal_sendv.3 \
565         man/sd_journal_perror.3 \
566         man/SD_JOURNAL_SUPPRESS_LOCATION.3 \
567         man/sd_journal_open_directory.3 \
568         man/sd_journal_close.3 \
569         man/sd_journal.3 \
570         man/SD_JOURNAL_RUNTIME_ONLY.3 \
571         man/SD_JOURNAL_SYSTEM_ONLY.3 \
572         man/SD_JOURNAL_LOCAL_ONLY.3 \
573         man/sd_journal_previous.3 \
574         man/sd_journal_next_skip.3 \
575         man/sd_journal_previous_skip.3 \
576         man/SD_JOURNAL_FOREACH.3 \
577         man/SD_JOURNAL_FOREACH_BACKWARDS.3 \
578         man/sd_journal_enumerate_data.3 \
579         man/sd_journal_restart_data.3 \
580         man/SD_JOURNAL_FOREACH_DATA.3 \
581         man/sd_journal_get_monotonic_usec.3 \
582         man/sd_journal_get_cutoff_monotonic_usec.3 \
583         man/sd_journal_reliable_fd.3 \
584         man/sd_journal_process.3 \
585         man/sd_journal_wait.3 \
586         man/SD_JOURNAL_NOP.3 \
587         man/SD_JOURNAL_APPEND.3 \
588         man/SD_JOURNAL_INVALIDATE.3 \
589         man/sd_journal_add_disjunction.3 \
590         man/sd_journal_flush_matches.3 \
591         man/sd_journal_seek_tail.3 \
592         man/sd_journal_seek_monotonic_usec.3 \
593         man/sd_journal_seek_realtime_usec.3 \
594         man/sd_journal_seek_cursor.3 \
595         man/sd_journal_test_cursor.3 \
596         man/sd_journal_enumerate_unique.3 \
597         man/sd_journal_restart_unique.3 \
598         man/SD_JOURNAL_FOREACH_UNIQUE.3
599
600 man/reboot.8: man/halt.8
601 man/poweroff.8: man/halt.8
602 man/init.1: man/systemd.1
603 man/systemd-modules-load.8: man/systemd-modules-load.service.8
604 man/systemd-sysctl.8: man/systemd-sysctl.service.8
605 man/systemd-journald.socket.8: man/systemd-journald.service.8
606 man/systemd-journald.8: man/systemd-journald.service.8
607 man/systemd-remount-fs.8: man/systemd-remount-fs.service.8
608 man/systemd-update-utmp-shutdown.service.8: man/systemd-update-utmp-runlevel.service.8
609 man/systemd-update-utmp.8: man/systemd-update-utmp-runlevel.service.8
610 man/systemd-initctl.socket.8: man/systemd-initctl.service.8
611 man/systemd-initctl.8: man/systemd-initctl.service.8
612 man/systemd-shutdownd.socket.8: man/systemd-shutdownd.service.8
613 man/systemd-shutdownd.8: man/systemd-shutdownd.service.8
614 man/systemd-hibernate.service.8: man/systemd-suspend.service.8
615 man/systemd-hybrid-sleep.service.8: man/systemd-suspend.service.8
616 man/systemd-sleep.8: man/systemd-suspend.service.8
617 man/systemd-shutdown.8: man/systemd-halt.service.8
618 man/systemd-poweroff.service.8: man/systemd-halt.service.8
619 man/systemd-reboot.service.8: man/systemd-halt.service.8
620 man/systemd-kexec.service.8: man/systemd-halt.service.8
621 man/systemd-fsck.8: man/systemd-fsck@.service.8
622 man/systemd-fsck-root.service.8: man/systemd-fsck@.service.8
623 man/systemd-ask-password-console.path.8: man/systemd-ask-password-console.service.8
624 man/systemd-ask-password-wall.service.8: man/systemd-ask-password-console.service.8
625 man/systemd-ask-password-wall.path.8: man/systemd-ask-password-console.service.8
626 man/systemd-tmpfiles-setup.service.8: man/systemd-tmpfiles.8
627 man/systemd-tmpfiles-clean.service.8: man/systemd-tmpfiles.8
628 man/systemd-tmpfiles-clean.timer.8: man/systemd-tmpfiles.8
629 man/sd_id128_t.3: man/sd-id128.3
630 man/SD_ID128_MAKE.3: man/sd-id128.3
631 man/SD_ID128_CONST_STR.3: man/sd-id128.3
632 man/SD_ID128_FORMAT_STR.3: man/sd-id128.3
633 man/SD_ID128_FORMAT_VAL.3: man/sd-id128.3
634 man/sd_id128_equal.3: man/sd-id128.3
635 man/sd_id128_from_string.3: man/sd_id128_to_string.3
636 man/sd_id128_get_boot.3: man/sd_id128_get_machine.3
637 man/sd_journal_printv.3: man/sd_journal_print.3
638 man/sd_journal_send.3: man/sd_journal_print.3
639 man/sd_journal_sendv.3: man/sd_journal_print.3
640 man/sd_journal_perror.3: man/sd_journal_print.3
641 man/SD_JOURNAL_SUPPRESS_LOCATION.3: man/sd_journal_print.3
642 man/sd_journal_open_directory.3: man/sd_journal_open.3
643 man/sd_journal_close.3: man/sd_journal_open.3
644 man/sd_journal.3: man/sd_journal_open.3
645 man/SD_JOURNAL_RUNTIME_ONLY.3: man/sd_journal_open.3
646 man/SD_JOURNAL_SYSTEM_ONLY.3: man/sd_journal_open.3
647 man/SD_JOURNAL_LOCAL_ONLY.3: man/sd_journal_open.3
648 man/sd_journal_previous.3: man/sd_journal_next.3
649 man/sd_journal_next_skip.3: man/sd_journal_next.3
650 man/sd_journal_previous_skip.3: man/sd_journal_next.3
651 man/SD_JOURNAL_FOREACH.3: man/sd_journal_next.3
652 man/SD_JOURNAL_FOREACH_BACKWARDS.3: man/sd_journal_next.3
653 man/sd_journal_enumerate_data.3: man/sd_journal_get_data.3
654 man/sd_journal_restart_data.3: man/sd_journal_get_data.3
655 man/SD_JOURNAL_FOREACH_DATA.3: man/sd_journal_get_data.3
656 man/sd_journal_get_monotonic_usec.3: man/sd_journal_get_realtime_usec.3
657 man/sd_journal_get_cutoff_monotonic_usec.3: man/sd_journal_get_cutoff_realtime_usec.3
658 man/sd_journal_reliable_fd.3: man/sd_journal_get_fd.3
659 man/sd_journal_process.3: man/sd_journal_get_fd.3
660 man/sd_journal_wait.3: man/sd_journal_get_fd.3
661 man/SD_JOURNAL_NOP.3: man/sd_journal_get_fd.3
662 man/SD_JOURNAL_APPEND.3: man/sd_journal_get_fd.3
663 man/SD_JOURNAL_INVALIDATE.3: man/sd_journal_get_fd.3
664 man/sd_journal_add_disjunction.3: man/sd_journal_add_match.3
665 man/sd_journal_flush_matches.3: man/sd_journal_add_match.3
666 man/sd_journal_seek_tail.3: man/sd_journal_seek_head.3
667 man/sd_journal_seek_monotonic_usec.3: man/sd_journal_seek_head.3
668 man/sd_journal_seek_realtime_usec.3: man/sd_journal_seek_head.3
669 man/sd_journal_seek_cursor.3: man/sd_journal_seek_head.3
670 man/sd_journal_test_cursor.3: man/sd_journal_get_cursor.3
671 man/sd_journal_enumerate_unique.3: man/sd_journal_query_unique.3
672 man/sd_journal_restart_unique.3: man/sd_journal_query_unique.3
673 man/SD_JOURNAL_FOREACH_UNIQUE.3: man/sd_journal_query_unique.3
674
675 XML_FILES = \
676         ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
677
678 if ENABLE_MANPAGES
679 man_MANS = \
680         $(MANPAGES) \
681         $(MANPAGES_ALIAS)
682
683 noinst_DATA = \
684         ${XML_FILES:.xml=.html}
685
686 CLEANFILES += \
687         $(MANPAGES) \
688         $(MANPAGES_ALIAS) \
689         ${XML_FILES:.xml=.html}
690
691 if HAVE_PYTHON
692 noinst_DATA += \
693         man/index.html
694
695 CLEANFILES += \
696         man/index.html
697
698 man/index.html: make-man-index.py $(XML_FILES)
699         $(AM_V_at)$(MKDIR_P) $(dir $@)
700         $(AM_V_GEN)$(PYTHON) $^ > $@
701
702 MANPAGES += \
703         man/systemd.directives.5
704
705 EXTRA_DIST += \
706         man/index.html
707
708 XML_DIRECTIVE_FILES = \
709         man/systemd.unit.xml \
710         man/systemd.service.xml \
711         man/systemd.socket.xml \
712         man/systemd.mount.xml \
713         man/systemd.automount.xml \
714         man/systemd.swap.xml \
715         man/systemd.target.xml \
716         man/systemd.path.xml \
717         man/systemd.timer.xml \
718         man/systemd.snapshot.xml \
719         man/systemd.exec.xml \
720         man/systemd.kill.xml \
721         man/systemd.device.xml \
722         man/systemd.conf.xml \
723         man/systemd.journal-fields.xml
724
725 man/systemd.directives.xml: make-directive-index.py $(XML_DIRECTIVE_FILES)
726         $(AM_V_at)$(MKDIR_P) $(dir $@)
727         $(AM_V_GEN)$(PYTHON) $^ > $@
728
729 EXTRA_DIST += \
730         man/systemd.directives.xml
731
732 endif
733
734 endif
735
736 EXTRA_DIST += \
737         $(XML_FILES) \
738         ${XML_FILES:.xml=.html} \
739         $(MANPAGES) \
740         $(MANPAGES_ALIAS) \
741         make-man-index.py \
742         make-directive-index.py
743
744 # ------------------------------------------------------------------------------
745 noinst_LTLIBRARIES += \
746         libsystemd-shared.la
747
748 libsystemd_shared_la_SOURCES = \
749         src/shared/linux/auto_dev-ioctl.h \
750         src/shared/linux/fanotify.h \
751         src/shared/linux/seccomp.h \
752         src/shared/linux/seccomp-bpf.h \
753         src/shared/missing.h \
754         src/shared/list.h \
755         src/shared/macro.h \
756         src/shared/def.h \
757         src/shared/sparse-endian.h \
758         src/shared/util.c \
759         src/shared/util.h \
760         src/shared/virt.c \
761         src/shared/virt.h \
762         src/shared/path-util.c \
763         src/shared/path-util.h \
764         src/shared/hashmap.c \
765         src/shared/hashmap.h \
766         src/shared/set.c \
767         src/shared/set.h \
768         src/shared/strv.c \
769         src/shared/strv.h \
770         src/shared/strbuf.c \
771         src/shared/strbuf.h \
772         src/shared/conf-parser.c \
773         src/shared/conf-parser.h \
774         src/shared/log.c \
775         src/shared/log.h \
776         src/shared/ratelimit.h \
777         src/shared/ratelimit.c \
778         src/shared/exit-status.c \
779         src/shared/exit-status.h \
780         src/shared/utf8.c \
781         src/shared/utf8.h \
782         src/shared/pager.c \
783         src/shared/pager.h \
784         src/shared/ioprio.h \
785         src/shared/socket-util.c \
786         src/shared/socket-util.h \
787         src/shared/conf-files.c \
788         src/shared/conf-files.h \
789         src/shared/cgroup-util.c \
790         src/shared/cgroup-util.h \
791         src/shared/cgroup-show.c \
792         src/shared/cgroup-show.h \
793         src/shared/unit-name.c \
794         src/shared/unit-name.h \
795         src/shared/utmp-wtmp.c \
796         src/shared/utmp-wtmp.h \
797         src/shared/watchdog.c \
798         src/shared/watchdog.h \
799         src/shared/spawn-ask-password-agent.c \
800         src/shared/spawn-ask-password-agent.h \
801         src/shared/specifier.c \
802         src/shared/specifier.h \
803         src/shared/spawn-polkit-agent.c \
804         src/shared/spawn-polkit-agent.h \
805         src/shared/hwclock.c \
806         src/shared/hwclock.h
807
808 #-------------------------------------------------------------------------------
809 noinst_LTLIBRARIES += \
810         libsystemd-dbus.la
811
812 libsystemd_dbus_la_SOURCES = \
813         src/shared/dbus-common.c \
814         src/shared/dbus-common.h \
815         src/shared/dbus-loop.c \
816         src/shared/dbus-loop.h \
817         src/shared/polkit.c \
818         src/shared/polkit.h
819
820 libsystemd_dbus_la_CFLAGS = \
821         $(AM_CFLAGS) \
822         $(DBUS_CFLAGS)
823
824 libsystemd_dbus_la_LIBADD = \
825         $(DBUS_LIBS)
826
827 # ------------------------------------------------------------------------------
828 noinst_LTLIBRARIES += \
829         libsystemd-units.la
830
831 libsystemd_units_la_SOURCES = \
832         src/shared/install.c \
833         src/shared/install.h \
834         src/shared/path-lookup.c \
835         src/shared/path-lookup.h
836
837 libsystemd_units_la_CFLAGS = \
838         $(AM_CFLAGS) \
839         $(DBUS_CFLAGS)
840
841 # ------------------------------------------------------------------------------
842 noinst_LTLIBRARIES += \
843         libsystemd-label.la
844
845 libsystemd_label_la_SOURCES = \
846         src/shared/cgroup-label.c \
847         src/shared/socket-label.c \
848         src/shared/label.c \
849         src/shared/label.h \
850         src/shared/selinux-util.c \
851         src/shared/selinux-util.h \
852         src/shared/mkdir.c \
853         src/shared/mkdir.h \
854         src/shared/ask-password-api.c \
855         src/shared/ask-password-api.h \
856         src/shared/dev-setup.c \
857         src/shared/dev-setup.h
858
859 libsystemd_label_la_CFLAGS = \
860         $(AM_CFLAGS) \
861         $(SELINUX_CFLAGS)
862
863 libsystemd_label_la_LIBADD = \
864         $(SELINUX_LIBS)
865
866 # ------------------------------------------------------------------------------
867 noinst_LTLIBRARIES += \
868         libsystemd-logs.la
869
870 libsystemd_logs_la_SOURCES = \
871         src/shared/logs-show.c \
872         src/shared/logs-show.h
873
874 libsystemd_logs_la_CFLAGS = \
875         $(AM_CFLAGS)
876
877 libsystemd_logs_la_LIBADD = \
878         libsystemd-journal-internal.la \
879         libsystemd-id128-internal.la \
880         libsystemd-shared.la
881
882 # ------------------------------------------------------------------------------
883 noinst_LTLIBRARIES += \
884         libsystemd-capability.la
885
886 libsystemd_capability_la_SOURCES = \
887         src/shared/capability.c \
888         src/shared/capability.h
889
890 libsystemd_capability_la_CFLAGS = \
891         $(AM_CFLAGS) \
892         $(CAP_CFLAGS)
893
894 libsystemd_capability_la_LIBADD = \
895         $(CAP_LIBS)
896
897 # ------------------------------------------------------------------------------
898 noinst_LTLIBRARIES += \
899         libsystemd-audit.la
900
901 libsystemd_audit_la_SOURCES = \
902         src/shared/audit.c \
903         src/shared/audit.h
904
905 libsystemd_audit_la_LIBADD = \
906         libsystemd-capability.la
907
908 # ------------------------------------------------------------------------------
909 if HAVE_ACL
910 noinst_LTLIBRARIES += \
911         libsystemd-acl.la
912
913 libsystemd_acl_la_SOURCES = \
914         src/shared/acl-util.c \
915         src/shared/acl-util.h
916
917 libsystemd_acl_la_CFLAGS = \
918         $(AM_CFLAGS) \
919         $(ACL_CFLAGS)
920
921 libsystemd_acl_la_LIBADD = \
922         $(ACL_LIBS)
923 endif
924
925 # ------------------------------------------------------------------------------
926 noinst_LTLIBRARIES += \
927         libsystemd-core.la
928
929 libsystemd_core_la_SOURCES = \
930         src/core/unit.c \
931         src/core/unit.h \
932         src/core/unit-printf.c \
933         src/core/unit-printf.h \
934         src/core/job.c \
935         src/core/job.h \
936         src/core/manager.c \
937         src/core/manager.h \
938         src/core/transaction.c \
939         src/core/transaction.h \
940         src/core/load-fragment.c \
941         src/core/load-fragment.h \
942         src/core/service.c \
943         src/core/service.h \
944         src/core/automount.c \
945         src/core/automount.h \
946         src/core/mount.c \
947         src/core/mount.h \
948         src/core/swap.c \
949         src/core/swap.h \
950         src/core/device.c \
951         src/core/device.h \
952         src/core/target.c \
953         src/core/target.h \
954         src/core/snapshot.c \
955         src/core/snapshot.h \
956         src/core/socket.c \
957         src/core/socket.h \
958         src/core/timer.c \
959         src/core/timer.h \
960         src/core/path.c \
961         src/core/path.h \
962         src/core/load-dropin.c \
963         src/core/load-dropin.h \
964         src/core/execute.c \
965         src/core/execute.h \
966         src/core/kill.c \
967         src/core/kill.h \
968         src/core/dbus.c \
969         src/core/dbus.h \
970         src/core/dbus-manager.c \
971         src/core/dbus-manager.h \
972         src/core/dbus-unit.c \
973         src/core/dbus-unit.h \
974         src/core/dbus-job.c \
975         src/core/dbus-job.h \
976         src/core/dbus-service.c \
977         src/core/dbus-service.h \
978         src/core/dbus-socket.c \
979         src/core/dbus-socket.h \
980         src/core/dbus-timer.c \
981         src/core/dbus-timer.h \
982         src/core/dbus-target.c \
983         src/core/dbus-target.h \
984         src/core/dbus-mount.c \
985         src/core/dbus-mount.h \
986         src/core/dbus-automount.c \
987         src/core/dbus-automount.h \
988         src/core/dbus-swap.c \
989         src/core/dbus-swap.h \
990         src/core/dbus-snapshot.c \
991         src/core/dbus-snapshot.h \
992         src/core/dbus-device.c \
993         src/core/dbus-device.h \
994         src/core/dbus-execute.c \
995         src/core/dbus-execute.h \
996         src/core/dbus-kill.c \
997         src/core/dbus-kill.h \
998         src/core/dbus-path.c \
999         src/core/dbus-path.h \
1000         src/core/cgroup.c \
1001         src/core/cgroup.h \
1002         src/core/selinux-access.c \
1003         src/core/selinux-access.h \
1004         src/core/selinux-setup.c \
1005         src/core/selinux-setup.h \
1006         src/core/ima-setup.c \
1007         src/core/ima-setup.h \
1008         src/core/kmod-setup.c \
1009         src/core/kmod-setup.h \
1010         src/core/locale-setup.h \
1011         src/core/locale-setup.c \
1012         src/core/hostname-setup.c \
1013         src/core/hostname-setup.h \
1014         src/core/machine-id-setup.c \
1015         src/core/machine-id-setup.h \
1016         src/core/mount-setup.c \
1017         src/core/mount-setup.h \
1018         src/core/loopback-setup.h \
1019         src/core/loopback-setup.c \
1020         src/core/fdset.c \
1021         src/core/fdset.h \
1022         src/core/condition.c \
1023         src/core/condition.h \
1024         src/core/namespace.c \
1025         src/core/namespace.h \
1026         src/core/tcpwrap.c \
1027         src/core/tcpwrap.h \
1028         src/core/cgroup-attr.c \
1029         src/core/cgroup-attr.h \
1030         src/core/securebits.h \
1031         src/core/initreq.h \
1032         src/core/special.h \
1033         src/core/bus-errors.h \
1034         src/core/build.h \
1035         src/core/sysfs-show.h \
1036         src/core/switch-root.h \
1037         src/core/switch-root.c \
1038         src/core/killall.h \
1039         src/core/killall.c \
1040         src/core/syscall-list.c \
1041         src/core/syscall-list.h \
1042         src/core/audit-fd.c \
1043         src/core/audit-fd.h
1044
1045 nodist_libsystemd_core_la_SOURCES = \
1046         src/core/load-fragment-gperf.c \
1047         src/core/load-fragment-gperf-nulstr.c \
1048         src/core/syscall-from-name.h \
1049         src/core/syscall-to-name.h
1050
1051 libsystemd_core_la_CFLAGS = \
1052         $(AM_CFLAGS) \
1053         $(DBUS_CFLAGS) \
1054         $(LIBWRAP_CFLAGS) \
1055         $(PAM_CFLAGS) \
1056         $(AUDIT_CFLAGS) \
1057         $(KMOD_CFLAGS)
1058
1059 libsystemd_core_la_LIBADD = \
1060         libsystemd-capability.la \
1061         libsystemd-units.la \
1062         libsystemd-label.la \
1063         libsystemd-shared.la \
1064         libsystemd-dbus.la \
1065         libsystemd-audit.la \
1066         libsystemd-id128-internal.la \
1067         libudev.la \
1068         $(LIBWRAP_LIBS) \
1069         $(PAM_LIBS) \
1070         $(AUDIT_LIBS) \
1071         $(CAP_LIBS) \
1072         $(KMOD_LIBS)
1073
1074 src/core/load-fragment-gperf-nulstr.c: src/core/load-fragment-gperf.gperf
1075         $(AM_V_at)$(MKDIR_P) $(dir $@)
1076         $(AM_V_GEN)$(AWK) 'BEGIN{ keywords=0 ; FS="," ; print "extern const char load_fragment_gperf_nulstr[];" ; print "const char load_fragment_gperf_nulstr[] ="} ; keyword==1 { print "\"" $$1 "\\0\"" } ; /%%/ { keyword=1} ; END { print ";" }' < $< > $@
1077
1078 EXTRA_DIST += \
1079         src/core/load-fragment-gperf.gperf.m4
1080
1081 CLEANFILES += \
1082         src/core/load-fragment-gperf.gperf \
1083         src/core/load-fragment-gperf.c \
1084         src/core/load-fragment-gperf-nulstr.c \
1085         src/core/syscall-list.txt \
1086         src/core/syscall-from-name.gperf
1087
1088 BUILT_SOURCES += \
1089         src/core/syscall-from-name.h \
1090         src/core/syscall-to-name.h
1091
1092 src/core/syscall-list.txt: Makefile
1093         $(AM_V_at)$(MKDIR_P) $(dir $@)
1094         $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include sys/syscall.h - < /dev/null | $(AWK) '/^#define[ \t]+__NR_[^ ]+[ \t]+\(?.*[0-9]+.*\)?/ { sub(/__NR_/, "", $$2); print $$2; }' > $@
1095
1096 src/core/syscall-from-name.gperf: src/core/syscall-list.txt Makefile
1097         $(AM_V_at)$(MKDIR_P) $(dir $@)
1098         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct syscall_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, __NR_%s\n", $$1, $$1 }' < $< > $@
1099
1100 src/core/syscall-from-name.h: src/core/syscall-from-name.gperf Makefile
1101         $(AM_V_at)$(MKDIR_P) $(dir $@)
1102         $(AM_V_GEN)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_syscall -H hash_syscall_name -p -C < $< > $@
1103
1104 src/core/syscall-to-name.h: src/core/syscall-list.txt Makefile
1105         $(AM_V_at)$(MKDIR_P) $(dir $@)
1106         $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char* const syscall_names[] = { "} { printf "[__NR_%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' < $< > $@
1107
1108 # ------------------------------------------------------------------------------
1109 systemd_SOURCES = \
1110         src/core/main.c
1111
1112 systemd_CFLAGS = \
1113         $(AM_CFLAGS) \
1114         $(DBUS_CFLAGS)
1115
1116 systemd_LDADD = \
1117         libsystemd-core.la \
1118         libsystemd-daemon.la \
1119         libsystemd-id128-internal.la \
1120         libsystemd-dbus.la
1121
1122 dist_pkgsysconf_DATA += \
1123         src/core/system.conf \
1124         src/core/user.conf
1125
1126 dist_dbuspolicy_DATA += \
1127         src/core/org.freedesktop.systemd1.conf
1128
1129 dist_dbussystemservice_DATA += \
1130         src/core/org.freedesktop.systemd1.service
1131
1132 dbusinterface_DATA += \
1133         org.freedesktop.systemd1.Manager.xml \
1134         org.freedesktop.systemd1.Job.xml \
1135         org.freedesktop.systemd1.Unit.xml \
1136         org.freedesktop.systemd1.Service.xml \
1137         org.freedesktop.systemd1.Socket.xml \
1138         org.freedesktop.systemd1.Timer.xml \
1139         org.freedesktop.systemd1.Target.xml \
1140         org.freedesktop.systemd1.Device.xml \
1141         org.freedesktop.systemd1.Mount.xml \
1142         org.freedesktop.systemd1.Automount.xml \
1143         org.freedesktop.systemd1.Snapshot.xml \
1144         org.freedesktop.systemd1.Swap.xml \
1145         org.freedesktop.systemd1.Path.xml
1146
1147 polkitpolicy_in_in_files = \
1148         src/core/org.freedesktop.systemd1.policy.in.in
1149
1150 org.freedesktop.systemd1.%.xml: systemd
1151         $(AM_V_GEN)$(LIBTOOL) --mode=execute $(OBJCOPY) -O binary -j introspect.$* $< $@.tmp && \
1152                 $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
1153                 $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
1154
1155 pkgconfigdata_DATA = \
1156         src/core/systemd.pc
1157
1158 nodist_rpmmacros_DATA = \
1159         src/core/macros.systemd
1160
1161 EXTRA_DIST += \
1162         src/core/systemd.pc.in \
1163         src/core/macros.systemd.in
1164
1165 CLEANFILES += \
1166         src/core/macros.systemd
1167
1168 # ------------------------------------------------------------------------------
1169 noinst_PROGRAMS += \
1170         test-engine \
1171         test-job-type \
1172         test-ns \
1173         test-loopback \
1174         test-hostname \
1175         test-daemon \
1176         test-cgroup \
1177         test-env-replace \
1178         test-strv \
1179         test-install \
1180         test-watchdog \
1181         test-unit-name \
1182         test-log \
1183         test-unit-file \
1184         test-date \
1185         test-sleep
1186
1187 TESTS += \
1188         test-job-type \
1189         test-env-replace \
1190         test-strv \
1191         test-unit-name \
1192         test-unit-file \
1193         test-date \
1194         test-sleep
1195
1196 test_engine_SOURCES = \
1197         src/test/test-engine.c
1198
1199 test_engine_CFLAGS = \
1200         $(AM_CFLAGS) \
1201         $(DBUS_CFLAGS)
1202
1203 test_engine_LDADD = \
1204         libsystemd-core.la \
1205         libsystemd-daemon.la \
1206         libsystemd-dbus.la
1207
1208 test_job_type_SOURCES = \
1209         src/test/test-job-type.c
1210
1211 test_job_type_CFLAGS = \
1212         $(AM_CFLAGS) \
1213         $(DBUS_CFLAGS)
1214
1215 test_job_type_LDADD = \
1216         libsystemd-core.la \
1217         libsystemd-daemon.la
1218
1219 test_ns_SOURCES = \
1220         src/test/test-ns.c
1221
1222 test_ns_LDADD = \
1223         libsystemd-core.la
1224
1225 test_loopback_SOURCES = \
1226         src/test/test-loopback.c
1227
1228 test_loopback_LDADD = \
1229         libsystemd-shared.la \
1230         libsystemd-core.la
1231
1232 test_hostname_SOURCES = \
1233         src/test/test-hostname.c
1234
1235 test_hostname_LDADD = \
1236         libsystemd-core.la
1237
1238 test_unit_name_SOURCES = \
1239         src/test/test-unit-name.c
1240
1241 test_unit_name_LDADD = \
1242         libsystemd-core.la
1243
1244 test_unit_file_SOURCES = \
1245         src/test/test-unit-file.c
1246
1247 test_unit_file_LDADD = \
1248         libsystemd-core.la
1249
1250 test_log_SOURCES = \
1251         src/test/test-log.c
1252
1253 test_log_LDADD = \
1254         libsystemd-core.la
1255
1256 test_date_SOURCES = \
1257         src/test/test-date.c
1258
1259 test_date_LDADD = \
1260         libsystemd-core.la
1261
1262 test_sleep_SOURCES = \
1263         src/test/test-sleep.c
1264
1265 test_sleep_LDADD = \
1266         libsystemd-core.la
1267
1268 test_daemon_SOURCES = \
1269         src/test/test-daemon.c
1270
1271 test_daemon_LDADD = \
1272         libsystemd-shared.la \
1273         libsystemd-daemon.la
1274
1275 test_cgroup_SOURCES = \
1276         src/test/test-cgroup.c
1277
1278 test_cgroup_LDADD = \
1279         libsystemd-label.la \
1280         libsystemd-shared.la
1281
1282 test_env_replace_SOURCES = \
1283         src/test/test-env-replace.c
1284
1285 test_env_replace_LDADD = \
1286         libsystemd-shared.la
1287
1288 test_strv_SOURCES = \
1289         src/test/test-strv.c
1290
1291 test_strv_LDADD = \
1292         libsystemd-shared.la
1293
1294 test_install_SOURCES = \
1295         src/test/test-install.c
1296
1297 test_install_CFLAGS = \
1298         $(AM_CFLAGS) \
1299         $(DBUS_CFLAGS)
1300
1301 test_install_LDADD = \
1302         libsystemd-units.la \
1303         libsystemd-label.la \
1304         libsystemd-shared.la
1305
1306 test_watchdog_SOURCES = \
1307         src/test/test-watchdog.c
1308
1309 test_watchdog_LDADD = \
1310         libsystemd-shared.la
1311
1312 # ------------------------------------------------------------------------------
1313 systemd_initctl_SOURCES = \
1314         src/initctl/initctl.c
1315
1316 systemd_initctl_CFLAGS = \
1317         $(AM_CFLAGS) \
1318         $(DBUS_CFLAGS)
1319
1320 systemd_initctl_LDADD = \
1321         libsystemd-shared.la \
1322         libsystemd-daemon.la \
1323         libsystemd-dbus.la
1324
1325 # ------------------------------------------------------------------------------
1326 systemd_update_utmp_SOURCES = \
1327         src/update-utmp/update-utmp.c
1328
1329 systemd_update_utmp_CFLAGS = \
1330         $(AM_CFLAGS) \
1331         $(DBUS_CFLAGS) \
1332         $(AUDIT_CFLAGS)
1333
1334 systemd_update_utmp_LDADD = \
1335         libsystemd-shared.la \
1336         libsystemd-dbus.la \
1337         $(AUDIT_LIBS)
1338
1339 # ------------------------------------------------------------------------------
1340 systemd_shutdownd_SOURCES = \
1341         src/shutdownd/shutdownd.c
1342
1343 systemd_shutdownd_LDADD = \
1344         libsystemd-label.la \
1345         libsystemd-shared.la \
1346         libsystemd-daemon.la
1347
1348 pkginclude_HEADERS += \
1349         src/systemd/sd-shutdown.h
1350
1351 # ------------------------------------------------------------------------------
1352 systemd_shutdown_SOURCES = \
1353         src/core/umount.c \
1354         src/core/umount.h \
1355         src/core/shutdown.c \
1356         src/core/mount-setup.c \
1357         src/core/mount-setup.h \
1358         src/core/killall.h \
1359         src/core/killall.c
1360
1361 systemd_shutdown_LDADD = \
1362         libsystemd-label.la \
1363         libsystemd-shared.la \
1364         libudev.la
1365
1366 # ------------------------------------------------------------------------------
1367 systemd_modules_load_SOURCES = \
1368         src/modules-load/modules-load.c
1369
1370 systemd_modules_load_CFLAGS = \
1371         $(AM_CFLAGS) \
1372         $(KMOD_CFLAGS)
1373
1374 systemd_modules_load_LDADD = \
1375         libsystemd-shared.la \
1376         $(KMOD_LIBS)
1377
1378 # ------------------------------------------------------------------------------
1379 systemd_tmpfiles_SOURCES = \
1380         src/tmpfiles/tmpfiles.c
1381
1382 systemd_tmpfiles_LDADD = \
1383         libsystemd-label.la \
1384         libsystemd-shared.la \
1385         libsystemd-capability.la
1386
1387 # ------------------------------------------------------------------------------
1388 systemd_machine_id_setup_SOURCES = \
1389         src/machine-id-setup/machine-id-setup-main.c \
1390         src/core/machine-id-setup.c \
1391         src/core/machine-id-setup.h
1392
1393 systemd_machine_id_setup_LDADD = \
1394         libsystemd-label.la \
1395         libsystemd-shared.la \
1396         libsystemd-id128-internal.la
1397
1398 # ------------------------------------------------------------------------------
1399 systemd_sysctl_SOURCES = \
1400         src/sysctl/sysctl.c
1401
1402 systemd_sysctl_LDADD = \
1403         libsystemd-shared.la
1404
1405 # ------------------------------------------------------------------------------
1406 systemd_sleep_SOURCES = \
1407         src/sleep/sleep.c
1408
1409 systemd_sleep_LDADD = \
1410         libsystemd-shared.la
1411
1412 # ------------------------------------------------------------------------------
1413 systemd_fsck_SOURCES = \
1414         src/fsck/fsck.c
1415
1416 systemd_fsck_CFLAGS = \
1417         $(AM_CFLAGS) \
1418         $(DBUS_CFLAGS)
1419
1420 systemd_fsck_LDADD = \
1421         libsystemd-shared.la \
1422         libsystemd-dbus.la \
1423         libudev.la
1424
1425 # ------------------------------------------------------------------------------
1426 systemd_timestamp_SOURCES = \
1427         src/timestamp/timestamp.c
1428
1429 systemd_timestamp_LDADD = \
1430         libsystemd-shared.la
1431
1432 # ------------------------------------------------------------------------------
1433 systemd_ac_power_SOURCES = \
1434         src/ac-power/ac-power.c
1435
1436 systemd_ac_power_LDADD = \
1437         libsystemd-shared.la \
1438         libudev.la
1439
1440 # ------------------------------------------------------------------------------
1441 systemd_detect_virt_SOURCES = \
1442         src/detect-virt/detect-virt.c
1443
1444 systemd_detect_virt_LDADD = \
1445         libsystemd-shared.la
1446
1447 systemd-detect-virt-install-hook:
1448         $(SETCAP) cap_dac_override,cap_sys_ptrace=ep $(DESTDIR)$(bindir)/systemd-detect-virt ||:
1449
1450 INSTALL_EXEC_HOOKS += \
1451         systemd-detect-virt-install-hook
1452
1453 # ------------------------------------------------------------------------------
1454 systemd_delta_SOURCES = \
1455         src/delta/delta.c
1456
1457 systemd_delta_LDADD = \
1458         libsystemd-shared.la
1459
1460 # ------------------------------------------------------------------------------
1461 systemd_getty_generator_SOURCES = \
1462         src/getty-generator/getty-generator.c
1463
1464 systemd_getty_generator_LDADD = \
1465         libsystemd-label.la \
1466         libsystemd-shared.la
1467
1468 # ------------------------------------------------------------------------------
1469 systemd_fstab_generator_SOURCES = \
1470         src/fstab-generator/fstab-generator.c \
1471         src/core/mount-setup.c
1472
1473 systemd_fstab_generator_LDADD = \
1474         libsystemd-label.la \
1475         libsystemd-shared.la
1476
1477 # ------------------------------------------------------------------------------
1478 systemd_system_update_generator_SOURCES = \
1479         src/system-update-generator/system-update-generator.c
1480
1481 systemd_system_update_generator_LDADD = \
1482         libsystemd-label.la \
1483         libsystemd-shared.la
1484
1485 # ------------------------------------------------------------------------------
1486 systemd_rc_local_generator_SOURCES = \
1487         src/rc-local-generator/rc-local-generator.c
1488
1489 systemd_rc_local_generator_LDADD = \
1490         libsystemd-label.la \
1491         libsystemd-shared.la
1492
1493 # ------------------------------------------------------------------------------
1494 systemd_remount_fs_SOURCES = \
1495         src/remount-fs/remount-fs.c \
1496         src/core/mount-setup.c \
1497         src/core/mount-setup.h
1498
1499 systemd_remount_fs_LDADD = \
1500         libsystemd-label.la \
1501         libsystemd-shared.la
1502
1503 # ------------------------------------------------------------------------------
1504 systemd_cgroups_agent_SOURCES = \
1505         src/cgroups-agent/cgroups-agent.c
1506
1507 systemd_cgroups_agent_CFLAGS = \
1508         $(AM_CFLAGS) \
1509         $(DBUS_CFLAGS)
1510
1511 systemd_cgroups_agent_LDADD = \
1512         libsystemd-shared.la \
1513         libsystemd-dbus.la
1514
1515 # ------------------------------------------------------------------------------
1516 systemctl_SOURCES = \
1517         src/systemctl/systemctl.c
1518
1519 systemctl_CFLAGS = \
1520         $(AM_CFLAGS) \
1521         $(DBUS_CFLAGS)
1522
1523 systemctl_LDADD = \
1524         libsystemd-units.la \
1525         libsystemd-label.la \
1526         libsystemd-shared.la \
1527         libsystemd-daemon.la \
1528         libsystemd-dbus.la \
1529         libsystemd-logs.la
1530
1531 # ------------------------------------------------------------------------------
1532 systemd_notify_SOURCES = \
1533         src/notify/notify.c \
1534         src/readahead/sd-readahead.c
1535
1536 systemd_notify_LDADD = \
1537         libsystemd-shared.la \
1538         libsystemd-daemon.la
1539
1540 # ------------------------------------------------------------------------------
1541 systemd_ask_password_SOURCES = \
1542         src/ask-password/ask-password.c
1543
1544 systemd_ask_password_LDADD = \
1545         libsystemd-label.la \
1546         libsystemd-shared.la
1547
1548 # ------------------------------------------------------------------------------
1549 systemd_reply_password_SOURCES = \
1550         src/reply-password/reply-password.c
1551
1552 systemd_reply_password_LDADD = \
1553         libsystemd-shared.la
1554
1555 # ------------------------------------------------------------------------------
1556 systemd_cgls_SOURCES = \
1557         src/cgls/cgls.c
1558
1559 systemd_cgls_LDADD = \
1560         libsystemd-shared.la
1561
1562 # ------------------------------------------------------------------------------
1563 systemd_cgtop_SOURCES = \
1564         src/cgtop/cgtop.c
1565
1566 systemd_cgtop_LDADD = \
1567         libsystemd-shared.la
1568
1569 # ------------------------------------------------------------------------------
1570 systemd_nspawn_SOURCES = \
1571         src/nspawn/nspawn.c \
1572         src/core/mount-setup.c \
1573         src/core/mount-setup.h \
1574         src/core/loopback-setup.c \
1575         src/core/loopback-setup.h
1576
1577 systemd_nspawn_LDADD = \
1578         libsystemd-label.la \
1579         libsystemd-capability.la \
1580         libsystemd-shared.la \
1581         libsystemd-daemon.la \
1582         libsystemd-id128-internal.la
1583
1584 # ------------------------------------------------------------------------------
1585 systemd_stdio_bridge_SOURCES = \
1586         src/stdio-bridge/stdio-bridge.c
1587
1588 systemd_stdio_bridge_LDADD = \
1589         libsystemd-shared.la
1590
1591 # ------------------------------------------------------------------------------
1592 systemd_tty_ask_password_agent_SOURCES = \
1593         src/tty-ask-password-agent/tty-ask-password-agent.c
1594
1595 systemd_tty_ask_password_agent_LDADD = \
1596         libsystemd-label.la \
1597         libsystemd-shared.la
1598
1599 # ------------------------------------------------------------------------------
1600 libsystemd_daemon_la_SOURCES = \
1601         src/libsystemd-daemon/sd-daemon.c
1602
1603 libsystemd_daemon_la_CFLAGS = \
1604         $(AM_CFLAGS) \
1605         -fvisibility=hidden \
1606         -DSD_EXPORT_SYMBOLS
1607
1608 libsystemd_daemon_la_LDFLAGS = \
1609         $(AM_LDFLAGS) \
1610         -shared \
1611         -version-info $(LIBSYSTEMD_DAEMON_CURRENT):$(LIBSYSTEMD_DAEMON_REVISION):$(LIBSYSTEMD_DAEMON_AGE) \
1612         -Wl,--version-script=$(top_srcdir)/src/libsystemd-daemon/libsystemd-daemon.sym
1613
1614 pkginclude_HEADERS += \
1615         src/systemd/sd-daemon.h
1616
1617 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
1618 libsystemd-daemon-install-hook:
1619         if test "$(libdir)" != "$(rootlibdir)"; then \
1620                 $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
1621                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/libsystemd-daemon.so) && \
1622                 so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
1623                 ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/libsystemd-daemon.so && \
1624                 mv $(DESTDIR)$(libdir)/libsystemd-daemon.so.* $(DESTDIR)$(rootlibdir); \
1625         fi
1626
1627 INSTALL_EXEC_HOOKS += \
1628         libsystemd-daemon-install-hook
1629
1630 libsystemd-daemon-uninstall-hook:
1631         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-daemon.so*
1632
1633 UNINSTALL_EXEC_HOOKS += \
1634         libsystemd-daemon-uninstall-hook
1635
1636 lib_LTLIBRARIES += \
1637         libsystemd-daemon.la
1638
1639 pkgconfiglib_DATA += \
1640         src/libsystemd-daemon/libsystemd-daemon.pc
1641
1642 MANPAGES += \
1643         man/sd-daemon.3 \
1644         man/sd_notify.3 \
1645         man/sd_listen_fds.3 \
1646         man/sd_is_fifo.3 \
1647         man/sd_booted.3
1648
1649 MANPAGES_ALIAS += \
1650         man/sd_is_socket.3 \
1651         man/sd_is_socket_unix.3 \
1652         man/sd_is_socket_inet.3 \
1653         man/sd_is_mq.3 \
1654         man/sd_notifyf.3 \
1655         man/SD_LISTEN_FDS_START.3 \
1656         man/SD_EMERG.3 \
1657         man/SD_ALERT.3 \
1658         man/SD_CRIT.3 \
1659         man/SD_ERR.3 \
1660         man/SD_WARNING.3 \
1661         man/SD_NOTICE.3 \
1662         man/SD_INFO.3 \
1663         man/SD_DEBUG.3
1664
1665 man/sd_is_socket.3: man/sd_is_fifo.3
1666 man/sd_is_socket_unix.3: man/sd_is_fifo.3
1667 man/sd_is_socket_inet.3: man/sd_is_fifo.3
1668 man/sd_is_mq.3: man/sd_is_fifo.3
1669 man/sd_notifyf.3: man/sd_notify.3
1670 man/SD_LISTEN_FDS_START.3: man/sd_listen_fds.3
1671 man/SD_EMERG.3: man/sd-daemon.3
1672 man/SD_ALERT.3: man/sd-daemon.3
1673 man/SD_CRIT.3: man/sd-daemon.3
1674 man/SD_ERR.3: man/sd-daemon.3
1675 man/SD_WARNING.3: man/sd-daemon.3
1676 man/SD_NOTICE.3: man/sd-daemon.3
1677 man/SD_INFO.3: man/sd-daemon.3
1678 man/SD_DEBUG.3: man/sd-daemon.3
1679
1680 EXTRA_DIST += \
1681         src/libsystemd-daemon/libsystemd-daemon.pc.in \
1682         src/libsystemd-daemon/libsystemd-daemon.sym
1683
1684 # ------------------------------------------------------------------------------
1685 if ENABLE_GTK_DOC
1686 SUBDIRS += \
1687         docs/libudev
1688 endif
1689
1690 include_HEADERS += \
1691         src/libudev/libudev.h
1692
1693 lib_LTLIBRARIES += \
1694         libudev.la
1695
1696 libudev_la_SOURCES =\
1697         src/libudev/libudev-private.h \
1698         src/libudev/libudev.c \
1699         src/libudev/libudev-list.c \
1700         src/libudev/libudev-util.c \
1701         src/libudev/libudev-device.c \
1702         src/libudev/libudev-enumerate.c \
1703         src/libudev/libudev-monitor.c \
1704         src/libudev/libudev-queue.c \
1705         src/libudev/libudev-hwdb-def.h \
1706         src/libudev/libudev-hwdb.c
1707
1708 libudev_la_CFLAGS = \
1709         $(AM_CFLAGS) \
1710         -fvisibility=hidden
1711
1712 libudev_la_LDFLAGS = \
1713         $(AM_LDFLAGS) \
1714         -version-info $(LIBUDEV_CURRENT):$(LIBUDEV_REVISION):$(LIBUDEV_AGE) \
1715         -Wl,--version-script=$(top_srcdir)/src/libudev/libudev.sym
1716
1717 libudev_la_LIBADD = \
1718         libsystemd-shared.la
1719
1720 pkgconfiglib_DATA += \
1721         src/libudev/libudev.pc
1722
1723 EXTRA_DIST += \
1724         src/libudev/libudev.pc.in \
1725         src/libudev/libudev.sym
1726
1727 CLEANFILES += \
1728         src/libudev/libudev.pc
1729
1730 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
1731 libudev-install-move-hook:
1732         if test "$(libdir)" != "$(rootlibdir)"; then \
1733                 $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
1734                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/libudev.so) && \
1735                 so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
1736                 ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/libudev.so && \
1737                 mv $(DESTDIR)$(libdir)/libudev.so.* $(DESTDIR)$(rootlibdir); \
1738         fi
1739
1740 libudev-uninstall-move-hook:
1741         rm -f $(DESTDIR)$(rootlibdir)/libudev.so*
1742
1743 INSTALL_EXEC_HOOKS += libudev-install-move-hook
1744 UNINSTALL_EXEC_HOOKS += libudev-uninstall-move-hook
1745
1746 # ------------------------------------------------------------------------------
1747 noinst_LTLIBRARIES += \
1748         libudev-private.la
1749
1750 libudev_private_la_SOURCES =\
1751         $(libudev_la_SOURCES) \
1752         src/libudev/libudev-device-private.c \
1753         src/libudev/libudev-queue-private.c
1754
1755 libudev_private_la_CFLAGS = \
1756         $(AM_CFLAGS) \
1757         -fvisibility=default
1758
1759 libudev_private_la_LIBADD = \
1760         libsystemd-shared.la
1761
1762 # ------------------------------------------------------------------------------
1763 MANPAGES += \
1764         man/udev.7 \
1765         man/udevadm.8 \
1766         man/systemd-udevd.service.8
1767
1768 MANPAGES_ALIAS += \
1769         man/systemd-udevd.8 \
1770         man/systemd-udevd-control.socket.8 \
1771         man/systemd-udevd-kernel.socket.8
1772
1773 man/systemd-udevd.8: man/systemd-udevd.service.8
1774 man/systemd-udevd-control.socket.8: man/systemd-udevd.service.8
1775 man/systemd-udevd-kernel.socket.8: man/systemd-udevd.service.8
1776
1777 udev-confdirs:
1778         -$(MKDIR_P) $(DESTDIR)$(sysconfdir)/udev/rules.d
1779         -$(MKDIR_P) $(DESTDIR)$(sysconfdir)/udev/hwdb.d
1780
1781 INSTALL_DATA_HOOKS += udev-confdirs
1782
1783 dist_udevrules_DATA += \
1784         rules/99-systemd.rules \
1785         rules/42-usb-hid-pm.rules \
1786         rules/50-udev-default.rules \
1787         rules/60-persistent-storage-tape.rules \
1788         rules/60-persistent-serial.rules \
1789         rules/60-persistent-input.rules \
1790         rules/60-persistent-alsa.rules \
1791         rules/60-persistent-storage.rules \
1792         rules/64-btrfs.rules \
1793         rules/75-net-description.rules \
1794         rules/75-tty-description.rules \
1795         rules/78-sound-card.rules \
1796         rules/80-drivers.rules \
1797         rules/95-udev-late.rules
1798
1799 dist_udevhwdb_DATA = \
1800         hwdb/20-pci-vendor-product.hwdb \
1801         hwdb/20-usb-vendor-product.hwdb \
1802         hwdb/20-acpi-vendor.hwdb
1803
1804 udevconfdir = $(sysconfdir)/udev
1805 dist_udevconf_DATA = \
1806         src/udev/udev.conf
1807
1808 sharepkgconfigdir = $(datadir)/pkgconfig
1809 sharepkgconfig_DATA = \
1810         src/udev/udev.pc
1811
1812 EXTRA_DIST += \
1813         rules/99-systemd.rules.in \
1814         src/udev/udev.pc.in
1815
1816 CLEANFILES += \
1817         rules/99-systemd.rules \
1818         src/udev/udev.pc
1819
1820 EXTRA_DIST += \
1821         units/systemd-udevd.service.in \
1822         units/systemd-udev-trigger.service.in \
1823         units/systemd-udev-settle.service.in
1824
1825 CLEANFILES += \
1826         units/systemd-udevd.service \
1827         units/systemd-udev-trigger.service \
1828         units/systemd-udev-settle.service
1829
1830 systemd-install-hook:
1831         $(MKDIR_P) $(DESTDIR)$(systemunitdir)/sockets.target.wants
1832         ln -sf ../systemd-udevd-control.socket $(DESTDIR)$(systemunitdir)/sockets.target.wants/systemd-udevd-control.socket
1833         ln -sf ../systemd-udevd-kernel.socket $(DESTDIR)$(systemunitdir)/sockets.target.wants/systemd-udevd-kernel.socket
1834         $(MKDIR_P) $(DESTDIR)$(systemunitdir)/sysinit.target.wants
1835         ln -sf ../systemd-udevd.service $(DESTDIR)$(systemunitdir)/sysinit.target.wants/systemd-udevd.service
1836         ln -sf ../systemd-udev-trigger.service $(DESTDIR)$(systemunitdir)/sysinit.target.wants/systemd-udev-trigger.service
1837
1838 INSTALL_DATA_HOOKS += systemd-install-hook
1839
1840 bin_PROGRAMS += \
1841         udevadm
1842
1843 rootlibexec_PROGRAMS += \
1844         systemd-udevd
1845
1846 noinst_LTLIBRARIES += \
1847         libudev-core.la
1848
1849 libudev_core_la_SOURCES = \
1850         src/udev/udev.h \
1851         src/udev/udev-event.c \
1852         src/udev/udev-watch.c \
1853         src/udev/udev-node.c \
1854         src/udev/udev-rules.c \
1855         src/udev/udev-ctrl.c \
1856         src/udev/udev-builtin.c \
1857         src/udev/udev-builtin-blkid.c \
1858         src/udev/udev-builtin-btrfs.c \
1859         src/udev/udev-builtin-firmware.c \
1860         src/udev/udev-builtin-hwdb.c \
1861         src/udev/udev-builtin-input_id.c \
1862         src/udev/udev-builtin-kmod.c \
1863         src/udev/udev-builtin-path_id.c \
1864         src/udev/udev-builtin-usb_id.c \
1865         src/libsystemd-daemon/sd-daemon.c
1866
1867 libudev_core_la_CFLAGS = \
1868         $(AM_CFLAGS) \
1869         $(BLKID_CFLAGS) \
1870         $(KMOD_CFLAGS)
1871
1872 libudev_core_la_LIBADD = \
1873         libudev-private.la \
1874         libsystemd-label.la \
1875         libsystemd-shared.la \
1876         $(BLKID_LIBS) \
1877         $(KMOD_LIBS)
1878
1879 libudev_core_la_CPPFLAGS = \
1880         $(AM_CPPFLAGS) \
1881         -DFIRMWARE_PATH="$(FIRMWARE_PATH)"
1882
1883 if HAVE_ACL
1884 libudev_core_la_SOURCES += \
1885         src/udev/udev-builtin-uaccess.c \
1886         src/login/logind-acl.c \
1887         src/login/sd-login.c
1888
1889 libudev_core_la_LIBADD += \
1890         libsystemd-acl.la
1891 endif
1892
1893 systemd_udevd_SOURCES = \
1894         src/udev/udevd.c
1895
1896 systemd_udevd_LDADD = \
1897         libudev-core.la
1898
1899 udevadm_SOURCES = \
1900         src/udev/udevadm.c \
1901         src/udev/udevadm-info.c \
1902         src/udev/udevadm-control.c \
1903         src/udev/udevadm-monitor.c \
1904         src/udev/udevadm-hwdb.c \
1905         src/udev/udevadm-settle.c \
1906         src/udev/udevadm-trigger.c \
1907         src/udev/udevadm-test.c \
1908         src/udev/udevadm-test-builtin.c
1909
1910 udevadm_LDADD = \
1911         libudev-core.la \
1912         libsystemd-shared.la
1913
1914 # ------------------------------------------------------------------------------
1915 TESTS += \
1916         test/udev-test.pl \
1917         test/rules-test.sh
1918
1919 noinst_PROGRAMS += \
1920         test-libudev \
1921         test-udev
1922
1923 test_libudev_SOURCES = \
1924         src/test/test-libudev.c
1925
1926 test_libudev_LDADD = \
1927         libsystemd-label.la \
1928         libsystemd-shared.la \
1929         libudev.la
1930
1931 test_udev_SOURCES = \
1932         src/test/test-udev.c
1933
1934 test_udev_LDADD = \
1935         libudev-core.la \
1936         libsystemd-shared.la \
1937         $(BLKID_LIBS) \
1938         $(KMOD_LIBS) \
1939         $(SELINUX_LIBS)
1940
1941 if HAVE_ACL
1942 test_udev_LDADD += \
1943         libsystemd-acl.la
1944 endif
1945
1946 check_DATA += \
1947         test/sys
1948
1949 # packed sysfs test tree
1950 test/sys:
1951         $(AM_V_at)$(MKDIR_P) $(dir $@)
1952         $(AM_V_GEN)tar -C test/ -xJf $(top_srcdir)/test/sys.tar.xz
1953
1954 test-sys-distclean:
1955         -rm -rf test/sys
1956 DISTCLEAN_LOCAL_HOOKS += test-sys-distclean
1957
1958 EXTRA_DIST += \
1959         test/sys.tar.xz \
1960         test/udev-test.pl \
1961         test/rules-test.sh \
1962         test/rule-syntax-check.py
1963
1964 # ------------------------------------------------------------------------------
1965 ata_id_SOURCES = \
1966         src/udev/ata_id/ata_id.c
1967
1968 ata_id_LDADD = \
1969         libudev-private.la \
1970         libsystemd-shared.la
1971
1972 udevlibexec_PROGRAMS += \
1973         ata_id
1974
1975 # ------------------------------------------------------------------------------
1976 cdrom_id_SOURCES = \
1977         src/udev/cdrom_id/cdrom_id.c
1978
1979 cdrom_id_LDADD = \
1980         libudev.la \
1981         libsystemd-shared.la
1982
1983 udevlibexec_PROGRAMS += \
1984         cdrom_id
1985
1986 dist_udevrules_DATA += \
1987         rules/60-cdrom_id.rules
1988
1989 # ------------------------------------------------------------------------------
1990 collect_SOURCES = \
1991         src/udev/collect/collect.c
1992
1993 collect_LDADD = \
1994         libudev-private.la
1995
1996 udevlibexec_PROGRAMS += \
1997         collect
1998
1999 # ------------------------------------------------------------------------------
2000 scsi_id_SOURCES =\
2001         src/udev/scsi_id/scsi_id.c \
2002         src/udev/scsi_id/scsi_serial.c \
2003         src/udev/scsi_id/scsi.h \
2004         src/udev/scsi_id/scsi_id.h
2005
2006 scsi_id_LDADD = \
2007         libudev-private.la \
2008         libsystemd-shared.la
2009
2010 udevlibexec_PROGRAMS += \
2011         scsi_id
2012
2013 EXTRA_DIST += \
2014         src/udev/scsi_id/README
2015
2016 # ------------------------------------------------------------------------------
2017 v4l_id_SOURCES = \
2018         src/udev/v4l_id/v4l_id.c
2019
2020 v4l_id_LDADD = \
2021         libudev.la
2022
2023 udevlibexec_PROGRAMS += \
2024         v4l_id
2025
2026 dist_udevrules_DATA += \
2027         rules/60-persistent-v4l.rules
2028
2029 # ------------------------------------------------------------------------------
2030 accelerometer_SOURCES = \
2031         src/udev/accelerometer/accelerometer.c
2032
2033 accelerometer_LDADD = \
2034         libudev.la -lm \
2035         libsystemd-shared.la
2036
2037 udevlibexec_PROGRAMS += \
2038         accelerometer
2039
2040 dist_udevrules_DATA += \
2041         rules/61-accelerometer.rules
2042
2043 # ------------------------------------------------------------------------------
2044 if ENABLE_GUDEV
2045 if ENABLE_GTK_DOC
2046 SUBDIRS += \
2047         docs/gudev
2048 endif
2049
2050 libgudev_includedir = \
2051         $(includedir)/gudev-1.0/gudev
2052
2053 libgudev_include_HEADERS = \
2054         src/gudev/gudev.h \
2055         src/gudev/gudevenums.h \
2056         src/gudev/gudevenumtypes.h \
2057         src/gudev/gudevtypes.h \
2058         src/gudev/gudevclient.h \
2059         src/gudev/gudevdevice.h \
2060         src/gudev/gudevenumerator.h
2061
2062 lib_LTLIBRARIES += libgudev-1.0.la
2063
2064 pkgconfiglib_DATA += \
2065         src/gudev/gudev-1.0.pc
2066
2067 CLEANFILES += \
2068         src/gudev/gudev-1.0.pc
2069
2070 libgudev_1_0_la_SOURCES = \
2071         src/gudev/gudevenums.h \
2072         src/gudev/gudevenumtypes.h \
2073         src/gudev/gudevenumtypes.h\
2074         src/gudev/gudevtypes.h \
2075         src/gudev/gudevclient.h \
2076         src/gudev/gudevclient.c \
2077         src/gudev/gudevdevice.h \
2078         src/gudev/gudevdevice.c \
2079         src/gudev/gudevenumerator.h \
2080         src/gudev/gudevenumerator.c \
2081         src/gudev/gudevprivate.h
2082
2083 nodist_libgudev_1_0_la_SOURCES = \
2084         src/gudev/gudevmarshal.h \
2085         src/gudev/gudevmarshal.c \
2086         src/gudev/gudevenumtypes.h \
2087         src/gudev/gudevenumtypes.c
2088
2089 BUILT_SOURCES += \
2090         $(nodist_libgudev_1_0_la_SOURCES)
2091
2092 libgudev_1_0_la_CPPFLAGS = \
2093         $(AM_CPPFLAGS) \
2094         -I$(top_builddir)/src\
2095         -I$(top_srcdir)/src\
2096         -I$(top_builddir)/src/gudev \
2097         -I$(top_srcdir)/src/gudev \
2098         -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT \
2099         -D_GUDEV_COMPILATION \
2100         -DG_LOG_DOMAIN=\"GUdev\"
2101
2102 libgudev_1_0_la_CFLAGS = \
2103         $(AM_CFLAGS) \
2104         -fvisibility=default \
2105         $(GLIB_CFLAGS)
2106
2107 libgudev_1_0_la_LIBADD = \
2108         libudev.la \
2109         $(GLIB_LIBS)
2110
2111 libgudev_1_0_la_LDFLAGS = \
2112         $(AM_LDFLAGS) \
2113         -version-info $(LIBGUDEV_CURRENT):$(LIBGUDEV_REVISION):$(LIBGUDEV_AGE) \
2114         -export-dynamic -no-undefined \
2115         -export-symbols-regex '^g_udev_.*'
2116
2117 src/gudev/gudevmarshal.h: src/gudev/gudevmarshal.list
2118         $(AM_V_at)$(MKDIR_P) $(dir $@)
2119         $(AM_V_GEN)glib-genmarshal $< --prefix=g_udev_marshal --header > $@
2120
2121 src/gudev/gudevmarshal.c: src/gudev/gudevmarshal.list
2122         $(AM_V_at)$(MKDIR_P) $(dir $@)
2123         $(AM_V_GEN)echo '#include "gudevmarshal.h"' > $@ && \
2124         glib-genmarshal $< --prefix=g_udev_marshal --body >> $@
2125
2126 src/gudev/gudevenumtypes.%: src/gudev/gudevenumtypes.%.template src/gudev/gudevenums.h
2127         $(AM_V_at)$(MKDIR_P) $(dir $@)
2128         $(AM_V_GEN)glib-mkenums --template $^ > $@
2129
2130 if HAVE_INTROSPECTION
2131 -include $(INTROSPECTION_MAKEFILE)
2132
2133 src/gudev/GUdev-1.0.gir: libgudev-1.0.la
2134
2135 src_gudev_GUdev_1_0_gir_INCLUDES = GObject-2.0
2136
2137 src_gudev_GUdev_1_0_gir_CFLAGS = \
2138         $(INCLUDES) \
2139         -D_GUDEV_COMPILATION \
2140         -D_GUDEV_WORK_AROUND_DEV_T_BUG \
2141         -I$(top_srcdir)/src \
2142         -I$(top_builddir)/src \
2143         -I$(top_srcdir)/src/gdev \
2144         -I$(top_builddir)/src/gdev
2145
2146 src_gudev_GUdev_1_0_gir_LIBS = libgudev-1.0.la
2147
2148 src_gudev_GUdev_1_0_gir_SCANNERFLAGS = \
2149         --pkg-export=gudev-1.0 \
2150         --warn-all
2151
2152 src_gudev_GUdev_1_0_gir_FILES = \
2153         src/gudev/gudev.h \
2154         src/gudev/gudevtypes.h \
2155         src/gudev/gudevenums.h \
2156         src/gudev/gudevenumtypes.h \
2157         src/gudev/gudevclient.h \
2158         src/gudev/gudevdevice.h \
2159         src/gudev/gudevenumerator.h \
2160         src/gudev/gudevclient.c \
2161         src/gudev/gudevdevice.c \
2162         src/gudev/gudevenumerator.c
2163
2164 INTROSPECTION_GIRS = src/gudev/GUdev-1.0.gir
2165 INTROSPECTION_SCANNER_ARGS = --c-include=gudev/gudev.h
2166
2167 girdir = $(datadir)/gir-1.0
2168 gir_DATA = \
2169         src/gudev/GUdev-1.0.gir
2170
2171 typelibsdir = $(libdir)/girepository-1.0
2172 typelibs_DATA = \
2173         src/gudev/GUdev-1.0.typelib
2174
2175 CLEANFILES += $(gir_DATA) $(typelibs_DATA)
2176 endif # HAVE_INTROSPECTION
2177
2178 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
2179 libgudev-install-move-hook:
2180         if test "$(libdir)" != "$(rootlibdir)"; then \
2181                 $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
2182                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/libgudev-1.0.so) && \
2183                 so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
2184                 ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/libgudev-1.0.so && \
2185                 mv $(DESTDIR)$(libdir)/libgudev-1.0.so.* $(DESTDIR)$(rootlibdir); \
2186         fi
2187
2188 libgudev-uninstall-move-hook:
2189         rm -f $(DESTDIR)$(rootlibdir)/libgudev-1.0.so*
2190
2191 INSTALL_EXEC_HOOKS += libgudev-install-move-hook
2192 UNINSTALL_EXEC_HOOKS += libgudev-uninstall-move-hook
2193 endif
2194
2195 EXTRA_DIST += \
2196         src/gudev/gudev-1.0.pc.in \
2197         src/gudev/gudevmarshal.list \
2198         src/gudev/gudevenumtypes.h.template \
2199         src/gudev/gudevenumtypes.c.template \
2200         src/gudev/gjs-example.js \
2201         src/gudev/seed-example-enum.js \
2202         src/gudev/seed-example.js
2203
2204
2205 # ------------------------------------------------------------------------------
2206 if ENABLE_KEYMAP
2207 keymap_SOURCES = \
2208         src/udev/keymap/keymap.c
2209
2210 keymap_CPPFLAGS = \
2211         $(AM_CPPFLAGS) -I src/udev/keymap
2212
2213 keymap_LDADD = \
2214         libsystemd-shared.la
2215
2216 nodist_keymap_SOURCES = \
2217         src/udev/keymap/keys-from-name.h \
2218         src/udev/keymap/keys-to-name.h
2219
2220 BUILT_SOURCES += \
2221         $(nodist_keymap_SOURCES)
2222
2223 udevlibexec_PROGRAMS += \
2224         keymap
2225
2226 dist_doc_DATA += \
2227         src/udev/keymap/README.keymap.txt
2228
2229 dist_udevrules_DATA += \
2230         src/udev/keymap/95-keymap.rules \
2231         src/udev/keymap/95-keyboard-force-release.rules
2232
2233 dist_udevhome_SCRIPTS = \
2234         src/udev/keymap/findkeyboards \
2235         src/udev/keymap/keyboard-force-release.sh
2236
2237 TESTS += \
2238         src/udev/keymap/check-keymaps.sh
2239
2240 CLEANFILES += \
2241         src/udev/keymap/keys.txt \
2242         src/udev/keymap/keys-from-name.gperf \
2243         src/udev/keymap/keyboard-force-release.sh
2244
2245 udevkeymapdir = $(udevlibexecdir)/keymaps
2246 dist_udevkeymap_DATA = \
2247         keymaps/acer \
2248         keymaps/acer-aspire_5720 \
2249         keymaps/acer-aspire_8930 \
2250         keymaps/acer-aspire_5920g \
2251         keymaps/acer-aspire_6920 \
2252         keymaps/acer-travelmate_c300 \
2253         keymaps/asus \
2254         keymaps/compaq-e_evo \
2255         keymaps/dell \
2256         keymaps/dell-latitude-xt2 \
2257         keymaps/everex-xt5000 \
2258         keymaps/fujitsu-amilo_li_2732 \
2259         keymaps/fujitsu-amilo_pa_2548 \
2260         keymaps/fujitsu-amilo_pro_edition_v3505 \
2261         keymaps/fujitsu-amilo_pro_v3205 \
2262         keymaps/fujitsu-amilo_si_1520 \
2263         keymaps/fujitsu-esprimo_mobile_v5 \
2264         keymaps/fujitsu-esprimo_mobile_v6 \
2265         keymaps/genius-slimstar-320 \
2266         keymaps/hewlett-packard \
2267         keymaps/hewlett-packard-2510p_2530p \
2268         keymaps/hewlett-packard-compaq_elitebook \
2269         keymaps/hewlett-packard-pavilion \
2270         keymaps/hewlett-packard-presario-2100 \
2271         keymaps/hewlett-packard-tablet \
2272         keymaps/hewlett-packard-tx2 \
2273         keymaps/hewlett-packard_elitebook-8440p \
2274         keymaps/ibm-thinkpad-usb-keyboard-trackpoint \
2275         keymaps/inventec-symphony_6.0_7.0 \
2276         keymaps/lenovo-3000 \
2277         keymaps/lenovo-ideapad \
2278         keymaps/lenovo-thinkpad-usb-keyboard-trackpoint \
2279         keymaps/lenovo-thinkpad_x6_tablet \
2280         keymaps/lenovo-thinkpad_x200_tablet \
2281         keymaps/lg-x110 \
2282         keymaps/logitech-wave \
2283         keymaps/logitech-wave-cordless \
2284         keymaps/logitech-wave-pro-cordless \
2285         keymaps/maxdata-pro_7000 \
2286         keymaps/medion-fid2060 \
2287         keymaps/medionnb-a555 \
2288         keymaps/micro-star \
2289         keymaps/module-asus-w3j \
2290         keymaps/module-ibm \
2291         keymaps/module-lenovo \
2292         keymaps/module-sony \
2293         keymaps/module-sony-old \
2294         keymaps/module-sony-vgn \
2295         keymaps/module-sony-vpc \
2296         keymaps/olpc-xo \
2297         keymaps/onkyo \
2298         keymaps/oqo-model2 \
2299         keymaps/samsung-other \
2300         keymaps/samsung-90x3a \
2301         keymaps/samsung-sq1us \
2302         keymaps/samsung-sx20s \
2303         keymaps/toshiba-satellite_a100 \
2304         keymaps/toshiba-satellite_a110 \
2305         keymaps/toshiba-satellite_m30x \
2306         keymaps/zepto-znote
2307
2308 udevkeymapforcereldir = $(udevlibexecdir)/keymaps/force-release
2309 dist_udevkeymapforcerel_DATA = \
2310         keymaps-force-release/dell-touchpad \
2311         keymaps-force-release/dell-xps \
2312         keymaps-force-release/hp-other \
2313         keymaps-force-release/samsung-other \
2314         keymaps-force-release/samsung-90x3a \
2315         keymaps-force-release/common-volume-keys
2316
2317 src/udev/keymap/keys.txt: Makefile
2318         $(AM_V_at)$(MKDIR_P) $(dir $@)
2319         $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include linux/input.h - < /dev/null | $(AWK) '/^#define[ \t]+KEY_[^ ]+[ \t]+[0-9]/ { if ($$2 != "KEY_MAX") { print $$2 } }' | sed 's/^KEY_COFFEE$$/KEY_SCREENLOCK/' > $@
2320
2321 src/udev/keymap/keys-from-name.gperf: src/udev/keymap/keys.txt Makefile
2322         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print $$1 ", " $$1 }' < $< > $@
2323
2324 src/udev/keymap/keys-from-name.h: src/udev/keymap/keys-from-name.gperf Makefile
2325         $(AM_V_GEN)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_key -H hash_key_name -p -C < $< > $@
2326
2327 src/udev/keymap/keys-to-name.h: src/udev/keymap/keys.txt Makefile
2328         $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char* const key_names[KEY_CNT] = { "} { print "[" $$1 "] = \"" $$1 "\"," } END{print "};"}' < $< > $@
2329 endif
2330
2331 EXTRA_DIST += \
2332         src/udev/keymap/check-keymaps.sh \
2333         src/udev/keymap/keyboard-force-release.sh.in
2334
2335 # ------------------------------------------------------------------------------
2336 mtd_probe_SOURCES =  \
2337         src/udev/mtd_probe/mtd_probe.c \
2338         src/udev/mtd_probe/mtd_probe.h \
2339         src/udev/mtd_probe/probe_smartmedia.c
2340
2341 mtd_probe_CPPFLAGS = \
2342         $(AM_CPPFLAGS)
2343
2344 dist_udevrules_DATA += \
2345         rules/75-probe_mtd.rules
2346
2347 udevlibexec_PROGRAMS += \
2348         mtd_probe
2349
2350 # ------------------------------------------------------------------------------
2351 libsystemd_id128_la_SOURCES = \
2352         src/libsystemd-id128/sd-id128.c
2353
2354 libsystemd_id128_la_CFLAGS = \
2355         $(AM_CFLAGS) \
2356         -fvisibility=hidden
2357
2358 libsystemd_id128_la_LDFLAGS = \
2359         $(AM_LDFLAGS) \
2360         -shared \
2361         -version-info $(LIBSYSTEMD_ID128_CURRENT):$(LIBSYSTEMD_ID128_REVISION):$(LIBSYSTEMD_ID128_AGE) \
2362         -Wl,--version-script=$(top_srcdir)/src/libsystemd-id128/libsystemd-id128.sym
2363
2364 libsystemd_id128_la_LIBADD = \
2365         libsystemd-shared.la
2366
2367 libsystemd_id128_internal_la_SOURCES = \
2368         $(libsystemd_id128_la_SOURCES)
2369
2370 test_id128_SOURCES = \
2371         src/test/test-id128.c
2372
2373 test_id128_LDADD = \
2374         libsystemd-shared.la \
2375         libsystemd-id128-internal.la
2376
2377 noinst_PROGRAMS += \
2378         test-id128
2379
2380 TESTS += \
2381         test-id128
2382
2383 pkginclude_HEADERS += \
2384         src/systemd/sd-id128.h
2385
2386 lib_LTLIBRARIES += \
2387         libsystemd-id128.la
2388
2389 noinst_LTLIBRARIES += \
2390         libsystemd-id128-internal.la
2391
2392 pkgconfiglib_DATA += \
2393         src/libsystemd-id128/libsystemd-id128.pc
2394
2395 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
2396 libsystemd-id128-install-hook:
2397         if test "$(libdir)" != "$(rootlibdir)"; then \
2398                 $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
2399                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/libsystemd-id128.so) && \
2400                 so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
2401                 ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/libsystemd-id128.so && \
2402                 mv $(DESTDIR)$(libdir)/libsystemd-id128.so.* $(DESTDIR)$(rootlibdir); \
2403         fi
2404
2405 INSTALL_EXEC_HOOKS += \
2406         libsystemd-id128-install-hook
2407
2408 libsystemd-id128-uninstall-hook:
2409         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-id128.so*
2410
2411 UNINSTALL_EXEC_HOOKS += \
2412         libsystemd-id128-uninstall-hook
2413
2414 EXTRA_DIST += \
2415         src/libsystemd-id128/libsystemd-id128.pc.in \
2416         src/libsystemd-id128/libsystemd-id128.sym
2417
2418 # ------------------------------------------------------------------------------
2419 systemd_journald_SOURCES = \
2420         src/journal/journald.c \
2421         src/journal/journald.h \
2422         src/journal/journald-kmsg.c \
2423         src/journal/journald-kmsg.h \
2424         src/journal/journald-syslog.c \
2425         src/journal/journald-syslog.h \
2426         src/journal/journald-stream.c \
2427         src/journal/journald-stream.h \
2428         src/journal/journald-console.c \
2429         src/journal/journald-console.h \
2430         src/journal/journald-native.c \
2431         src/journal/journald-native.h \
2432         src/journal/journald-rate-limit.c \
2433         src/journal/journald-rate-limit.h \
2434         src/journal/journal-internal.h
2435
2436 nodist_systemd_journald_SOURCES = \
2437         src/journal/journald-gperf.c
2438
2439 systemd_journald_LDADD = \
2440         libsystemd-label.la \
2441         libsystemd-shared.la \
2442         libsystemd-audit.la \
2443         libsystemd-daemon.la \
2444         libsystemd-id128-internal.la \
2445         libsystemd-journal-internal.la \
2446         libudev.la
2447
2448 if ENABLE_LOGIND
2449 systemd_journald_LDADD += \
2450         libsystemd-login-internal.la
2451 endif
2452
2453 if HAVE_ACL
2454 systemd_journald_LDADD += \
2455         libsystemd-acl.la
2456 endif
2457
2458 systemd_cat_SOURCES = \
2459         src/journal/cat.c
2460
2461 systemd_cat_LDADD = \
2462         libsystemd-shared.la \
2463         libsystemd-journal-internal.la
2464
2465 journalctl_SOURCES = \
2466         src/journal/journalctl.c
2467
2468 journalctl_CFLAGS = \
2469         $(AM_CFLAGS)
2470
2471 journalctl_LDADD = \
2472         libsystemd-shared.la \
2473         libsystemd-journal-internal.la \
2474         libsystemd-id128-internal.la \
2475         libsystemd-logs.la
2476
2477 if HAVE_QRENCODE
2478 journalctl_SOURCES += \
2479         src/journal/journal-qrcode.c \
2480         src/journal/journal-qrcode.h
2481
2482 journalctl_CFLAGS += \
2483         $(QRENCODE_CFLAGS)
2484
2485 journalctl_LDADD += \
2486         $(QRENCODE_LIBS)
2487 endif
2488
2489 systemd_coredumpctl_SOURCES = \
2490         src/journal/coredumpctl.c
2491
2492 systemd_coredumpctl_LDADD = \
2493         libsystemd-shared.la \
2494         libsystemd-journal.la
2495
2496 test_journal_SOURCES = \
2497         src/journal/test-journal.c
2498
2499 test_journal_LDADD = \
2500         libsystemd-shared.la \
2501         libsystemd-journal-internal.la \
2502         libsystemd-id128-internal.la
2503
2504 test_journal_send_SOURCES = \
2505         src/journal/test-journal-send.c
2506
2507 test_journal_send_LDADD = \
2508         libsystemd-shared.la \
2509         libsystemd-journal-internal.la \
2510         libsystemd-id128-internal.la
2511
2512 test_journal_syslog_SOURCES = \
2513         src/journal/test-journal-syslog.c \
2514         src/journal/journald-syslog.c
2515
2516 test_journal_syslog_LDADD = \
2517         libsystemd-shared.la \
2518         libsystemd-journal-internal.la \
2519         libsystemd-id128-internal.la
2520
2521 test_journal_match_SOURCES = \
2522         src/journal/test-journal-match.c
2523
2524 test_journal_match_LDADD = \
2525         libsystemd-shared.la \
2526         libsystemd-journal-internal.la \
2527         libsystemd-id128-internal.la
2528
2529 test_journal_enum_SOURCES = \
2530         src/journal/test-journal-enum.c
2531
2532 test_journal_enum_LDADD = \
2533         libsystemd-shared.la \
2534         libsystemd-journal-internal.la \
2535         libsystemd-id128-internal.la
2536
2537 test_journal_stream_SOURCES = \
2538         src/journal/test-journal-stream.c
2539
2540 test_journal_stream_LDADD = \
2541         libsystemd-shared.la \
2542         libsystemd-journal-internal.la \
2543         libsystemd-id128-internal.la
2544
2545 test_journal_verify_SOURCES = \
2546         src/journal/test-journal-verify.c
2547
2548 test_journal_verify_LDADD = \
2549         libsystemd-shared.la \
2550         libsystemd-journal-internal.la \
2551         libsystemd-id128-internal.la
2552
2553 test_mmap_cache_SOURCES = \
2554         src/journal/test-mmap-cache.c
2555
2556 test_mmap_cache_LDADD = \
2557         libsystemd-shared.la \
2558         libsystemd-journal-internal.la
2559
2560 libsystemd_journal_la_SOURCES = \
2561         src/journal/sd-journal.c \
2562         src/systemd/sd-journal.h \
2563         src/journal/journal-file.c \
2564         src/journal/journal-file.h \
2565         src/journal/journal-vacuum.c \
2566         src/journal/journal-vacuum.h \
2567         src/journal/journal-verify.c \
2568         src/journal/journal-verify.h \
2569         src/journal/lookup3.c \
2570         src/journal/lookup3.h \
2571         src/journal/journal-send.c \
2572         src/journal/journal-def.h \
2573         src/journal/compress.h \
2574         src/journal/mmap-cache.c \
2575         src/journal/mmap-cache.h
2576
2577 libsystemd_journal_la_CFLAGS = \
2578         $(AM_CFLAGS) \
2579         -fvisibility=hidden
2580
2581 libsystemd_journal_la_LDFLAGS = \
2582         $(AM_LDFLAGS) \
2583         -shared \
2584         -version-info $(LIBSYSTEMD_JOURNAL_CURRENT):$(LIBSYSTEMD_JOURNAL_REVISION):$(LIBSYSTEMD_JOURNAL_AGE) \
2585         -Wl,--version-script=$(top_srcdir)/src/journal/libsystemd-journal.sym
2586
2587 libsystemd_journal_la_LIBADD = \
2588         libsystemd-shared.la \
2589         libsystemd-id128-internal.la
2590
2591 libsystemd_journal_internal_la_SOURCES = \
2592         $(libsystemd_journal_la_SOURCES)
2593
2594 libsystemd_journal_internal_la_CFLAGS = \
2595         $(AM_CFLAGS)
2596
2597 libsystemd_journal_internal_la_LIBADD =
2598
2599 if HAVE_XZ
2600 libsystemd_journal_la_SOURCES += \
2601         src/journal/compress.c
2602
2603 libsystemd_journal_la_CFLAGS += \
2604         $(XZ_CFLAGS)
2605
2606 libsystemd_journal_la_LIBADD += \
2607         $(XZ_LIBS)
2608
2609 libsystemd_journal_internal_la_CFLAGS += \
2610         $(XZ_CFLAGS)
2611
2612 libsystemd_journal_internal_la_LIBADD += \
2613         $(XZ_LIBS)
2614
2615 endif
2616
2617 if HAVE_GCRYPT
2618 libsystemd_journal_la_SOURCES += \
2619         src/journal/journal-authenticate.c \
2620         src/journal/journal-authenticate.h \
2621         src/journal/fsprg.c \
2622         src/journal/fsprg.h
2623
2624 libsystemd_journal_la_CFLAGS += \
2625         $(GCRYPT_CFLAGS) \
2626         -Wno-pointer-arith
2627
2628 libsystemd_journal_la_LIBADD += \
2629         $(GCRYPT_LIBS)
2630
2631 libsystemd_journal_internal_la_CFLAGS += \
2632         $(GCRYPT_CFLAGS) \
2633         -Wno-pointer-arith
2634
2635 libsystemd_journal_internal_la_LIBADD += \
2636         $(GCRYPT_LIBS)
2637 endif
2638
2639 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
2640 libsystemd-journal-install-hook:
2641         if test "$(libdir)" != "$(rootlibdir)"; then \
2642                 $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
2643                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/libsystemd-journal.so) && \
2644                 so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
2645                 ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/libsystemd-journal.so && \
2646                 mv $(DESTDIR)$(libdir)/libsystemd-journal.so.* $(DESTDIR)$(rootlibdir); \
2647         fi
2648
2649 INSTALL_EXEC_HOOKS += \
2650         libsystemd-journal-install-hook
2651
2652 libsystemd-journal-uninstall-hook:
2653         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-journal.so*
2654
2655 UNINSTALL_EXEC_HOOKS += \
2656         libsystemd-journal-uninstall-hook
2657
2658 noinst_PROGRAMS += \
2659         test-journal \
2660         test-journal-send \
2661         test-journal-syslog \
2662         test-journal-match \
2663         test-journal-enum \
2664         test-journal-stream \
2665         test-journal-verify \
2666         test-mmap-cache
2667
2668 TESTS += \
2669         test-journal \
2670         test-journal-send \
2671         test-journal-syslog \
2672         test-journal-match \
2673         test-journal-stream \
2674         test-journal-verify \
2675         test-mmap-cache
2676
2677 pkginclude_HEADERS += \
2678         src/systemd/sd-journal.h \
2679         src/systemd/sd-messages.h
2680
2681 lib_LTLIBRARIES += \
2682         libsystemd-journal.la
2683
2684 noinst_LTLIBRARIES += \
2685         libsystemd-journal-internal.la
2686
2687 rootlibexec_PROGRAMS += \
2688         systemd-journald
2689
2690 rootbin_PROGRAMS += \
2691         journalctl
2692
2693 bin_PROGRAMS += \
2694         systemd-coredumpctl \
2695         systemd-cat
2696
2697 dist_systemunit_DATA += \
2698         units/systemd-journald.socket
2699
2700 nodist_systemunit_DATA += \
2701         units/systemd-journald.service \
2702         units/systemd-journal-flush.service
2703
2704 dist_pkgsysconf_DATA += \
2705         src/journal/journald.conf
2706
2707 pkgconfiglib_DATA += \
2708         src/journal/libsystemd-journal.pc
2709
2710 journal-install-data-hook:
2711         $(MKDIR_P) -m 0755 \
2712                 $(DESTDIR)$(systemunitdir)/sockets.target.wants \
2713                 $(DESTDIR)$(systemunitdir)/sysinit.target.wants
2714         ( cd $(DESTDIR)$(systemunitdir)/sockets.target.wants && \
2715                 rm -f systemd-journald.socket && \
2716                 $(LN_S) ../systemd-journald.socket )
2717         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
2718                 rm -f systemd-journald.service systemd-journal-flush.service && \
2719                 $(LN_S) ../systemd-journald.service && \
2720                 $(LN_S) ../systemd-journal-flush.service )
2721
2722 INSTALL_DATA_HOOKS += \
2723         journal-install-data-hook
2724
2725 EXTRA_DIST += \
2726         src/journal/libsystemd-journal.pc.in \
2727         src/journal/libsystemd-journal.sym \
2728         units/systemd-journald.service.in \
2729         units/systemd-journal-flush.service.in \
2730         src/journal/journald-gperf.gperf
2731
2732 CLEANFILES += \
2733         src/journal/journald-gperf.c
2734
2735 if HAVE_MICROHTTPD
2736
2737 gatewayddocumentrootdir=$(pkgdatadir)/gatewayd
2738
2739 rootlibexec_PROGRAMS += \
2740         systemd-journal-gatewayd
2741
2742 systemd_journal_gatewayd_SOURCES = \
2743         src/journal/journal-gatewayd.c
2744
2745 systemd_journal_gatewayd_LDADD = \
2746         libsystemd-shared.la \
2747         libsystemd-logs.la \
2748         libsystemd-journal-internal.la \
2749         libsystemd-id128-internal.la \
2750         libsystemd-daemon.la \
2751         $(MICROHTTPD_LIBS)
2752
2753 systemd_journal_gatewayd_CFLAGS = \
2754         -DDOCUMENT_ROOT=\"$(gatewayddocumentrootdir)\" \
2755         $(AM_CFLAGS) \
2756         $(MICROHTTPD_CFLAGS)
2757
2758 dist_systemunit_DATA += \
2759         units/systemd-journal-gatewayd.socket
2760
2761 nodist_systemunit_DATA += \
2762         units/systemd-journal-gatewayd.service
2763
2764 dist_gatewayddocumentroot_DATA = \
2765         src/journal/browse.html
2766
2767 endif
2768
2769 EXTRA_DIST += \
2770         units/systemd-journal-gatewayd.service.in
2771
2772 # ------------------------------------------------------------------------------
2773 if ENABLE_COREDUMP
2774 systemd_coredump_SOURCES = \
2775         src/journal/coredump.c
2776
2777 systemd_coredump_LDADD = \
2778         libsystemd-journal-internal.la \
2779         libsystemd-label.la \
2780         libsystemd-shared.la
2781
2782 if ENABLE_LOGIND
2783 systemd_coredump_LDADD += \
2784         libsystemd-login-internal.la
2785 endif
2786
2787 rootlibexec_PROGRAMS += \
2788         systemd-coredump
2789
2790 sysctl_DATA = \
2791         sysctl.d/coredump.conf
2792
2793 CLEANFILES += \
2794         sysctl.d/coredump.conf
2795 endif
2796
2797 EXTRA_DIST += \
2798         sysctl.d/coredump.conf.in
2799
2800 # ------------------------------------------------------------------------------
2801 if ENABLE_BINFMT
2802 systemd_binfmt_SOURCES = \
2803         src/binfmt/binfmt.c
2804
2805 systemd_binfmt_LDADD = \
2806         libsystemd-shared.la
2807
2808 rootlibexec_PROGRAMS += \
2809         systemd-binfmt
2810
2811 dist_systemunit_DATA += \
2812         units/proc-sys-fs-binfmt_misc.automount \
2813         units/proc-sys-fs-binfmt_misc.mount
2814
2815 nodist_systemunit_DATA += \
2816         units/systemd-binfmt.service
2817
2818 binfmt-install-data-hook:
2819         $(MKDIR_P) -m 0755 \
2820                 $(DESTDIR)$(prefix)/lib/binfmt.d \
2821                 $(DESTDIR)$(sysconfdir)/binfmt.d \
2822                 $(DESTDIR)$(systemunitdir)/sysinit.target.wants
2823         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
2824                 rm -f systemd-binfmt.service \
2825                         proc-sys-fs-binfmt_misc.automount && \
2826                 $(LN_S) ../systemd-binfmt.service systemd-binfmt.service && \
2827                 $(LN_S) ../proc-sys-fs-binfmt_misc.automount proc-sys-fs-binfmt_misc.automount )
2828
2829 INSTALL_DATA_HOOKS += \
2830         binfmt-install-data-hook
2831
2832 MANPAGES += \
2833         man/binfmt.d.5 \
2834         man/systemd-binfmt.service.8
2835
2836 MANPAGES_ALIAS +=  \
2837         man/systemd-binfmt.8
2838
2839 man/systemd-binfmt.8: man/systemd-binfmt.service.8
2840 endif
2841
2842 EXTRA_DIST += \
2843         units/systemd-binfmt.service.in
2844
2845 # ------------------------------------------------------------------------------
2846 if ENABLE_VCONSOLE
2847 systemd_vconsole_setup_SOURCES = \
2848         src/vconsole/vconsole-setup.c
2849
2850 systemd_vconsole_setup_LDADD = \
2851         libsystemd-shared.la
2852
2853 rootlibexec_PROGRAMS += \
2854         systemd-vconsole-setup
2855
2856 nodist_systemunit_DATA += \
2857         units/systemd-vconsole-setup.service
2858
2859 vconsole-install-data-hook:
2860         $(MKDIR_P) -m 0755 \
2861                 $(DESTDIR)$(systemunitdir)/sysinit.target.wants
2862         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
2863                 rm -f systemd-vconsole-setup.service && \
2864                 $(LN_S) ../systemd-vconsole-setup.service systemd-vconsole-setup.service )
2865
2866 INSTALL_DATA_HOOKS += \
2867         vconsole-install-data-hook
2868
2869 MANPAGES += \
2870         man/vconsole.conf.5 \
2871         man/systemd-vconsole-setup.service.8
2872
2873 MANPAGES_ALIAS += \
2874         man/systemd-vconsole-setup.8
2875
2876 man/systemd-vconsole-setup.8: man/systemd-vconsole-setup.service.8
2877 endif
2878
2879 EXTRA_DIST += \
2880         units/systemd-vconsole-setup.service.in
2881
2882 # ------------------------------------------------------------------------------
2883 if ENABLE_READAHEAD
2884 systemd_readahead_SOURCES = \
2885         src/readahead/readahead.c \
2886         src/readahead/readahead-collect.c \
2887         src/readahead/readahead-replay.c \
2888         src/readahead/readahead-analyze.c \
2889         src/readahead/readahead-common.c \
2890         src/readahead/readahead-common.h
2891
2892 systemd_readahead_LDADD = \
2893         libsystemd-shared.la \
2894         libsystemd-daemon.la \
2895         libudev.la
2896
2897 dist_doc_DATA += \
2898         src/readahead/sd-readahead.c \
2899         src/systemd/sd-readahead.h
2900
2901 rootlibexec_PROGRAMS += \
2902         systemd-readahead
2903
2904 dist_systemunit_DATA += \
2905         units/systemd-readahead-drop.service \
2906         units/systemd-readahead-done.timer
2907
2908 nodist_systemunit_DATA += \
2909         units/systemd-readahead-collect.service \
2910         units/systemd-readahead-replay.service \
2911         units/systemd-readahead-done.service
2912
2913 MANPAGES += \
2914         man/sd_readahead.3 \
2915         man/sd-readahead.3 \
2916         man/systemd-readahead-replay.service.8
2917
2918 MANPAGES_ALIAS += \
2919         man/systemd-readahead-collect.service.8 \
2920         man/systemd-readahead-done.service.8 \
2921         man/systemd-readahead-done.timer.8 \
2922         man/systemd-readahead.8
2923
2924 man/systemd-readahead-collect.service.8: man/systemd-readahead-replay.service.8
2925 man/systemd-readahead-done.service.8: man/systemd-readahead-replay.service.8
2926 man/systemd-readahead-done.timer.8: man/systemd-readahead-replay.service.8
2927 man/systemd-readahead.8: man/systemd-readahead-replay.service.8
2928
2929 endif
2930
2931 EXTRA_DIST += \
2932         units/systemd-readahead-collect.service.in \
2933         units/systemd-readahead-replay.service.in \
2934         units/systemd-readahead-done.service.in
2935
2936 # ------------------------------------------------------------------------------
2937 if ENABLE_QUOTACHECK
2938 rootlibexec_PROGRAMS += \
2939         systemd-quotacheck
2940
2941 nodist_systemunit_DATA += \
2942         units/systemd-quotacheck.service
2943
2944 systemd_quotacheck_SOURCES = \
2945         src/quotacheck/quotacheck.c
2946
2947 systemd_quotacheck_LDADD = \
2948         libsystemd-shared.la
2949
2950 MANPAGES += \
2951         man/systemd-quotacheck.service.8
2952
2953 MANPAGES_ALIAS += \
2954         man/systemd-quotacheck.8
2955
2956 man/systemd-quotacheck.8: man/systemd-quotacheck.service.8
2957
2958 endif
2959
2960 EXTRA_DIST += \
2961         units/systemd-quotacheck.service.in
2962
2963 nodist_systemunit_DATA += \
2964         units/quotaon.service
2965
2966 # ------------------------------------------------------------------------------
2967 if ENABLE_RANDOMSEED
2968 rootlibexec_PROGRAMS += \
2969         systemd-random-seed
2970
2971 nodist_systemunit_DATA += \
2972         units/systemd-random-seed-save.service \
2973         units/systemd-random-seed-load.service
2974
2975 systemd_random_seed_SOURCES = \
2976         src/random-seed/random-seed.c
2977
2978 systemd_random_seed_LDADD = \
2979         libsystemd-label.la \
2980         libsystemd-shared.la
2981
2982 randomseed-install-data-hook:
2983         $(MKDIR_P) -m 0755 \
2984                 $(DESTDIR)$(systemunitdir)/shutdown.target.wants \
2985                 $(DESTDIR)$(systemunitdir)/sysinit.target.wants
2986         ( cd $(DESTDIR)$(systemunitdir)/shutdown.target.wants && \
2987                 rm -f systemd-random-seed-save.service && \
2988                 $(LN_S) ../systemd-random-seed-save.service systemd-random-seed-save.service )
2989         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
2990                 rm -f systemd-random-seed-load.service && \
2991                 $(LN_S) ../systemd-random-seed-load.service systemd-random-seed-load.service )
2992
2993 INSTALL_DATA_HOOKS += \
2994         randomseed-install-data-hook
2995
2996 MANPAGES += \
2997         man/systemd-random-seed-load.service.8
2998
2999 MANPAGES_ALIAS +=  \
3000         man/systemd-random-seed-save.service.8 \
3001         man/systemd-random-seed.8
3002
3003 man/systemd-random-seed-save.service.8: man/systemd-random-seed-load.service.8
3004 man/systemd-random-seed.8: man/systemd-random-seed-load.service.8
3005
3006 endif
3007
3008 EXTRA_DIST += \
3009         units/systemd-random-seed-save.service.in \
3010         units/systemd-random-seed-load.service.in
3011
3012 # ------------------------------------------------------------------------------
3013 if HAVE_LIBCRYPTSETUP
3014 rootlibexec_PROGRAMS += \
3015         systemd-cryptsetup
3016
3017 systemgenerator_PROGRAMS += \
3018         systemd-cryptsetup-generator
3019
3020 dist_systemunit_DATA += \
3021         units/cryptsetup.target
3022
3023 systemd_cryptsetup_SOURCES = \
3024         src/cryptsetup/cryptsetup.c
3025
3026 systemd_cryptsetup_CFLAGS = \
3027         $(AM_CFLAGS) \
3028         $(LIBCRYPTSETUP_CFLAGS)
3029
3030 systemd_cryptsetup_LDADD = \
3031         libsystemd-label.la \
3032         libsystemd-shared.la \
3033         libudev.la \
3034         $(LIBCRYPTSETUP_LIBS)
3035
3036 systemd_cryptsetup_generator_SOURCES = \
3037         src/cryptsetup/cryptsetup-generator.c
3038
3039 systemd_cryptsetup_generator_LDADD = \
3040         libsystemd-label.la \
3041         libsystemd-shared.la
3042
3043 cryptsetup-install-data-hook:
3044         $(MKDIR_P) -m 0755 \
3045                 $(DESTDIR)$(systemunitdir)/sysinit.target.wants
3046         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
3047                 rm -f cryptsetup.target && \
3048                 $(LN_S) ../cryptsetup.target cryptsetup.target )
3049
3050 INSTALL_DATA_HOOKS += \
3051         cryptsetup-install-data-hook
3052
3053 MANPAGES += \
3054         man/systemd-cryptsetup@.service.8 \
3055         man/systemd-cryptsetup-generator.8 \
3056         man/crypttab.5
3057
3058 MANPAGES_ALIAS += \
3059         man/systemd-cryptsetup.8
3060
3061 man/systemd-cryptsetup.8: man/systemd-cryptsetup@.service.8
3062
3063 endif
3064
3065 # ------------------------------------------------------------------------------
3066 if ENABLE_HOSTNAMED
3067 systemd_hostnamed_SOURCES = \
3068         src/hostname/hostnamed.c
3069
3070 systemd_hostnamed_CFLAGS = \
3071         $(AM_CFLAGS) \
3072         $(DBUS_CFLAGS)
3073
3074 systemd_hostnamed_LDADD = \
3075         libsystemd-shared.la \
3076         libsystemd-daemon.la \
3077         libsystemd-dbus.la
3078
3079 rootlibexec_PROGRAMS += \
3080         systemd-hostnamed
3081
3082 nodist_systemunit_DATA += \
3083         units/systemd-hostnamed.service
3084
3085 dist_dbuspolicy_DATA += \
3086         src/hostname/org.freedesktop.hostname1.conf
3087
3088 dist_dbussystemservice_DATA += \
3089         src/hostname/org.freedesktop.hostname1.service
3090
3091 polkitpolicy_files += \
3092         src/hostname/org.freedesktop.hostname1.policy
3093
3094 dbusinterface_DATA += \
3095         org.freedesktop.hostname1.xml
3096
3097 org.freedesktop.hostname1.xml: systemd-hostnamed
3098         $(AM_V_GEN)$(LIBTOOL) --mode=execute $(OBJCOPY) -O binary -j introspect.hostname1 $< $@.tmp && \
3099                 $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
3100                 $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
3101
3102 hostnamed-install-data-hook:
3103         ( cd $(DESTDIR)$(systemunitdir) && \
3104                 rm -f dbus-org.freedesktop.hostname1.service && \
3105                 $(LN_S) systemd-hostnamed.service dbus-org.freedesktop.hostname1.service )
3106
3107 INSTALL_DATA_HOOKS += \
3108         hostnamed-install-data-hook
3109
3110 MANPAGES += \
3111         man/systemd-hostnamed.service.8
3112
3113 MANPAGES_ALIAS += \
3114         man/systemd-hostnamed.8
3115
3116 man/systemd-hostnamed.8: man/systemd-hostnamed.service.8
3117
3118 hostnamectl_SOURCES = \
3119         src/hostname/hostnamectl.c
3120
3121 hostnamectl_CFLAGS = \
3122         $(AM_CFLAGS) \
3123         $(DBUS_CFLAGS)
3124
3125 hostnamectl_LDADD = \
3126         libsystemd-shared.la \
3127         libsystemd-dbus.la \
3128         libsystemd-id128-internal.la
3129
3130 bin_PROGRAMS += \
3131         hostnamectl
3132
3133 MANPAGES += \
3134         man/hostnamectl.1
3135
3136 endif
3137
3138 polkitpolicy_in_files += \
3139         src/hostname/org.freedesktop.hostname1.policy.in
3140
3141 EXTRA_DIST += \
3142         units/systemd-hostnamed.service.in
3143
3144 # ------------------------------------------------------------------------------
3145 if ENABLE_LOCALED
3146 systemd_localed_SOURCES = \
3147         src/locale/localed.c
3148
3149 systemd_localed_CFLAGS = \
3150         $(AM_CFLAGS) \
3151         $(DBUS_CFLAGS)
3152
3153 systemd_localed_LDADD = \
3154         libsystemd-label.la \
3155         libsystemd-shared.la \
3156         libsystemd-daemon.la \
3157         libsystemd-dbus.la
3158
3159 nodist_systemunit_DATA += \
3160         units/systemd-localed.service
3161
3162 rootlibexec_PROGRAMS += \
3163         systemd-localed
3164
3165 dist_dbuspolicy_DATA += \
3166         src/locale/org.freedesktop.locale1.conf
3167
3168 dist_dbussystemservice_DATA += \
3169         src/locale/org.freedesktop.locale1.service
3170
3171 polkitpolicy_files += \
3172         src/locale/org.freedesktop.locale1.policy
3173
3174 dbusinterface_DATA += \
3175         org.freedesktop.locale1.xml
3176
3177 org.freedesktop.locale1.xml: systemd-localed
3178         $(AM_V_GEN)$(LIBTOOL) --mode=execute $(OBJCOPY) -O binary -j introspect.locale1 $< $@.tmp && \
3179                 $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
3180                 $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
3181
3182 localed-install-data-hook:
3183         ( cd $(DESTDIR)$(systemunitdir) && \
3184                 rm -f dbus-org.freedesktop.locale1.service && \
3185                 $(LN_S) systemd-localed.service dbus-org.freedesktop.locale1.service )
3186
3187 INSTALL_DATA_HOOKS += \
3188         localed-install-data-hook
3189
3190 MANPAGES += \
3191         man/systemd-localed.service.8
3192
3193 MANPAGES_ALIAS += \
3194         man/systemd-localed.8
3195
3196 man/systemd-localed.8: man/systemd-localed.service.8
3197
3198 dist_pkgdata_DATA += \
3199         src/locale/kbd-model-map
3200
3201 dist_noinst_SCRIPT = \
3202         src/locale/generate-kbd-model-map
3203
3204 update-kbd-model-map:
3205         src/locale/generate-kbd-model-map > src/locale/kbd-model-map
3206
3207 localectl_SOURCES = \
3208         src/locale/localectl.c
3209
3210 localectl_CFLAGS = \
3211         $(AM_CFLAGS) \
3212         $(DBUS_CFLAGS)
3213
3214 localectl_LDADD = \
3215         libsystemd-shared.la \
3216         libsystemd-dbus.la \
3217         libsystemd-id128-internal.la
3218
3219 bin_PROGRAMS += \
3220         localectl
3221
3222 MANPAGES += \
3223         man/localectl.1
3224
3225 endif
3226
3227 polkitpolicy_in_files += \
3228         src/locale/org.freedesktop.locale1.policy.in
3229
3230 EXTRA_DIST += \
3231         units/systemd-localed.service.in
3232
3233 # ------------------------------------------------------------------------------
3234 if ENABLE_TIMEDATED
3235 systemd_timedated_SOURCES = \
3236         src/timedate/timedated.c
3237
3238 systemd_timedated_CFLAGS = \
3239         $(AM_CFLAGS) \
3240         $(DBUS_CFLAGS)
3241
3242 systemd_timedated_LDADD = \
3243         libsystemd-shared.la \
3244         libsystemd-daemon.la \
3245         libsystemd-dbus.la
3246
3247 rootlibexec_PROGRAMS += \
3248         systemd-timedated
3249
3250 dist_dbussystemservice_DATA += \
3251         src/timedate/org.freedesktop.timedate1.service
3252
3253 dist_dbuspolicy_DATA += \
3254         src/timedate/org.freedesktop.timedate1.conf
3255
3256 nodist_systemunit_DATA += \
3257         units/systemd-timedated.service
3258
3259 polkitpolicy_files += \
3260         src/timedate/org.freedesktop.timedate1.policy
3261
3262 org.freedesktop.timedate1.xml: systemd-timedated
3263         $(AM_V_GEN)$(LIBTOOL) --mode=execute $(OBJCOPY) -O binary -j introspect.timedate1 $< $@.tmp && \
3264                 $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
3265                 $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
3266
3267 dbusinterface_DATA += \
3268         org.freedesktop.timedate1.xml
3269
3270 timedated-install-data-hook:
3271         $(MKDIR_P) -m 0755 \
3272                 $(DESTDIR)$(prefix)/lib/systemd/ntp-units.d \
3273                 $(DESTDIR)$(sysconfdir)/systemd/ntp-units.d
3274         ( cd $(DESTDIR)$(systemunitdir) && \
3275                 rm -f dbus-org.freedesktop.timedate1.service  && \
3276                 $(LN_S) systemd-timedated.service dbus-org.freedesktop.timedate1.service )
3277
3278 INSTALL_DATA_HOOKS += \
3279         timedated-install-data-hook
3280
3281 MANPAGES += \
3282         man/systemd-timedated.service.8
3283
3284 MANPAGES_ALIAS += \
3285         man/systemd-timedated.8
3286
3287 man/systemd-timedated.8: man/systemd-timedated.service.8
3288
3289 timedatectl_SOURCES = \
3290         src/timedate/timedatectl.c
3291
3292 timedatectl_CFLAGS = \
3293         $(AM_CFLAGS) \
3294         $(DBUS_CFLAGS)
3295
3296 timedatectl_LDADD = \
3297         libsystemd-shared.la \
3298         libsystemd-dbus.la
3299
3300 bin_PROGRAMS += \
3301         timedatectl
3302
3303 MANPAGES += \
3304         man/timedatectl.1
3305
3306 endif
3307
3308 polkitpolicy_in_files += \
3309         src/timedate/org.freedesktop.timedate1.policy.in
3310
3311 EXTRA_DIST += \
3312         units/systemd-timedated.service.in
3313
3314 # ------------------------------------------------------------------------------
3315 if ENABLE_LOGIND
3316 systemd_logind_SOURCES = \
3317         src/login/logind.c \
3318         src/login/logind.h \
3319         src/login/logind-dbus.c \
3320         src/login/logind-device.c \
3321         src/login/logind-device.h \
3322         src/login/logind-button.c \
3323         src/login/logind-button.h \
3324         src/login/logind-seat.c \
3325         src/login/logind-seat.h \
3326         src/login/logind-session.c \
3327         src/login/logind-session.h \
3328         src/login/logind-user.c \
3329         src/login/logind-user.h \
3330         src/login/logind-inhibit.c \
3331         src/login/logind-inhibit.h \
3332         src/login/logind-session-dbus.c \
3333         src/login/logind-seat-dbus.c \
3334         src/login/logind-user-dbus.c \
3335         src/login/logind-acl.h
3336
3337 nodist_systemd_logind_SOURCES = \
3338         src/login/logind-gperf.c
3339
3340 systemd_logind_CFLAGS = \
3341         $(AM_CFLAGS) \
3342         $(DBUS_CFLAGS)
3343
3344 systemd_logind_LDADD = \
3345         libsystemd-label.la \
3346         libsystemd-shared.la \
3347         libsystemd-audit.la \
3348         libsystemd-daemon.la \
3349         libsystemd-dbus.la \
3350         libudev.la
3351
3352 if HAVE_ACL
3353 systemd_logind_SOURCES += \
3354         src/login/logind-acl.c
3355
3356 systemd_logind_LDADD += \
3357         libsystemd-acl.la
3358 endif
3359
3360 systemd_user_sessions_SOURCES = \
3361         src/login/user-sessions.c
3362
3363 systemd_user_sessions_LDADD = \
3364         libsystemd-shared.la
3365
3366 rootlibexec_PROGRAMS += \
3367         systemd-logind \
3368         systemd-user-sessions
3369
3370 loginctl_SOURCES = \
3371         src/login/loginctl.c \
3372         src/login/sysfs-show.c
3373
3374 loginctl_CFLAGS = \
3375         $(AM_CFLAGS) \
3376         $(DBUS_CFLAGS)
3377
3378 loginctl_LDADD = \
3379         libsystemd-shared.la \
3380         libsystemd-dbus.la \
3381         libudev.la
3382
3383 rootbin_PROGRAMS += \
3384         loginctl
3385
3386 systemd_inhibit_SOURCES = \
3387         src/login/inhibit.c
3388
3389 systemd_inhibit_CFLAGS = \
3390         $(AM_CFLAGS) \
3391         $(DBUS_CFLAGS)
3392
3393 systemd_inhibit_LDADD = \
3394         libsystemd-shared.la \
3395         libsystemd-dbus.la
3396
3397 rootbin_PROGRAMS += \
3398         systemd-inhibit
3399
3400 test_login_SOURCES = \
3401         src/login/test-login.c
3402
3403 test_login_LDADD = \
3404         libsystemd-login-internal.la \
3405         libsystemd-shared.la
3406
3407 test_inhibit_SOURCES = \
3408         src/login/test-inhibit.c
3409
3410 test_inhibit_LDADD = \
3411         libsystemd-shared.la \
3412         libsystemd-dbus.la
3413
3414 test_inhibit_CFLAGS = \
3415         $(AM_CFLAGS) \
3416         $(DBUS_CFLAGS)
3417
3418 noinst_PROGRAMS += \
3419         test-login \
3420         test-inhibit
3421
3422 libsystemd_login_la_SOURCES = \
3423         src/login/sd-login.c
3424
3425 libsystemd_login_la_CFLAGS = \
3426         $(AM_CFLAGS) \
3427         -fvisibility=hidden
3428
3429 libsystemd_login_la_LDFLAGS = \
3430         $(AM_LDFLAGS) \
3431         -shared \
3432         -version-info $(LIBSYSTEMD_LOGIN_CURRENT):$(LIBSYSTEMD_LOGIN_REVISION):$(LIBSYSTEMD_LOGIN_AGE) \
3433         -Wl,--version-script=$(top_srcdir)/src/login/libsystemd-login.sym
3434
3435 libsystemd_login_la_LIBADD = \
3436         libsystemd-shared.la
3437
3438 libsystemd_login_internal_la_SOURCES = \
3439         $(libsystemd_login_la_SOURCES)
3440
3441 if HAVE_PAM
3442 pam_systemd_la_SOURCES = \
3443         src/login/pam-module.c
3444
3445 pam_systemd_la_CFLAGS = \
3446         $(AM_CFLAGS) \
3447         $(PAM_CFLAGS) \
3448         $(DBUS_CFLAGS) \
3449         -fvisibility=hidden
3450
3451 pam_systemd_la_LDFLAGS = \
3452         $(AM_LDFLAGS) \
3453         -module \
3454         -export-dynamic \
3455         -avoid-version \
3456         -shared \
3457         -export-symbols-regex '^pam_sm_.*'
3458
3459 pam_systemd_la_LIBADD = \
3460         libsystemd-daemon.la \
3461         libsystemd-audit.la \
3462         libsystemd-dbus.la \
3463         libsystemd-shared.la \
3464         $(PAM_LIBS)
3465
3466 pamlib_LTLIBRARIES = \
3467         pam_systemd.la
3468 endif
3469
3470 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
3471 libsystemd-login-install-hook:
3472         if test "$(libdir)" != "$(rootlibdir)"; then \
3473                 $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
3474                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/libsystemd-login.so) && \
3475                 so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
3476                 ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/libsystemd-login.so && \
3477                 mv $(DESTDIR)$(libdir)/libsystemd-login.so.* $(DESTDIR)$(rootlibdir); \
3478         fi
3479
3480 INSTALL_EXEC_HOOKS += \
3481         libsystemd-login-install-hook
3482
3483 libsystemd-login-uninstall-hook:
3484         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-login.so*
3485
3486 UNINSTALL_EXEC_HOOKS += \
3487         libsystemd-login-uninstall-hook
3488
3489 nodist_systemunit_DATA += \
3490         units/systemd-logind.service \
3491         units/systemd-user-sessions.service
3492
3493 dist_dbussystemservice_DATA += \
3494         src/login/org.freedesktop.login1.service
3495
3496 dist_dbuspolicy_DATA += \
3497         src/login/org.freedesktop.login1.conf
3498
3499 dist_pkgsysconf_DATA += \
3500         src/login/logind.conf
3501
3502 pkginclude_HEADERS += \
3503         src/systemd/sd-login.h
3504
3505 lib_LTLIBRARIES += \
3506         libsystemd-login.la
3507
3508 noinst_LTLIBRARIES += \
3509         libsystemd-login-internal.la
3510
3511 pkgconfiglib_DATA += \
3512         src/login/libsystemd-login.pc
3513
3514 polkitpolicy_files += \
3515         src/login/org.freedesktop.login1.policy
3516
3517 logind-install-data-hook:
3518         $(MKDIR_P) -m 0755 \
3519                 $(DESTDIR)$(systemunitdir)/multi-user.target.wants \
3520                 $(DESTDIR)$(localstatedir)/lib/systemd
3521         ( cd $(DESTDIR)$(systemunitdir) && \
3522                 rm -f dbus-org.freedesktop.login1.service && \
3523                 $(LN_S) systemd-logind.service dbus-org.freedesktop.login1.service)
3524         ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
3525                 rm -f systemd-logind.service systemd-user-sessions.service && \
3526                 $(LN_S) ../systemd-logind.service systemd-logind.service && \
3527                 $(LN_S) ../systemd-user-sessions.service systemd-user-sessions.service )
3528
3529 INSTALL_DATA_HOOKS += \
3530         logind-install-data-hook
3531
3532 systemd_multi_seat_x_SOURCES = \
3533         src/login/multi-seat-x.c
3534
3535 systemd_multi_seat_x_LDADD = \
3536         libsystemd-label.la \
3537         libsystemd-shared.la
3538
3539 rootlibexec_PROGRAMS += \
3540         systemd-multi-seat-x
3541
3542 dist_udevrules_DATA += \
3543         src/login/70-uaccess.rules \
3544         src/login/70-power-switch.rules
3545
3546 nodist_udevrules_DATA += \
3547         src/login/71-seat.rules \
3548         src/login/73-seat-late.rules
3549
3550 MANPAGES += \
3551         man/systemd-logind.service.8 \
3552         man/logind.conf.5 \
3553         man/sd-login.3 \
3554         man/loginctl.1 \
3555         man/sd_login_monitor_new.3 \
3556         man/sd_pid_get_session.3 \
3557         man/sd_uid_get_state.3 \
3558         man/sd_session_is_active.3 \
3559         man/sd_seat_get_active.3 \
3560         man/sd_get_seats.3 \
3561         man/systemd-user-sessions.service.8
3562
3563 MANPAGES_ALIAS += \
3564         man/sd_login_monitor_unref.3 \
3565         man/sd_login_monitor_flush.3 \
3566         man/sd_login_monitor_get_fd.3 \
3567         man/sd_login_monitor.3 \
3568         man/sd_session_get_uid.3 \
3569         man/sd_session_get_seat.3 \
3570         man/sd_session_get_service.3 \
3571         man/sd_session_get_state.3 \
3572         man/sd_session_get_type.3 \
3573         man/sd_session_get_class.3 \
3574         man/sd_session_get_display.3 \
3575         man/sd_pid_get_owner_uid.3 \
3576         man/sd_pid_get_unit.3 \
3577         man/sd_uid_is_on_seat.3 \
3578         man/sd_uid_get_sessions.3 \
3579         man/sd_uid_get_seats.3 \
3580         man/sd_seat_get_sessions.3 \
3581         man/sd_seat_can_multi_session.3 \
3582         man/sd_get_sessions.3 \
3583         man/sd_get_uids.3 \
3584         man/systemd-logind.8 \
3585         man/systemd-user-sessions.8
3586
3587 man/systemd-logind.8: man/systemd-logind.service.8
3588 man/sd_login_monitor_unref.3: man/sd_login_monitor_new.3
3589 man/sd_login_monitor_flush.3: man/sd_login_monitor_new.3
3590 man/sd_login_monitor_get_fd.3: man/sd_login_monitor_new.3
3591 man/sd_login_monitor.3: man/sd_login_monitor_new.3
3592 man/sd_session_get_uid.3: man/sd_session_is_active.3
3593 man/sd_session_get_seat.3: man/sd_session_is_active.3
3594 man/sd_session_get_service.3: man/sd_session_is_active.3
3595 man/sd_session_get_state.3: man/sd_session_is_active.3
3596 man/sd_session_get_type.3: man/sd_session_is_active.3
3597 man/sd_session_get_class.3: man/sd_session_is_active.3
3598 man/sd_session_get_display.3: man/sd_session_is_active.3
3599 man/sd_pid_get_owner_uid.3: man/sd_pid_get_session.3
3600 man/sd_pid_get_unit.3: man/sd_pid_get_session.3
3601 man/sd_uid_is_on_seat.3: man/sd_uid_get_state.3
3602 man/sd_uid_get_sessions.3: man/sd_uid_get_state.3
3603 man/sd_uid_get_seats.3: man/sd_uid_get_state.3
3604 man/sd_seat_get_sessions.3: man/sd_seat_get_active.3
3605 man/sd_seat_can_multi_session.3: man/sd_seat_get_active.3
3606 man/sd_get_sessions.3: man/sd_get_seats.3
3607 man/sd_get_uids.3: man/sd_get_seats.3
3608 man/systemd-user-sessions.8: man/systemd-user-sessions.service.8
3609
3610 CLEANFILES += \
3611         src/login/logind-gperf.c \
3612         src/login/71-seat.rules \
3613         src/login/73-seat-late.rules
3614 endif
3615
3616 polkitpolicy_in_files += \
3617         src/login/org.freedesktop.login1.policy.in
3618
3619 EXTRA_DIST += \
3620         src/login/logind-gperf.gperf \
3621         src/login/libsystemd-login.pc.in \
3622         src/login/libsystemd-login.sym \
3623         src/login/71-seat.rules.in \
3624         src/login/73-seat-late.rules.in \
3625         units/systemd-logind.service.in \
3626         units/systemd-user-sessions.service.in
3627
3628 # ------------------------------------------------------------------------------
3629
3630 if HAVE_PYTHON_DEVEL
3631
3632 pkgpyexec_LTLIBRARIES = \
3633         _journal.la
3634
3635 _journal_la_SOURCES = \
3636         src/python-systemd/_journal.c
3637
3638 _journal_la_CFLAGS = \
3639         $(AM_CFLAGS) \
3640         -fvisibility=default \
3641         $(PYTHON_CFLAGS)
3642
3643 _journal_la_LDFLAGS = \
3644         $(AM_LDFLAGS) \
3645         -shared \
3646         -module \
3647         -avoid-version
3648
3649 _journal_la_LIBADD = \
3650         $(PYTHON_LIBS) \
3651         libsystemd-journal.la
3652
3653 dist_pkgpyexec_PYTHON = \
3654         src/python-systemd/journal.py \
3655         src/python-systemd/__init__.py
3656
3657 endif
3658
3659 # ------------------------------------------------------------------------------
3660
3661 SED_PROCESS = \
3662         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
3663         $(SED)  -e 's,@rootlibexecdir\@,$(rootlibexecdir),g' \
3664                 -e 's,@rootbindir\@,$(rootbindir),g' \
3665                 -e 's,@bindir\@,$(bindir),g' \
3666                 -e 's,@SYSTEMCTL\@,$(rootbindir)/systemctl,g' \
3667                 -e 's,@SYSTEMD_NOTIFY\@,$(rootbindir)/systemd-notify,g' \
3668                 -e 's,@pkgsysconfdir\@,$(pkgsysconfdir),g' \
3669                 -e 's,@pkgdatadir\@,$(pkgdatadir),g' \
3670                 -e 's,@systemunitdir\@,$(systemunitdir),g' \
3671                 -e 's,@userunitdir\@,$(userunitdir),g' \
3672                 -e 's,@systempresetdir\@,$(systempresetdir),g' \
3673                 -e 's,@userpresetdir\@,$(userpresetdir),g' \
3674                 -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
3675                 -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
3676                 -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' \
3677                 -e 's,@RANDOM_SEED\@,$(localstatedir)/lib/random-seed,g' \
3678                 -e 's,@prefix\@,$(prefix),g' \
3679                 -e 's,@exec_prefix\@,$(exec_prefix),g' \
3680                 -e 's,@libdir\@,$(libdir),g' \
3681                 -e 's,@includedir\@,$(includedir),g' \
3682                 -e 's,@VERSION\@,$(VERSION),g' \
3683                 -e 's,@rootprefix\@,$(rootprefix),g' \
3684                 -e 's,@udevlibexecdir\@,$(udevlibexecdir),g' \
3685                 -e 's,@sushell\@,$(sushell),g' \
3686                 -e 's,@KILL\@,$(KILL),g' \
3687                 -e 's,@QUOTAON\@,$(QUOTAON),g' \
3688                 -e 's,@QUOTACHECK\@,$(QUOTACHECK),g' \
3689                 -e 's,@SYSTEM_SYSVINIT_PATH\@,$(sysvinitdir),g' \
3690                 -e 's,@VARLOGDIR\@,$(varlogdir),g' \
3691                 < $< > $@
3692
3693 units/%: units/%.in Makefile
3694         $(SED_PROCESS)
3695
3696 man/%: man/%.in Makefile
3697         $(SED_PROCESS)
3698
3699 sysctl.d/%: sysctl.d/%.in Makefile
3700         $(SED_PROCESS)
3701
3702 %.pc: %.pc.in Makefile
3703         $(SED_PROCESS)
3704
3705 src/core/macros.%: src/core/macros.%.in Makefile
3706         $(SED_PROCESS)
3707
3708 src/%.policy.in: src/%.policy.in.in Makefile
3709         $(SED_PROCESS)
3710
3711 %.rules: %.rules.in Makefile
3712         $(SED_PROCESS)
3713
3714 %.sh: %.sh.in Makefile
3715         $(SED_PROCESS)
3716         $(AM_V_GEN)chmod +x $@
3717
3718 src/%.c: src/%.gperf
3719         $(AM_V_at)$(MKDIR_P) $(dir $@)
3720         $(AM_V_GEN)$(GPERF) < $< > $@
3721
3722 src/%: src/%.m4
3723         $(AM_V_at)$(MKDIR_P) $(dir $@)
3724         $(AM_V_GEN)$(M4) -P $(M4_DEFINES) < $< > $@
3725
3726 M4_PROCESS_SYSTEM = \
3727         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
3728         $(M4) -P $(M4_DEFINES) -DFOR_SYSTEM=1 < $< > $@
3729
3730 M4_PROCESS_USER = \
3731         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
3732         $(M4) -P $(M4_DEFINES) -DFOR_USER=1 < $< > $@
3733
3734 units/%: units/%.m4 Makefile
3735         $(M4_PROCESS_SYSTEM)
3736
3737 units/user/%: units/%.m4 Makefile
3738         $(M4_PROCESS_USER)
3739
3740 nodist_polkitpolicy_DATA = \
3741         $(polkitpolicy_files) \
3742         $(polkitpolicy_in_in_files:.policy.in.in=.policy)
3743
3744 EXTRA_DIST += \
3745         $(polkitpolicy_in_files) \
3746         $(polkitpolicy_in_in_files)
3747
3748 CLEANFILES += \
3749         $(nodist_systemunit_DATA) \
3750         $(nodist_userunit_DATA) \
3751         $(nodist_man_MANS) \
3752         $(pkgconfigdata_DATA) \
3753         $(pkgconfiglib_DATA) \
3754         $(nodist_polkitpolicy_DATA)
3755
3756 if ENABLE_MANPAGES
3757 XSLTPROC_FLAGS = \
3758         --nonet \
3759         --stringparam man.output.quietly 1 \
3760         --stringparam funcsynopsis.style ansi \
3761         --stringparam man.th.extra1.suppress 1 \
3762         --stringparam man.authors.section.enabled 0 \
3763         --stringparam man.copyright.section.enabled 0
3764
3765 XSLTPROC_PROCESS_MAN = \
3766         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
3767         $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
3768
3769 XSLTPROC_PROCESS_HTML = \
3770         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
3771         $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
3772
3773 man/%.1: man/%.xml
3774         $(XSLTPROC_PROCESS_MAN)
3775
3776 man/%.3: man/%.xml
3777         $(XSLTPROC_PROCESS_MAN)
3778
3779 man/%.5: man/%.xml
3780         $(XSLTPROC_PROCESS_MAN)
3781
3782 man/%.7: man/%.xml
3783         $(XSLTPROC_PROCESS_MAN)
3784
3785 man/%.8: man/%.xml
3786         $(XSLTPROC_PROCESS_MAN)
3787
3788 man/%.html: man/%.xml man/custom-html.xsl
3789         $(XSLTPROC_PROCESS_HTML)
3790
3791 CLEANFILES += \
3792         $(dist_man_MANS) \
3793         ${XML_FILES:.xml=.html}
3794 endif
3795
3796 DBUS_PREPROCESS = $(CPP) -P $(CFLAGS) $(DBUS_CFLAGS) -imacros dbus/dbus-protocol.h
3797
3798 CLEANFILES += \
3799         $(dbusinterface_DATA)
3800
3801 if HAVE_SYSV_COMPAT
3802 sysvinit_DATA = \
3803         docs/sysvinit/README
3804
3805 varlog_DATA = \
3806         docs/var-log/README
3807
3808 docs/sysvinit/README: docs/sysvinit/README.in
3809         $(SED_PROCESS)
3810
3811 docs/var-log/README: docs/var-log/README.in
3812         $(SED_PROCESS)
3813
3814 EXTRA_DIST += \
3815         docs/sysvinit/README.in \
3816         docs/var-log/README.in
3817
3818 CLEANFILES += \
3819         docs/sysvinit/README \
3820         docs/var-log/README
3821
3822 endif
3823
3824
3825 systemd-install-data-hook:
3826         $(MKDIR_P) -m 0755 \
3827                 $(DESTDIR)$(tmpfilesdir) \
3828                 $(DESTDIR)$(sysconfdir)/tmpfiles.d \