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