chiark / gitweb /
busctl: install bash completion
[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 #  Copyright 2013 Zbigniew JÄ™drzejewski-Szmek
8 #  Copyright 2013 David Strauss
9 #
10 #  systemd is free software; you can redistribute it and/or modify it
11 #  under the terms of the GNU Lesser General Public License as published by
12 #  the Free Software Foundation; either version 2.1 of the License, or
13 #  (at your option) any later version.
14 #
15 #  systemd is distributed in the hope that it will be useful, but
16 #  WITHOUT ANY WARRANTY; without even the implied warranty of
17 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 #  Lesser General Public License for more details.
19 #
20 #  You should have received a copy of the GNU Lesser General Public License
21 #  along with systemd; If not, see <http://www.gnu.org/licenses/>.
22
23 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
24 AM_MAKEFLAGS = --no-print-directory
25 AUTOMAKE_OPTIONS = color-tests parallel-tests
26
27 SUBDIRS = . po
28
29 # remove targets if the command fails
30 .DELETE_ON_ERROR:
31
32 # keep intermediate files
33 .SECONDARY:
34
35 # Keep the test-suite.log
36 .PRECIOUS: $(TEST_SUITE_LOG) Makefile
37
38 LIBUDEV_CURRENT=5
39 LIBUDEV_REVISION=0
40 LIBUDEV_AGE=4
41
42 LIBGUDEV_CURRENT=1
43 LIBGUDEV_REVISION=3
44 LIBGUDEV_AGE=1
45
46 LIBSYSTEMD_LOGIN_CURRENT=9
47 LIBSYSTEMD_LOGIN_REVISION=2
48 LIBSYSTEMD_LOGIN_AGE=9
49
50 LIBSYSTEMD_DAEMON_CURRENT=0
51 LIBSYSTEMD_DAEMON_REVISION=11
52 LIBSYSTEMD_DAEMON_AGE=0
53
54 LIBSYSTEMD_ID128_CURRENT=0
55 LIBSYSTEMD_ID128_REVISION=27
56 LIBSYSTEMD_ID128_AGE=0
57
58 LIBSYSTEMD_JOURNAL_CURRENT=11
59 LIBSYSTEMD_JOURNAL_REVISION=3
60 LIBSYSTEMD_JOURNAL_AGE=11
61
62 LIBSYSTEMD_CURRENT=0
63 LIBSYSTEMD_REVISION=0
64 LIBSYSTEMD_AGE=0
65
66 # Dirs of external packages
67 dbuspolicydir=@dbuspolicydir@
68 dbussessionservicedir=@dbussessionservicedir@
69 dbussystemservicedir=@dbussystemservicedir@
70 pamlibdir=@pamlibdir@
71 pamconfdir=@pamconfdir@
72 pkgconfigdatadir=$(datadir)/pkgconfig
73 pkgconfiglibdir=$(libdir)/pkgconfig
74 polkitpolicydir=$(datadir)/polkit-1/actions
75 bashcompletiondir=@bashcompletiondir@
76 zshcompletiondir=@zshcompletiondir@
77 rpmmacrosdir=$(prefix)/lib/rpm/macros.d
78 sysvinitdir=$(SYSTEM_SYSVINIT_PATH)
79 sysvrcnddir=$(SYSTEM_SYSVRCND_PATH)
80 varlogdir=$(localstatedir)/log
81 systemdstatedir=$(localstatedir)/lib/systemd
82 catalogstatedir=$(systemdstatedir)/catalog
83
84 # Our own, non-special dirs
85 pkgsysconfdir=$(sysconfdir)/systemd
86 userunitdir=$(prefix)/lib/systemd/user
87 userpresetdir=$(prefix)/lib/systemd/user-preset
88 tmpfilesdir=$(prefix)/lib/tmpfiles.d
89 sysctldir=$(prefix)/lib/sysctl.d
90 networkdir=$(prefix)/lib/systemd/network
91 pkgincludedir=$(includedir)/systemd
92 systemgeneratordir=$(rootlibexecdir)/system-generators
93 usergeneratordir=$(prefix)/lib/systemd/user-generators
94 systemshutdowndir=$(rootlibexecdir)/system-shutdown
95 systemsleepdir=$(rootlibexecdir)/system-sleep
96 systemunitdir=$(rootprefix)/lib/systemd/system
97 systempresetdir=$(rootprefix)/lib/systemd/system-preset
98 udevlibexecdir=$(rootprefix)/lib/udev
99 udevhomedir=$(udevlibexecdir)
100 udevrulesdir=$(udevlibexecdir)/rules.d
101 udevhwdbdir=$(udevlibexecdir)/hwdb.d
102 catalogdir=$(prefix)/lib/systemd/catalog
103 kernelinstalldir = $(prefix)/lib/kernel/install.d
104
105 # And these are the special ones for /
106 rootprefix=@rootprefix@
107 rootbindir=$(rootprefix)/bin
108 rootlibexecdir=$(rootprefix)/lib/systemd
109
110 CLEANFILES = $(BUILT_SOURCES)
111 DISTCLEANFILES =
112 EXTRA_DIST =
113 BUILT_SOURCES =
114 INSTALL_EXEC_HOOKS =
115 UNINSTALL_EXEC_HOOKS =
116 INSTALL_DATA_HOOKS =
117 UNINSTALL_DATA_HOOKS =
118 DISTCLEAN_LOCAL_HOOKS =
119 CLEAN_LOCAL_HOOKS =
120 pkginclude_HEADERS =
121 noinst_LTLIBRARIES =
122 lib_LTLIBRARIES =
123 include_HEADERS =
124 noinst_DATA =
125 pkgconfiglib_DATA =
126 polkitpolicy_in_in_files =
127 polkitpolicy_in_files =
128 polkitpolicy_files =
129 dist_udevrules_DATA =
130 nodist_udevrules_DATA =
131 dist_pkgsysconf_DATA =
132 dist_pkgdata_DATA =
133 dist_dbuspolicy_DATA =
134 dist_dbussystemservice_DATA =
135 check_PROGRAMS =
136 check_DATA =
137 tests=
138 manual_tests =
139 if ENABLE_TESTS
140 noinst_PROGRAMS = $(manual_tests) $(tests)
141 TESTS = $(tests)
142 else
143 noinst_PROGRAMS =
144 TESTS =
145 endif
146 udevlibexec_PROGRAMS =
147
148 .PHONY: $(INSTALL_EXEC_HOOKS) $(UNINSTALL_EXEC_HOOKS) \
149         $(INSTALL_DATA_HOOKS) $(UNINSTALL_DATA_HOOKS) \
150         $(DISTCLEAN_LOCAL_HOOKS) $(CLEAN_LOCAL_HOOKS)
151
152 AM_CPPFLAGS = \
153         -include $(top_builddir)/config.h \
154         -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\" \
155         -DSYSTEM_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/system\" \
156         -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" \
157         -DSYSTEM_SYSVINIT_PATH=\"$(SYSTEM_SYSVINIT_PATH)\" \
158         -DSYSTEM_SYSVRCND_PATH=\"$(SYSTEM_SYSVRCND_PATH)\" \
159         -DUSER_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/user\" \
160         -DUSER_DATA_UNIT_PATH=\"$(userunitdir)\" \
161         -DCATALOG_DATABASE=\"$(catalogstatedir)/database\" \
162         -DSYSTEMD_CGROUP_AGENT_PATH=\"$(rootlibexecdir)/systemd-cgroups-agent\" \
163         -DSYSTEMD_BINARY_PATH=\"$(rootlibexecdir)/systemd\" \
164         -DSYSTEMD_SHUTDOWN_BINARY_PATH=\"$(rootlibexecdir)/systemd-shutdown\" \
165         -DSYSTEMD_SLEEP_BINARY_PATH=\"$(rootlibexecdir)/systemd-sleep\" \
166         -DSYSTEMCTL_BINARY_PATH=\"$(rootbindir)/systemctl\" \
167         -DSYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH=\"$(rootbindir)/systemd-tty-ask-password-agent\" \
168         -DSYSTEMD_STDIO_BRIDGE_BINARY_PATH=\"$(bindir)/systemd-stdio-bridge\" \
169         -DROOTPREFIX=\"$(rootprefix)\" \
170         -DRANDOM_SEED_DIR=\"$(localstatedir)/lib/systemd/\" \
171         -DRANDOM_SEED=\"$(localstatedir)/lib/systemd/random-seed\" \
172         -DSYSTEMD_CRYPTSETUP_PATH=\"$(rootlibexecdir)/systemd-cryptsetup\" \
173         -DSYSTEM_GENERATOR_PATH=\"$(systemgeneratordir)\" \
174         -DUSER_GENERATOR_PATH=\"$(usergeneratordir)\" \
175         -DSYSTEM_SHUTDOWN_PATH=\"$(systemshutdowndir)\" \
176         -DSYSTEM_SLEEP_PATH=\"$(systemsleepdir)\" \
177         -DSYSTEMD_KBD_MODEL_MAP=\"$(pkgdatadir)/kbd-model-map\" \
178         -DX_SERVER=\"$(bindir)/X\" \
179         -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\" \
180         -DPOLKIT_AGENT_BINARY_PATH=\"$(bindir)/pkttyagent\" \
181         -DQUOTACHECK=\"$(QUOTACHECK)\" \
182         -DKEXEC=\"$(KEXEC)\" \
183         -I $(top_srcdir)/src \
184         -I $(top_builddir)/src/shared \
185         -I $(top_srcdir)/src/shared \
186         -I $(top_srcdir)/src/network \
187         -I $(top_srcdir)/src/login \
188         -I $(top_srcdir)/src/journal \
189         -I $(top_srcdir)/src/systemd \
190         -I $(top_builddir)/src/core \
191         -I $(top_srcdir)/src/core \
192         -I $(top_srcdir)/src/libudev \
193         -I $(top_srcdir)/src/udev \
194         -I $(top_srcdir)/src/udev/net \
195         -I $(top_builddir)/src/udev \
196         -I $(top_srcdir)/src/libsystemd/sd-bus \
197         -I $(top_srcdir)/src/libsystemd/sd-event \
198         -I $(top_srcdir)/src/libsystemd/sd-rtnl \
199         $(OUR_CPPFLAGS)
200
201 AM_CFLAGS = $(OUR_CFLAGS)
202 AM_LDFLAGS = $(OUR_LDFLAGS)
203
204 # ------------------------------------------------------------------------------
205 define move-to-rootlibdir
206         if test "$(libdir)" != "$(rootlibdir)"; then \
207                 $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
208                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/$$libname) && \
209                 so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
210                 $(LN_S) -f $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/$$libname && \
211                 mv $(DESTDIR)$(libdir)/$$libname.* $(DESTDIR)$(rootlibdir); \
212         fi
213 endef
214
215 INSTALL_DIRS =
216
217 RUNLEVEL1_TARGET_WANTS =
218 RUNLEVEL2_TARGET_WANTS =
219 RUNLEVEL3_TARGET_WANTS =
220 RUNLEVEL4_TARGET_WANTS =
221 RUNLEVEL5_TARGET_WANTS =
222 SHUTDOWN_TARGET_WANTS =
223 LOCAL_FS_TARGET_WANTS =
224 MULTI_USER_TARGET_WANTS =
225 SYSINIT_TARGET_WANTS =
226 SOCKETS_TARGET_WANTS =
227 BUSNAMES_TARGET_WANTS =
228 TIMERS_TARGET_WANTS =
229 USER_SOCKETS_TARGET_WANTS =
230 USER_BUSNAMES_TARGET_WANTS =
231
232 SYSTEM_UNIT_ALIASES =
233 USER_UNIT_ALIASES =
234
235 GENERAL_ALIASES =
236
237 install-target-wants-hook:
238         what="$(RUNLEVEL1_TARGET_WANTS)" && wants=runlevel1.target && dir=$(systemunitdir) && $(add-wants)
239         what="$(RUNLEVEL2_TARGET_WANTS)" && wants=runlevel2.target && dir=$(systemunitdir) && $(add-wants)
240         what="$(RUNLEVEL3_TARGET_WANTS)" && wants=runlevel3.target && dir=$(systemunitdir) && $(add-wants)
241         what="$(RUNLEVEL4_TARGET_WANTS)" && wants=runlevel4.target && dir=$(systemunitdir) && $(add-wants)
242         what="$(RUNLEVEL5_TARGET_WANTS)" && wants=runlevel5.target && dir=$(systemunitdir) && $(add-wants)
243         what="$(SHUTDOWN_TARGET_WANTS)" && wants=shutdown.target && dir=$(systemunitdir) && $(add-wants)
244         what="$(LOCAL_FS_TARGET_WANTS)" && wants=local-fs.target && dir=$(systemunitdir) && $(add-wants)
245         what="$(MULTI_USER_TARGET_WANTS)" && wants=multi-user.target && dir=$(systemunitdir) && $(add-wants)
246         what="$(SYSINIT_TARGET_WANTS)" && wants=sysinit.target && dir=$(systemunitdir) && $(add-wants)
247         what="$(SOCKETS_TARGET_WANTS)" && wants=sockets.target && dir=$(systemunitdir) && $(add-wants)
248         what="$(BUSNAMES_TARGET_WANTS)" && wants=busnames.target && dir=$(systemunitdir) && $(add-wants)
249         what="$(TIMERS_TARGET_WANTS)" && wants=timers.target && dir=$(systemunitdir) && $(add-wants)
250         what="$(SLICES_TARGET_WANTS)" && wants=slices.target && dir=$(systemunitdir) && $(add-wants)
251         what="$(USER_SOCKETS_TARGET_WANTS)" && wants=sockets.target && dir=$(userunitdir) && $(add-wants)
252         what="$(USER_BUSNAMES_TARGET_WANTS)" && wants=busnames.target && dir=$(userunitdir) && $(add-wants)
253
254 define add-wants
255         [ -z "$$what" ] || ( \
256           dir=$(DESTDIR)$$dir/$$wants.wants && \
257           $(MKDIR_P) -m 0755 $$dir && \
258           cd $$dir && \
259           rm -f $$what && \
260           for i in $$what; do $(LN_S) ../$$i . || exit $$? ; done )
261 endef
262
263 install-directories-hook:
264         $(MKDIR_P) $(addprefix $(DESTDIR),$(INSTALL_DIRS))
265
266 install-aliases-hook:
267         set -- $(SYSTEM_UNIT_ALIASES) && \
268                 dir=$(systemunitdir) && $(install-aliases)
269         set -- $(USER_UNIT_ALIASES) && \
270                 dir=$(userunitdir) && $(install-aliases)
271         set -- $(GENERAL_ALIASES) && \
272                 dir= && $(install-aliases)
273
274 define install-aliases
275         while [ -n "$$1" ]; do \
276                 $(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \
277                 rm -f $(DESTDIR)$$dir/$$2 && \
278                 $(LN_S) $$1 $(DESTDIR)$$dir/$$2 && \
279                 shift 2 || exit $$?; \
280         done
281 endef
282
283 INSTALL_EXEC_HOOKS += \
284         install-target-wants-hook \
285         install-directories-hook \
286         install-aliases-hook
287
288 # ------------------------------------------------------------------------------
289 AM_V_M4 = $(AM_V_M4_$(V))
290 AM_V_M4_ = $(AM_V_M4_$(AM_DEFAULT_VERBOSITY))
291 AM_V_M4_0 = @echo "  M4      " $@;
292
293 AM_V_XSLT = $(AM_V_XSLT_$(V))
294 AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
295 AM_V_XSLT_0 = @echo "  XSLT    " $@;
296
297 AM_V_GPERF = $(AM_V_GPERF_$(V))
298 AM_V_GPERF_ = $(AM_V_GPERF_$(AM_DEFAULT_VERBOSITY))
299 AM_V_GPERF_0 = @echo "  GPERF   " $@;
300
301 AM_V_LN = $(AM_V_LN_$(V))
302 AM_V_LN_ = $(AM_V_LN_$(AM_DEFAULT_VERBOSITY))
303 AM_V_LN_0 = @echo "  LN      " $@;
304
305 # ------------------------------------------------------------------------------
306 rootbin_PROGRAMS = \
307         systemctl \
308         systemd-notify \
309         systemd-ask-password \
310         systemd-tty-ask-password-agent \
311         systemd-machine-id-setup
312
313 bin_PROGRAMS = \
314         systemd-cgls \
315         systemd-cgtop \
316         systemd-nspawn \
317         systemd-detect-virt \
318         systemd-delta \
319         systemd-analyze \
320         systemd-run
321
322 dist_bin_SCRIPTS = \
323         src/kernel-install/kernel-install
324
325 dist_kernelinstall_SCRIPTS = \
326         src/kernel-install/50-depmod.install \
327         src/kernel-install/90-loaderentry.install
328
329 rootlibexec_PROGRAMS = \
330         systemd \
331         systemd-cgroups-agent \
332         systemd-initctl \
333         systemd-update-utmp \
334         systemd-shutdownd \
335         systemd-shutdown \
336         systemd-remount-fs \
337         systemd-reply-password \
338         systemd-fsck \
339         systemd-ac-power \
340         systemd-sysctl \
341         systemd-sleep \
342         systemd-bus-proxyd \
343         systemd-socket-proxyd
344
345 systemgenerator_PROGRAMS = \
346         systemd-getty-generator \
347         systemd-fstab-generator \
348         systemd-system-update-generator
349
350 dist_bashcompletion_DATA = \
351         shell-completion/bash/busctl \
352         shell-completion/bash/journalctl \
353         shell-completion/bash/systemctl \
354         shell-completion/bash/systemd-analyze \
355         shell-completion/bash/systemd-delta \
356         shell-completion/bash/systemd-run \
357         shell-completion/bash/udevadm \
358         shell-completion/bash/kernel-install
359
360 dist_zshcompletion_DATA = \
361         shell-completion/zsh/_systemctl \
362         shell-completion/zsh/_journalctl \
363         shell-completion/zsh/_udevadm \
364         shell-completion/zsh/_kernel-install \
365         shell-completion/zsh/_systemd-nspawn \
366         shell-completion/zsh/_systemd-analyze \
367         shell-completion/zsh/_systemd-run \
368         shell-completion/zsh/_sd_hosts_or_user_at_host \
369         shell-completion/zsh/_systemd-delta \
370         shell-completion/zsh/_systemd
371
372 dist_sysctl_DATA = \
373         sysctl.d/50-default.conf
374
375 dist_systemunit_DATA = \
376         units/graphical.target \
377         units/multi-user.target \
378         units/emergency.service \
379         units/emergency.target \
380         units/sysinit.target \
381         units/basic.target \
382         units/getty.target \
383         units/halt.target \
384         units/kexec.target \
385         units/local-fs.target \
386         units/local-fs-pre.target \
387         units/initrd.target \
388         units/initrd-fs.target \
389         units/initrd-root-fs.target \
390         units/remote-fs.target \
391         units/remote-fs-pre.target \
392         units/network.target \
393         units/network-online.target \
394         units/nss-lookup.target \
395         units/nss-user-lookup.target \
396         units/hibernate.target \
397         units/hybrid-sleep.target \
398         units/poweroff.target \
399         units/reboot.target \
400         units/rescue.target \
401         units/rpcbind.target \
402         units/time-sync.target \
403         units/shutdown.target \
404         units/final.target \
405         units/umount.target \
406         units/sigpwr.target \
407         units/sleep.target \
408         units/sockets.target \
409         units/busnames.target \
410         units/timers.target \
411         units/paths.target \
412         units/suspend.target \
413         units/swap.target \
414         units/slices.target \
415         units/system.slice \
416         units/x-.slice \
417         units/systemd-initctl.socket \
418         units/systemd-shutdownd.socket \
419         units/syslog.socket \
420         units/dev-hugepages.mount \
421         units/dev-mqueue.mount \
422         units/sys-kernel-config.mount \
423         units/sys-kernel-debug.mount \
424         units/sys-fs-fuse-connections.mount \
425         units/tmp.mount \
426         units/printer.target \
427         units/sound.target \
428         units/bluetooth.target \
429         units/smartcard.target \
430         units/systemd-ask-password-wall.path \
431         units/systemd-ask-password-console.path \
432         units/systemd-udevd-control.socket \
433         units/systemd-udevd-kernel.socket \
434         units/system-update.target \
435         units/initrd-switch-root.target
436
437 nodist_systemunit_DATA = \
438         units/getty@.service \
439         units/serial-getty@.service \
440         units/console-shell.service \
441         units/console-getty.service \
442         units/container-getty@.service \
443         units/systemd-initctl.service \
444         units/systemd-shutdownd.service \
445         units/systemd-remount-fs.service \
446         units/systemd-update-utmp.service \
447         units/systemd-update-utmp-runlevel.service \
448         units/systemd-ask-password-wall.service \
449         units/systemd-ask-password-console.service \
450         units/systemd-sysctl.service \
451         units/emergency.service \
452         units/rescue.service \
453         units/user@.service \
454         units/systemd-hibernate.service \
455         units/systemd-hybrid-sleep.service \
456         units/systemd-suspend.service \
457         units/systemd-halt.service \
458         units/systemd-poweroff.service \
459         units/systemd-reboot.service \
460         units/systemd-kexec.service \
461         units/systemd-fsck@.service \
462         units/systemd-fsck-root.service \
463         units/systemd-udevd.service \
464         units/systemd-udev-trigger.service \
465         units/systemd-udev-settle.service \
466         units/debug-shell.service \
467         units/initrd-parse-etc.service \
468         units/initrd-cleanup.service \
469         units/initrd-udevadm-cleanup-db.service \
470         units/initrd-switch-root.service \
471         units/systemd-nspawn@.service
472
473 dist_userunit_DATA = \
474         units/user/basic.target \
475         units/user/default.target \
476         units/user/exit.target
477
478 nodist_userunit_DATA = \
479         units/user/systemd-exit.service
480
481 EXTRA_DIST += \
482         units/getty@.service.m4 \
483         units/serial-getty@.service.m4 \
484         units/console-shell.service.m4.in \
485         units/console-getty.service.m4.in \
486         units/container-getty@.service.m4.in \
487         units/rescue.service.m4.in \
488         units/systemd-initctl.service.in \
489         units/systemd-shutdownd.service.in \
490         units/systemd-remount-fs.service.in \
491         units/systemd-update-utmp.service.in \
492         units/systemd-update-utmp-runlevel.service.in \
493         units/systemd-ask-password-wall.service.in \
494         units/systemd-ask-password-console.service.in \
495         units/systemd-sysctl.service.in \
496         units/emergency.service.in \
497         units/systemd-halt.service.in \
498         units/systemd-poweroff.service.in \
499         units/systemd-reboot.service.in \
500         units/systemd-kexec.service.in \
501         units/user/systemd-exit.service.in \
502         units/systemd-fsck@.service.in \
503         units/systemd-fsck-root.service.in \
504         units/user@.service.in \
505         units/systemd-udevd.service \
506         units/systemd-udev-trigger.service \
507         units/systemd-udev-settle.service \
508         units/debug-shell.service.in \
509         units/systemd-hibernate.service.in \
510         units/systemd-hybrid-sleep.service.in \
511         units/systemd-suspend.service.in \
512         units/quotaon.service.in \
513         units/initrd-parse-etc.service.in \
514         units/initrd-cleanup.service.in \
515         units/initrd-udevadm-cleanup-db.service.in \
516         units/initrd-switch-root.service.in \
517         units/systemd-nspawn@.service.in
518
519 CLEANFILES += \
520         units/console-shell.service.m4 \
521         units/console-getty.service.m4 \
522         units/container-getty@.service.m4 \
523         units/rescue.service.m4 \
524         units/user@.service.m4
525
526 if HAVE_SYSV_COMPAT
527 nodist_systemunit_DATA += \
528         units/rc-local.service \
529         units/halt-local.service
530
531 systemgenerator_PROGRAMS += \
532         systemd-rc-local-generator
533 endif
534
535 EXTRA_DIST += \
536         units/rc-local.service.in \
537         units/halt-local.service.in
538
539 # automake is broken and can't handle files with a dash in front
540 # http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14728#8
541 units-install-hook:
542         mv $(DESTDIR)$(systemunitdir)/x-.slice $(DESTDIR)/$(systemunitdir)/-.slice
543
544 units-uninstall-hook:
545         rm -f $(DESTDIR)/$(systemunitdir)/-.slice
546
547 INSTALL_DATA_HOOKS += units-install-hook
548 UNINSTALL_DATA_HOOKS += units-uninstall-hook
549
550 dist_doc_DATA = \
551         README \
552         NEWS \
553         LICENSE.LGPL2.1 \
554         LICENSE.GPL2 \
555         LICENSE.MIT \
556         DISTRO_PORTING
557
558 @INTLTOOL_POLICY_RULE@
559
560 # ------------------------------------------------------------------------------
561
562 MANPAGES =
563 MANPAGES_ALIAS =
564
565 include Makefile-man.am
566
567 .PHONY: man update-man-list
568 man: $(MANPAGES) $(MANPAGES_ALIAS) $(HTML_FILES) $(HTML_ALIAS)
569
570 XML_FILES = \
571         ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
572 HTML_FILES = \
573         ${XML_FILES:.xml=.html}
574 HTML_ALIAS = \
575         ${patsubst %.1,%.html,${patsubst %.3,%.html,${patsubst %.5,%.html,${patsubst %.7,%.html,${patsubst %.8,%.html,$(MANPAGES_ALIAS)}}}}}
576
577 if ENABLE_MANPAGES
578 man_MANS = \
579         $(MANPAGES) \
580         $(MANPAGES_ALIAS)
581
582 noinst_DATA += \
583         $(HTML_FILES) \
584         $(HTML_ALIAS)
585
586 CLEANFILES += \
587         $(man_MANS) \
588         $(HTML_FILES) \
589         $(HTML_ALIAS)
590
591 docs/html/man:
592         $(AM_V_at)$(MKDIR_P) $(dir $@)
593         $(AM_V_LN)$(LN_S) -f ../../man $@
594
595 noinst_DATA += \
596         docs/html/man
597
598 CLEANFILES += \
599         docs/html/man
600
601 if HAVE_PYTHON
602 man/index.html: man/systemd.index.html
603         $(AM_V_LN)$(LN_S) -f systemd.index.html $@
604
605 noinst_DATA += \
606         man/index.html
607
608 CLEANFILES += \
609         man/index.html
610
611 XML_GLOB = $(wildcard $(top_srcdir)/man/*.xml $(top_builddir)/man/*.xml)
612 NON_INDEX_XML_FILES = $(filter-out man/systemd.index.xml,$(XML_FILES))
613 SOURCE_XML_FILES = $(filter-out man/systemd.directives.xml,$(NON_INDEX_XML_FILES))
614
615 update-man-list: $(top_srcdir)/tools/make-man-rules.py $(XML_GLOB)
616         $(AM_V_GEN)$(PYTHON) $^ > $(top_srcdir)/Makefile-man.tmp
617         $(AM_V_at)mv $(top_srcdir)/Makefile-man.tmp $(top_srcdir)/Makefile-man.am
618         @echo "Makefile-man.am has been regenerated"
619
620 man/systemd.index.xml: $(top_srcdir)/tools/make-man-index.py $(NON_INDEX_XML_FILES)
621         $(AM_V_at)$(MKDIR_P) $(dir $@)
622         $(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^)
623
624 man/systemd.directives.xml: $(top_srcdir)/tools/make-directive-index.py $(SOURCE_XML_FILES)
625         $(AM_V_at)$(MKDIR_P) $(dir $@)
626         $(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^)
627
628 EXTRA_DIST += \
629         man/systemd.index.xml \
630         man/index.html \
631         man/systemd.directives.xml
632
633 CLEANFILES += \
634         man/systemd.index.xml \
635         man/systemd.directives.xml
636
637 endif
638
639 endif
640
641 EXTRA_DIST += \
642         $(XML_FILES) \
643         $(HTML_FILES) \
644         $(HTML_ALIAS) \
645         $(man_MANS) \
646         tools/make-man-index.py \
647         tools/make-directive-index.py \
648         tools/make-man-rules.py \
649         tools/xml_helper.py \
650         man/less-variables.xml
651
652 # ------------------------------------------------------------------------------
653 noinst_LTLIBRARIES += \
654         libsystemd-shared.la
655
656 libsystemd_shared_la_SOURCES = \
657         src/shared/linux/auto_dev-ioctl.h \
658         src/shared/linux/fanotify.h \
659         src/shared/ioprio.h \
660         src/shared/missing.h \
661         src/shared/initreq.h \
662         src/shared/securebits.h \
663         src/shared/special.h \
664         src/shared/list.h \
665         src/shared/macro.h \
666         src/shared/def.h \
667         src/shared/sparse-endian.h \
668         src/shared/refcnt.h \
669         src/shared/udev-util.h \
670         src/shared/bus-errors.h \
671         src/shared/device-nodes.c \
672         src/shared/device-nodes.h \
673         src/shared/util.c \
674         src/shared/util.h \
675         src/shared/virt.c \
676         src/shared/virt.h \
677         src/shared/efivars.c \
678         src/shared/efivars.h \
679         src/shared/path-util.c \
680         src/shared/path-util.h \
681         src/shared/time-util.c \
682         src/shared/time-util.h \
683         src/shared/hashmap.c \
684         src/shared/hashmap.h \
685         src/shared/siphash24.c \
686         src/shared/siphash24.h \
687         src/shared/set.c \
688         src/shared/set.h \
689         src/shared/fdset.c \
690         src/shared/fdset.h \
691         src/shared/prioq.c \
692         src/shared/prioq.h \
693         src/shared/sleep-config.c \
694         src/shared/sleep-config.h \
695         src/shared/strv.c \
696         src/shared/strv.h \
697         src/shared/env-util.c \
698         src/shared/env-util.h \
699         src/shared/strbuf.c \
700         src/shared/strbuf.h \
701         src/shared/strxcpyx.c \
702         src/shared/strxcpyx.h \
703         src/shared/conf-parser.c \
704         src/shared/conf-parser.h \
705         src/shared/log.c \
706         src/shared/log.h \
707         src/shared/ratelimit.h \
708         src/shared/ratelimit.c \
709         src/shared/exit-status.c \
710         src/shared/exit-status.h \
711         src/shared/utf8.c \
712         src/shared/utf8.h \
713         src/shared/gunicode.c \
714         src/shared/gunicode.h \
715         src/shared/pager.c \
716         src/shared/pager.h \
717         src/shared/socket-util.c \
718         src/shared/socket-util.h \
719         src/shared/conf-files.c \
720         src/shared/conf-files.h \
721         src/shared/cgroup-util.c \
722         src/shared/cgroup-util.h \
723         src/shared/cgroup-show.c \
724         src/shared/cgroup-show.h \
725         src/shared/unit-name.c \
726         src/shared/unit-name.h \
727         src/shared/utmp-wtmp.c \
728         src/shared/utmp-wtmp.h \
729         src/shared/watchdog.c \
730         src/shared/watchdog.h \
731         src/shared/spawn-ask-password-agent.c \
732         src/shared/spawn-ask-password-agent.h \
733         src/shared/replace-var.c \
734         src/shared/replace-var.h \
735         src/shared/spawn-polkit-agent.c \
736         src/shared/spawn-polkit-agent.h \
737         src/shared/hwclock.c \
738         src/shared/hwclock.h \
739         src/shared/time-dst.c \
740         src/shared/time-dst.h \
741         src/shared/calendarspec.c \
742         src/shared/calendarspec.h \
743         src/shared/fileio.c \
744         src/shared/fileio.h \
745         src/shared/output-mode.h \
746         src/shared/MurmurHash2.c \
747         src/shared/MurmurHash2.h \
748         src/shared/acpi-fpdt.h \
749         src/shared/acpi-fpdt.c \
750         src/shared/boot-timestamps.h \
751         src/shared/boot-timestamps.c \
752         src/shared/mkdir.c \
753         src/shared/mkdir.h \
754         src/shared/smack-util.c \
755         src/shared/smack-util.h \
756         src/shared/apparmor-util.c \
757         src/shared/apparmor-util.h \
758         src/shared/ima-util.c \
759         src/shared/ima-util.h \
760         src/shared/ptyfwd.c \
761         src/shared/ptyfwd.h \
762         src/shared/net-util.c \
763         src/shared/net-util.h \
764         src/shared/errno-list.c \
765         src/shared/errno-list.h \
766         src/shared/audit.c \
767         src/shared/audit.h \
768         src/shared/xml.c \
769         src/shared/xml.h
770
771 nodist_libsystemd_shared_la_SOURCES = \
772         src/shared/errno-from-name.h \
773         src/shared/errno-to-name.h
774
775 # ------------------------------------------------------------------------------
776 noinst_LTLIBRARIES += \
777         libsystemd-units.la
778
779 libsystemd_units_la_SOURCES = \
780         src/shared/install.c \
781         src/shared/install.h \
782         src/shared/install-printf.c \
783         src/shared/install-printf.h \
784         src/shared/path-lookup.c \
785         src/shared/path-lookup.h \
786         src/shared/specifier.c \
787         src/shared/specifier.h
788
789 # ------------------------------------------------------------------------------
790 noinst_LTLIBRARIES += \
791         libsystemd-label.la
792
793 libsystemd_label_la_SOURCES = \
794         src/shared/socket-label.c \
795         src/shared/label.c \
796         src/shared/label.h \
797         src/shared/selinux-util.c \
798         src/shared/selinux-util.h \
799         src/shared/mkdir-label.c \
800         src/shared/ask-password-api.c \
801         src/shared/ask-password-api.h \
802         src/shared/fileio-label.c \
803         src/shared/fileio-label.h \
804         src/shared/dev-setup.c \
805         src/shared/dev-setup.h
806
807 libsystemd_label_la_CFLAGS = \
808         $(AM_CFLAGS) \
809         $(SELINUX_CFLAGS)
810
811 libsystemd_label_la_LIBADD = \
812         $(SELINUX_LIBS)
813
814 # ------------------------------------------------------------------------------
815
816 if HAVE_SECCOMP
817
818 noinst_LTLIBRARIES += \
819         libsystemd-seccomp.la
820
821 libsystemd_seccomp_la_SOURCES = \
822         src/shared/seccomp-util.h \
823         src/shared/seccomp-util.c
824
825 libsystemd_seccomp_la_CFLAGS = \
826         $(AM_CFLAGS) \
827         $(SECCOMP_CFLAGS)
828
829 libsystemd_seccomp_la_LIBADD = \
830         $(SECCOMP_LIBS)
831
832 endif
833
834 # ------------------------------------------------------------------------------
835 noinst_LTLIBRARIES += \
836         libsystemd-logs.la
837
838 libsystemd_logs_la_SOURCES = \
839         src/shared/logs-show.c \
840         src/shared/logs-show.h
841
842 # ------------------------------------------------------------------------------
843 noinst_LTLIBRARIES += \
844         libsystemd-capability.la
845
846 libsystemd_capability_la_SOURCES = \
847         src/shared/capability.c \
848         src/shared/capability.h
849
850 libsystemd_capability_la_CFLAGS = \
851         $(AM_CFLAGS) \
852         $(CAP_CFLAGS)
853
854 libsystemd_capability_la_LIBADD = \
855         $(CAP_LIBS)
856
857 # ------------------------------------------------------------------------------
858 if HAVE_ACL
859 noinst_LTLIBRARIES += \
860         libsystemd-acl.la
861
862 libsystemd_acl_la_SOURCES = \
863         src/shared/acl-util.c \
864         src/shared/acl-util.h
865
866 libsystemd_acl_la_CFLAGS = \
867         $(AM_CFLAGS) \
868         $(ACL_CFLAGS)
869
870 libsystemd_acl_la_LIBADD = \
871         $(ACL_LIBS)
872 endif
873
874 # ------------------------------------------------------------------------------
875 noinst_LTLIBRARIES += \
876         libsystemd-core.la
877
878 libsystemd_core_la_SOURCES = \
879         src/core/unit.c \
880         src/core/unit.h \
881         src/core/unit-printf.c \
882         src/core/unit-printf.h \
883         src/core/job.c \
884         src/core/job.h \
885         src/core/manager.c \
886         src/core/manager.h \
887         src/core/transaction.c \
888         src/core/transaction.h \
889         src/core/load-fragment.c \
890         src/core/load-fragment.h \
891         src/core/service.c \
892         src/core/service.h \
893         src/core/socket.c \
894         src/core/socket.h \
895         src/core/busname.c \
896         src/core/busname.h \
897         src/core/target.c \
898         src/core/target.h \
899         src/core/snapshot.c \
900         src/core/snapshot.h \
901         src/core/device.c \
902         src/core/device.h \
903         src/core/mount.c \
904         src/core/mount.h \
905         src/core/automount.c \
906         src/core/automount.h \
907         src/core/swap.c \
908         src/core/swap.h \
909         src/core/timer.c \
910         src/core/timer.h \
911         src/core/path.c \
912         src/core/path.h \
913         src/core/slice.c \
914         src/core/slice.h \
915         src/core/scope.c \
916         src/core/scope.h \
917         src/core/load-dropin.c \
918         src/core/load-dropin.h \
919         src/core/execute.c \
920         src/core/execute.h \
921         src/core/kill.c \
922         src/core/kill.h \
923         src/core/dbus.c \
924         src/core/dbus.h \
925         src/core/dbus-manager.c \
926         src/core/dbus-manager.h \
927         src/core/dbus-unit.c \
928         src/core/dbus-unit.h \
929         src/core/dbus-job.c \
930         src/core/dbus-job.h \
931         src/core/dbus-service.c \
932         src/core/dbus-service.h \
933         src/core/dbus-socket.c \
934         src/core/dbus-socket.h \
935         src/core/dbus-busname.c \
936         src/core/dbus-busname.h \
937         src/core/dbus-target.c \
938         src/core/dbus-target.h \
939         src/core/dbus-snapshot.c \
940         src/core/dbus-snapshot.h \
941         src/core/dbus-device.c \
942         src/core/dbus-device.h \
943         src/core/dbus-mount.c \
944         src/core/dbus-mount.h \
945         src/core/dbus-automount.c \
946         src/core/dbus-automount.h \
947         src/core/dbus-swap.c \
948         src/core/dbus-swap.h \
949         src/core/dbus-timer.c \
950         src/core/dbus-timer.h \
951         src/core/dbus-path.c \
952         src/core/dbus-path.h \
953         src/core/dbus-slice.c \
954         src/core/dbus-slice.h \
955         src/core/dbus-scope.c \
956         src/core/dbus-scope.h \
957         src/core/dbus-execute.c \
958         src/core/dbus-execute.h \
959         src/core/dbus-kill.c \
960         src/core/dbus-kill.h \
961         src/core/dbus-cgroup.c \
962         src/core/dbus-cgroup.h \
963         src/core/dbus-client-track.c \
964         src/core/dbus-client-track.h \
965         src/core/cgroup.c \
966         src/core/cgroup.h \
967         src/core/selinux-access.c \
968         src/core/selinux-access.h \
969         src/core/selinux-setup.c \
970         src/core/selinux-setup.h \
971         src/core/smack-setup.c \
972         src/core/smack-setup.h \
973         src/core/ima-setup.c \
974         src/core/ima-setup.h \
975         src/core/locale-setup.h \
976         src/core/locale-setup.c \
977         src/core/hostname-setup.c \
978         src/core/hostname-setup.h \
979         src/core/machine-id-setup.c \
980         src/core/machine-id-setup.h \
981         src/core/mount-setup.c \
982         src/core/mount-setup.h \
983         src/core/loopback-setup.h \
984         src/core/loopback-setup.c \
985         src/core/condition.c \
986         src/core/condition.h \
987         src/core/namespace.c \
988         src/core/namespace.h \
989         src/core/tcpwrap.c \
990         src/core/tcpwrap.h \
991         src/core/build.h \
992         src/core/sysfs-show.h \
993         src/core/switch-root.h \
994         src/core/switch-root.c \
995         src/core/killall.h \
996         src/core/killall.c \
997         src/core/audit-fd.c \
998         src/core/audit-fd.h \
999         src/core/async.c \
1000         src/core/async.h
1001
1002 if HAVE_KMOD
1003 libsystemd_core_la_SOURCES += \
1004         src/core/kmod-setup.c \
1005         src/core/kmod-setup.h
1006 endif
1007
1008 nodist_libsystemd_core_la_SOURCES = \
1009         src/core/load-fragment-gperf.c \
1010         src/core/load-fragment-gperf-nulstr.c
1011
1012 libsystemd_core_la_CFLAGS = \
1013         $(AM_CFLAGS) \
1014         $(LIBWRAP_CFLAGS) \
1015         $(PAM_CFLAGS) \
1016         $(AUDIT_CFLAGS) \
1017         $(CAP_CFLAGS) \
1018         $(KMOD_CFLAGS) \
1019         $(SECCOMP_CFLAGS) \
1020         -pthread
1021
1022 libsystemd_core_la_LIBADD = \
1023         libsystemd-capability.la \
1024         libsystemd-units.la \
1025         libsystemd-label.la \
1026         libudev-internal.la \
1027         libsystemd-shared.la \
1028         libsystemd-internal.la \
1029         $(LIBWRAP_LIBS) \
1030         $(PAM_LIBS) \
1031         $(AUDIT_LIBS) \
1032         $(CAP_LIBS) \
1033         $(KMOD_LIBS) \
1034         $(SECCOMP_LIBS)
1035
1036 if HAVE_SECCOMP
1037 libsystemd_core_la_LIBADD += \
1038         libsystemd-seccomp.la
1039 endif
1040
1041 src/core/load-fragment-gperf-nulstr.c: src/core/load-fragment-gperf.gperf
1042         $(AM_V_at)$(MKDIR_P) $(dir $@)
1043         $(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 ";" }' < $< > $@
1044
1045 EXTRA_DIST += \
1046         src/core/load-fragment-gperf.gperf.m4
1047
1048 CLEANFILES += \
1049         src/core/load-fragment-gperf.gperf \
1050         src/core/load-fragment-gperf.c \
1051         src/core/load-fragment-gperf-nulstr.c \
1052         src/shared/errno-list.txt \
1053         src/shared/errno-from-name.gperf
1054
1055 BUILT_SOURCES += \
1056         src/shared/errno-from-name.h \
1057         src/shared/errno-to-name.h
1058
1059 src/shared/errno-list.txt:
1060         $(AM_V_at)$(MKDIR_P) $(dir $@)
1061         $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include errno.h - < /dev/null | $(AWK) '/^#define[ \t]+E[^ _]+[ \t]+[0-9]/ { print $$2; }'  > $@
1062
1063 src/shared/errno-from-name.gperf: src/shared/errno-list.txt
1064         $(AM_V_at)$(MKDIR_P) $(dir $@)
1065         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct errno_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' < $< > $@
1066
1067 src/shared/errno-from-name.h: src/shared/errno-from-name.gperf
1068         $(AM_V_at)$(MKDIR_P) $(dir $@)
1069         $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_errno -H hash_errno_name -p -C < $< > $@
1070
1071 src/shared/errno-to-name.h: src/shared/errno-list.txt
1072         $(AM_V_at)$(MKDIR_P) $(dir $@)
1073         $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const errno_names[] = { "} { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' < $< > $@
1074
1075 # ------------------------------------------------------------------------------
1076 systemd_SOURCES = \
1077         src/core/main.c
1078
1079 systemd_LDADD = \
1080         libsystemd-core.la \
1081         $(RT_LIBS)
1082
1083 dist_pkgsysconf_DATA += \
1084         src/core/system.conf \
1085         src/core/user.conf
1086
1087 dist_dbuspolicy_DATA += \
1088         src/core/org.freedesktop.systemd1.conf
1089
1090 dist_dbussystemservice_DATA += \
1091         src/core/org.freedesktop.systemd1.service
1092
1093 polkitpolicy_in_in_files += \
1094         src/core/org.freedesktop.systemd1.policy.in.in
1095
1096 pkgconfigdata_DATA = \
1097         src/core/systemd.pc
1098
1099 nodist_rpmmacros_DATA = \
1100         src/core/macros.systemd
1101
1102 EXTRA_DIST += \
1103         src/core/systemd.pc.in \
1104         src/core/macros.systemd.in
1105
1106 CLEANFILES += \
1107         src/core/macros.systemd \
1108         src/core/org.freedesktop.systemd1.policy.in
1109
1110 # ------------------------------------------------------------------------------
1111 manual_tests += \
1112         test-engine \
1113         test-ns \
1114         test-loopback \
1115         test-hostname \
1116         test-daemon \
1117         test-cgroup \
1118         test-install \
1119         test-watchdog \
1120         test-log
1121
1122 tests += \
1123         test-job-type \
1124         test-env-replace \
1125         test-strbuf \
1126         test-strv \
1127         test-path-util \
1128         test-strxcpyx \
1129         test-unit-name \
1130         test-unit-file \
1131         test-utf8 \
1132         test-ellipsize \
1133         test-util \
1134         test-tmpfiles \
1135         test-namespace \
1136         test-date \
1137         test-sleep \
1138         test-replace-var \
1139         test-sched-prio \
1140         test-calendarspec \
1141         test-strip-tab-ansi \
1142         test-cgroup-util \
1143         test-cgroup-mask \
1144         test-prioq \
1145         test-fileio \
1146         test-time \
1147         test-hashmap \
1148         test-list \
1149         test-tables \
1150         test-device-nodes \
1151         test-xml
1152
1153 EXTRA_DIST += \
1154         test/sched_idle_bad.service \
1155         test/sched_idle_ok.service \
1156         test/sched_rr_bad.service \
1157         test/sched_rr_ok.service \
1158         test/sched_rr_change.service \
1159         test/son.service \
1160         test/daughter.service \
1161         test/parent.slice
1162
1163 EXTRA_DIST += \
1164         src/test/test-helper.h
1165
1166 test_device_nodes_SOURCES = \
1167         src/test/test-device-nodes.c
1168
1169 test_device_nodes_LDADD = \
1170         libsystemd-shared.la
1171
1172 test_engine_SOURCES = \
1173         src/test/test-engine.c
1174
1175 test_engine_LDADD = \
1176         libsystemd-core.la \
1177         $(RT_LIBS)
1178
1179 test_job_type_SOURCES = \
1180         src/test/test-job-type.c
1181
1182 test_job_type_LDADD = \
1183         libsystemd-core.la \
1184         $(RT_LIBS)
1185
1186 test_ns_SOURCES = \
1187         src/test/test-ns.c
1188
1189 test_ns_LDADD = \
1190         libsystemd-core.la
1191
1192 test_loopback_SOURCES = \
1193         src/test/test-loopback.c
1194
1195 test_loopback_LDADD = \
1196         libsystemd-core.la
1197
1198 test_hostname_SOURCES = \
1199         src/test/test-hostname.c
1200
1201 test_hostname_LDADD = \
1202         libsystemd-core.la
1203
1204 if ENABLE_EFI
1205 manual_tests += \
1206         test-boot-timestamp
1207
1208 test_boot_timestamp_SOURCES = \
1209         src/test/test-boot-timestamps.c
1210
1211 test_boot_timestamp_LDADD = \
1212         libsystemd-shared.la
1213 endif
1214
1215 test_unit_name_SOURCES = \
1216         src/test/test-unit-name.c
1217
1218 test_unit_name_LDADD = \
1219         libsystemd-core.la \
1220         $(RT_LIBS)
1221
1222 test_unit_file_SOURCES = \
1223         src/test/test-unit-file.c
1224
1225 test_unit_file_LDADD = \
1226         libsystemd-core.la \
1227         $(RT_LIBS)
1228
1229 test_utf8_SOURCES = \
1230         src/test/test-utf8.c
1231
1232 test_utf8_LDADD = \
1233         libsystemd-shared.la
1234
1235 test_util_SOURCES = \
1236         src/test/test-util.c
1237
1238 test_util_LDADD = \
1239         libsystemd-core.la
1240
1241 test_tmpfiles_SOURCES = \
1242         src/test/test-tmpfiles.c
1243
1244 test_tmpfiles_LDADD = \
1245         libsystemd-shared.la
1246
1247 test_namespace_SOURCES = \
1248         src/test/test-namespace.c
1249
1250 test_namespace_LDADD = \
1251         libsystemd-core.la
1252
1253 test_hashmap_SOURCES = \
1254         src/test/test-hashmap.c
1255
1256 test_hashmap_LDADD = \
1257         libsystemd-core.la
1258
1259 test_xml_SOURCES = \
1260         src/test/test-xml.c
1261
1262 test_xml_LDADD = \
1263         libsystemd-shared.la
1264
1265 test_list_SOURCES = \
1266         src/test/test-list.c
1267
1268 test_list_LDADD = \
1269         libsystemd-core.la
1270
1271 test_tables_SOURCES = \
1272         src/test/test-tables.c \
1273         src/shared/test-tables.h
1274
1275 test_tables_LDADD = \
1276         libsystemd-logs.la \
1277         libsystemd-journal-internal.la \
1278         libsystemd-core.la \
1279         $(RT_LIBS)
1280
1281 test_prioq_SOURCES = \
1282         src/test/test-prioq.c
1283
1284 test_prioq_LDADD = \
1285         libsystemd-core.la
1286
1287 test_fileio_SOURCES = \
1288         src/test/test-fileio.c
1289
1290 test_fileio_LDADD = \
1291         libsystemd-core.la
1292
1293 test_time_SOURCES = \
1294         src/test/test-time.c
1295
1296 test_time_LDADD = \
1297         libsystemd-core.la
1298
1299 test_log_SOURCES = \
1300         src/test/test-log.c
1301
1302 test_log_LDADD = \
1303         libsystemd-core.la
1304
1305 test_ellipsize_SOURCES = \
1306         src/test/test-ellipsize.c
1307
1308 test_ellipsize_LDADD = \
1309         libsystemd-core.la
1310
1311 test_date_SOURCES = \
1312         src/test/test-date.c
1313
1314 test_date_LDADD = \
1315         libsystemd-core.la
1316
1317 test_sleep_SOURCES = \
1318         src/test/test-sleep.c
1319
1320 test_sleep_LDADD = \
1321         libsystemd-core.la
1322
1323 test_replace_var_SOURCES = \
1324         src/test/test-replace-var.c
1325
1326 test_replace_var_LDADD = \
1327         libsystemd-shared.la
1328
1329 test_calendarspec_SOURCES = \
1330         src/test/test-calendarspec.c
1331
1332 test_calendarspec_LDADD = \
1333         libsystemd-shared.la
1334
1335 test_strip_tab_ansi_SOURCES = \
1336         src/test/test-strip-tab-ansi.c
1337
1338 test_strip_tab_ansi_LDADD = \
1339         libsystemd-shared.la
1340
1341 test_daemon_SOURCES = \
1342         src/test/test-daemon.c
1343
1344 test_daemon_LDADD = \
1345         libsystemd-internal.la \
1346         libsystemd-shared.la
1347
1348 test_cgroup_SOURCES = \
1349         src/test/test-cgroup.c
1350
1351 test_cgroup_LDADD = \
1352         libsystemd-label.la \
1353         libsystemd-shared.la
1354
1355 test_cgroup_mask_SOURCES = \
1356         src/test/test-cgroup-mask.c
1357
1358 test_cgroup_mask_CPPFLAGS = \
1359         $(AM_CPPFLAGS) \
1360         -DTEST_DIR=\"$(abs_top_srcdir)/test\"
1361
1362 test_cgroup_mask_LDADD = \
1363         libsystemd-core.la \
1364         $(RT_LIBS)
1365
1366 test_cgroup_util_SOURCES = \
1367         src/test/test-cgroup-util.c
1368
1369 test_cgroup_util_LDADD = \
1370         libsystemd-label.la \
1371         libsystemd-internal.la \
1372         libsystemd-shared.la
1373
1374 test_env_replace_SOURCES = \
1375         src/test/test-env-replace.c
1376
1377 test_env_replace_LDADD = \
1378         libsystemd-shared.la
1379
1380 test_strbuf_SOURCES = \
1381         src/test/test-strbuf.c
1382
1383 test_strbuf_LDADD = \
1384         libsystemd-shared.la
1385
1386 test_strv_SOURCES = \
1387         src/test/test-strv.c
1388
1389 test_strv_LDADD = \
1390         libsystemd-units.la \
1391         libsystemd-internal.la \
1392         libsystemd-shared.la
1393
1394 test_path_util_SOURCES = \
1395         src/test/test-path-util.c
1396
1397 test_path_util_LDADD = \
1398         libsystemd-shared.la
1399
1400 test_strxcpyx_SOURCES = \
1401         src/test/test-strxcpyx.c
1402
1403 test_strxcpyx_LDADD = \
1404         libsystemd-shared.la
1405
1406 test_install_SOURCES = \
1407         src/test/test-install.c
1408
1409 test_install_LDADD = \
1410         libsystemd-units.la \
1411         libsystemd-label.la \
1412         libsystemd-internal.la \
1413         libsystemd-shared.la
1414
1415 test_watchdog_SOURCES = \
1416         src/test/test-watchdog.c
1417
1418 test_watchdog_LDADD = \
1419         libsystemd-shared.la
1420
1421 test_sched_prio_SOURCES = \
1422         src/test/test-sched-prio.c
1423
1424 test_sched_prio_CPPFLAGS = \
1425         $(AM_CPPFLAGS) \
1426         -DTEST_DIR=\"$(abs_top_srcdir)/test\"
1427
1428 test_sched_prio_LDADD = \
1429         libsystemd-core.la \
1430         $(RT_LIBS)
1431
1432 # ------------------------------------------------------------------------------
1433 ## .PHONY so it always rebuilds it
1434 .PHONY: coverage lcov-run lcov-report coverage-sync
1435
1436 # run lcov from scratch, always
1437 coverage:
1438         $(MAKE) lcov-run
1439         $(MAKE) lcov-report
1440
1441 coverage_dir = coverage
1442 coverage_opts = --base-directory $(srcdir) --directory $(builddir) --rc 'geninfo_adjust_src_path=$(abspath $(srcdir))=>$(abspath $(builddir))'
1443
1444 if ENABLE_COVERAGE
1445 # reset run coverage tests
1446 lcov-run:
1447         @rm -rf $(coverage_dir)
1448         lcov $(coverage_opts) --zerocounters
1449         -$(MAKE) check
1450
1451 # generate report based on current coverage data
1452 lcov-report:
1453         $(MKDIR_P) $(coverage_dir)
1454         lcov $(coverage_opts) --compat-libtool --capture --no-external \
1455                 | sed 's|$(abspath $(builddir))|$(abspath $(srcdir))|' > $(coverage_dir)/.lcov.info
1456         genhtml -t "systemd test coverage" -o $(coverage_dir) $(coverage_dir)/.lcov.info
1457         @echo "Coverage report generated in $(abs_builddir)/$(coverage_dir)/index.html"
1458
1459 # lcov doesn't work properly with vpath builds, make sure that bad
1460 # output is not uploaded by mistake.
1461 coverage-sync: coverage
1462         test "$(builddir)" = "$(srcdir)"
1463         rsync -rlv --delete --omit-dir-times coverage/ $(www_target)/coverage
1464
1465 else
1466 lcov-run lcov-report:
1467         echo "Need to reconfigure with --enable-coverage"
1468 endif
1469
1470 # ------------------------------------------------------------------------------
1471 systemd_analyze_SOURCES = \
1472         src/analyze/analyze.c
1473
1474 systemd_analyze_LDADD = \
1475         libsystemd-internal.la \
1476         libsystemd-shared.la
1477
1478 # ------------------------------------------------------------------------------
1479 systemd_initctl_SOURCES = \
1480         src/initctl/initctl.c
1481
1482 systemd_initctl_LDADD = \
1483         libsystemd-internal.la \
1484         libsystemd-shared.la
1485
1486 # ------------------------------------------------------------------------------
1487 systemd_update_utmp_SOURCES = \
1488         src/update-utmp/update-utmp.c
1489
1490 systemd_update_utmp_CFLAGS = \
1491         $(AM_CFLAGS) \
1492         $(AUDIT_CFLAGS)
1493
1494 systemd_update_utmp_LDADD = \
1495         libsystemd-internal.la \
1496         libsystemd-shared.la \
1497         $(AUDIT_LIBS)
1498
1499 # ------------------------------------------------------------------------------
1500 systemd_shutdownd_SOURCES = \
1501         src/shutdownd/shutdownd.c
1502
1503 systemd_shutdownd_LDADD = \
1504         libsystemd-label.la \
1505         libsystemd-internal.la \
1506         libsystemd-shared.la
1507
1508 dist_doc_DATA += \
1509         src/systemd/sd-shutdown.h
1510
1511 # ------------------------------------------------------------------------------
1512 systemd_shutdown_SOURCES = \
1513         src/core/umount.c \
1514         src/core/umount.h \
1515         src/core/shutdown.c \
1516         src/core/mount-setup.c \
1517         src/core/mount-setup.h \
1518         src/core/killall.h \
1519         src/core/killall.c
1520
1521 systemd_shutdown_LDADD = \
1522         libsystemd-label.la \
1523         libudev-internal.la \
1524         libsystemd-shared.la
1525
1526 # ------------------------------------------------------------------------------
1527 if HAVE_KMOD
1528 systemd_modules_load_SOURCES = \
1529         src/modules-load/modules-load.c
1530
1531 systemd_modules_load_CFLAGS = \
1532         $(AM_CFLAGS) \
1533         $(KMOD_CFLAGS)
1534
1535 systemd_modules_load_LDADD = \
1536         libsystemd-shared.la \
1537         $(KMOD_LIBS)
1538
1539 rootlibexec_PROGRAMS += \
1540         systemd-modules-load
1541
1542 nodist_systemunit_DATA += \
1543         units/systemd-modules-load.service
1544
1545 SYSINIT_TARGET_WANTS += \
1546         systemd-modules-load.service
1547
1548 if ENABLE_TMPFILES
1549 nodist_systemunit_DATA += \
1550         units/kmod-static-nodes.service
1551
1552 SYSINIT_TARGET_WANTS += \
1553         kmod-static-nodes.service
1554 endif
1555 endif
1556
1557 EXTRA_DIST += \
1558         units/systemd-modules-load.service.in \
1559         units/kmod-static-nodes.service.in
1560
1561 # ------------------------------------------------------------------------------
1562 if ENABLE_TMPFILES
1563 systemd_tmpfiles_SOURCES = \
1564         src/tmpfiles/tmpfiles.c
1565
1566 systemd_tmpfiles_LDADD = \
1567         libsystemd-units.la \
1568         libsystemd-label.la \
1569         libsystemd-capability.la \
1570         libsystemd-internal.la \
1571         libsystemd-shared.la
1572
1573 rootbin_PROGRAMS += \
1574         systemd-tmpfiles
1575
1576 dist_systemunit_DATA += \
1577         units/systemd-tmpfiles-clean.timer
1578
1579 nodist_systemunit_DATA += \
1580         units/systemd-tmpfiles-setup-dev.service \
1581         units/systemd-tmpfiles-setup.service \
1582         units/systemd-tmpfiles-clean.service
1583
1584 dist_tmpfiles_DATA = \
1585         tmpfiles.d/systemd.conf \
1586         tmpfiles.d/systemd-nologin.conf \
1587         tmpfiles.d/tmp.conf \
1588         tmpfiles.d/x11.conf
1589
1590 if HAVE_SYSV_COMPAT
1591 dist_tmpfiles_DATA += \
1592         tmpfiles.d/legacy.conf
1593 endif
1594
1595 SYSINIT_TARGET_WANTS += \
1596         systemd-tmpfiles-setup-dev.service \
1597         systemd-tmpfiles-setup.service
1598
1599 dist_zshcompletion_DATA += \
1600         shell-completion/zsh/_systemd-tmpfiles
1601
1602 TIMERS_TARGET_WANTS += \
1603         systemd-tmpfiles-clean.timer
1604
1605 INSTALL_DIRS += \
1606         $(tmpfilesdir) \
1607         $(sysconfdir)/tmpfiles.d
1608 endif
1609
1610 EXTRA_DIST += \
1611         units/systemd-tmpfiles-setup-dev.service.in \
1612         units/systemd-tmpfiles-setup.service.in \
1613         units/systemd-tmpfiles-clean.service.in
1614
1615 # ------------------------------------------------------------------------------
1616 systemd_machine_id_setup_SOURCES = \
1617         src/machine-id-setup/machine-id-setup-main.c \
1618         src/core/machine-id-setup.c \
1619         src/core/machine-id-setup.h
1620
1621 systemd_machine_id_setup_LDADD = \
1622         libsystemd-label.la \
1623         libsystemd-internal.la \
1624         libsystemd-shared.la
1625
1626 # ------------------------------------------------------------------------------
1627 systemd_sysctl_SOURCES = \
1628         src/sysctl/sysctl.c
1629
1630 systemd_sysctl_LDADD = \
1631         libsystemd-shared.la
1632
1633 # ------------------------------------------------------------------------------
1634 systemd_sleep_SOURCES = \
1635         src/sleep/sleep.c
1636
1637 systemd_sleep_LDADD = \
1638         libsystemd-shared.la
1639
1640 # ------------------------------------------------------------------------------
1641 systemd_fsck_SOURCES = \
1642         src/fsck/fsck.c
1643
1644 systemd_fsck_LDADD = \
1645         libsystemd-internal.la \
1646         libudev-internal.la \
1647         libsystemd-shared.la
1648
1649 # ------------------------------------------------------------------------------
1650 systemd_ac_power_SOURCES = \
1651         src/ac-power/ac-power.c
1652
1653 systemd_ac_power_LDADD = \
1654         libudev-internal.la \
1655         libsystemd-shared.la
1656
1657 # ------------------------------------------------------------------------------
1658 systemd_detect_virt_SOURCES = \
1659         src/detect-virt/detect-virt.c
1660
1661 systemd_detect_virt_LDADD = \
1662         libsystemd-shared.la
1663
1664 systemd-detect-virt-install-hook:
1665         -$(SETCAP) cap_dac_override,cap_sys_ptrace=ep $(DESTDIR)$(bindir)/systemd-detect-virt
1666
1667 INSTALL_EXEC_HOOKS += \
1668         systemd-detect-virt-install-hook
1669
1670 # ------------------------------------------------------------------------------
1671 systemd_delta_SOURCES = \
1672         src/delta/delta.c
1673
1674 systemd_delta_LDADD = \
1675         libsystemd-shared.la
1676
1677 # ------------------------------------------------------------------------------
1678 systemd_getty_generator_SOURCES = \
1679         src/getty-generator/getty-generator.c
1680
1681 systemd_getty_generator_LDADD = \
1682         libsystemd-label.la \
1683         libsystemd-shared.la
1684
1685 # ------------------------------------------------------------------------------
1686 systemd_fstab_generator_SOURCES = \
1687         src/fstab-generator/fstab-generator.c \
1688         src/core/mount-setup.c
1689
1690 systemd_fstab_generator_LDADD = \
1691         libsystemd-label.la \
1692         libsystemd-shared.la
1693
1694 # ------------------------------------------------------------------------------
1695 systemd_system_update_generator_SOURCES = \
1696         src/system-update-generator/system-update-generator.c
1697
1698 systemd_system_update_generator_LDADD = \
1699         libsystemd-label.la \
1700         libsystemd-shared.la
1701
1702 if ENABLE_EFI
1703 # ------------------------------------------------------------------------------
1704 systemgenerator_PROGRAMS +=  \
1705         systemd-efi-boot-generator
1706
1707 systemd_efi_boot_generator_SOURCES = \
1708         src/efi-boot-generator/efi-boot-generator.c
1709
1710 systemd_efi_boot_generator_LDADD = \
1711         libsystemd-label.la \
1712         libsystemd-shared.la
1713
1714 # ------------------------------------------------------------------------------
1715 bootctl_SOURCES = \
1716         src/boot/boot.h \
1717         src/boot/boot-loader.h \
1718         src/boot/bootctl.c \
1719         src/boot/boot-loader.c \
1720         src/boot/boot-efi.c
1721
1722 bootctl_LDADD = \
1723         libsystemd-shared.la \
1724         libsystemd-internal.la
1725
1726 bin_PROGRAMS += \
1727         bootctl
1728
1729 dist_zshcompletion_DATA += \
1730         shell-completion/zsh/_bootctl
1731
1732 endif
1733
1734 # ------------------------------------------------------------------------------
1735 if HAVE_BLKID
1736 systemgenerator_PROGRAMS +=  \
1737         systemd-gpt-auto-generator
1738
1739 systemd_gpt_auto_generator_SOURCES = \
1740         src/gpt-auto-generator/gpt-auto-generator.c
1741
1742 systemd_gpt_auto_generator_LDADD = \
1743         libsystemd-label.la \
1744         libsystemd-internal.la \
1745         libudev-internal.la \
1746         libsystemd-shared.la \
1747         $(BLKID_LIBS)
1748
1749 systemd_gpt_auto_generator_CFLAGS = \
1750         $(AM_CFLAGS) \
1751         $(BLKID_CFLAGS)
1752 endif
1753
1754 # ------------------------------------------------------------------------------
1755 if ENABLE_KDBUS
1756 systemgenerator_PROGRAMS +=  \
1757         systemd-dbus1-generator
1758
1759 systemd_dbus1_generator_SOURCES = \
1760         src/dbus1-generator/dbus1-generator.c
1761
1762 systemd_dbus1_generator_LDADD = \
1763         libsystemd-label.la \
1764         libsystemd-shared.la \
1765         libsystemd-internal.la
1766
1767 dbus1-generator-install-hook:
1768         $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(usergeneratordir)
1769         $(AM_V_LN)$(LN_S) -f $(systemgeneratordir)/systemd-dbus1-generator $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
1770
1771 dbus1-generator-uninstall-hook:
1772         rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
1773
1774 INSTALL_EXEC_HOOKS += dbus1-generator-install-hook
1775 UNINSTALL_EXEC_HOOKS += dbus1-generator-uninstall-hook
1776 endif
1777
1778 # ------------------------------------------------------------------------------
1779 systemd_rc_local_generator_SOURCES = \
1780         src/rc-local-generator/rc-local-generator.c
1781
1782 systemd_rc_local_generator_LDADD = \
1783         libsystemd-label.la \
1784         libsystemd-shared.la
1785
1786 # ------------------------------------------------------------------------------
1787 systemd_remount_fs_SOURCES = \
1788         src/remount-fs/remount-fs.c \
1789         src/core/mount-setup.c \
1790         src/core/mount-setup.h
1791
1792 systemd_remount_fs_LDADD = \
1793         libsystemd-label.la \
1794         libsystemd-shared.la
1795
1796 # ------------------------------------------------------------------------------
1797 systemd_cgroups_agent_SOURCES = \
1798         src/cgroups-agent/cgroups-agent.c
1799
1800 systemd_cgroups_agent_LDADD = \
1801         libsystemd-internal.la \
1802         libsystemd-shared.la
1803
1804 # ------------------------------------------------------------------------------
1805 systemctl_SOURCES = \
1806         src/systemctl/systemctl.c
1807
1808 systemctl_LDADD = \
1809         libsystemd-units.la \
1810         libsystemd-label.la \
1811         libsystemd-internal.la \
1812         libsystemd-logs.la \
1813         libsystemd-journal-internal.la \
1814         libsystemd-shared.la
1815
1816 # ------------------------------------------------------------------------------
1817 systemd_notify_SOURCES = \
1818         src/notify/notify.c \
1819         src/readahead/sd-readahead.c
1820
1821 systemd_notify_LDADD = \
1822         libsystemd-internal.la \
1823         libsystemd-shared.la
1824
1825 # ------------------------------------------------------------------------------
1826 systemd_ask_password_SOURCES = \
1827         src/ask-password/ask-password.c
1828
1829 systemd_ask_password_LDADD = \
1830         libsystemd-label.la \
1831         libsystemd-shared.la
1832
1833 # ------------------------------------------------------------------------------
1834 systemd_reply_password_SOURCES = \
1835         src/reply-password/reply-password.c
1836
1837 systemd_reply_password_LDADD = \
1838         libsystemd-shared.la
1839
1840 # ------------------------------------------------------------------------------
1841 systemd_cgls_SOURCES = \
1842         src/cgls/cgls.c
1843
1844 systemd_cgls_LDADD = \
1845         libsystemd-shared.la
1846
1847 # ------------------------------------------------------------------------------
1848 systemd_cgtop_SOURCES = \
1849         src/cgtop/cgtop.c
1850
1851 systemd_cgtop_LDADD = \
1852         libsystemd-shared.la
1853
1854 # ------------------------------------------------------------------------------
1855 systemd_nspawn_SOURCES = \
1856         src/nspawn/nspawn.c \
1857         src/core/mount-setup.c \
1858         src/core/mount-setup.h \
1859         src/core/loopback-setup.c \
1860         src/core/loopback-setup.h
1861
1862 systemd_nspawn_CFLAGS = \
1863         $(AM_CFLAGS) \
1864         $(SECCOMP_CFLAGS)
1865
1866 systemd_nspawn_LDADD = \
1867         libsystemd-label.la \
1868         libsystemd-capability.la \
1869         libsystemd-internal.la \
1870         libudev-internal.la \
1871         libsystemd-shared.la \
1872         libsystemd-seccomp.la \
1873         $(SECCOMP_LIBS)
1874
1875 # ------------------------------------------------------------------------------
1876 systemd_run_SOURCES = \
1877         src/run/run.c
1878
1879 systemd_run_LDADD = \
1880         libsystemd-label.la \
1881         libsystemd-capability.la \
1882         libsystemd-internal.la \
1883         libsystemd-shared.la
1884
1885 # ------------------------------------------------------------------------------
1886 systemd_bus_proxyd_SOURCES = \
1887         src/bus-proxyd/bus-proxyd.c
1888
1889 systemd_bus_proxyd_LDADD = \
1890         libsystemd-internal.la \
1891         libsystemd-shared.la
1892
1893 bus-proxyd-install-hook:
1894         $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(bindir)
1895         $(AM_V_LN)$(LN_S) -f ../lib/systemd/systemd-bus-proxyd $(DESTDIR)$(bindir)/systemd-stdio-bridge
1896
1897 bus-proxyd-uninstall-hook:
1898         rm -f $(DESTDIR)$(bindir)/systemd-stdio-bridge
1899
1900 INSTALL_EXEC_HOOKS += bus-proxyd-install-hook
1901 UNINSTALL_EXEC_HOOKS += bus-proxyd-uninstall-hook
1902
1903 if ENABLE_KDBUS
1904 nodist_systemunit_DATA += \
1905         units/systemd-bus-proxyd@.service
1906
1907 dist_systemunit_DATA += \
1908         units/systemd-bus-proxyd.socket
1909
1910 dist_userunit_DATA += \
1911         units/user/systemd-bus-proxyd.socket \
1912         units/user/systemd-bus-proxyd@.service
1913 endif
1914
1915 EXTRA_DIST += \
1916         units/systemd-bus-proxyd@.service.in
1917
1918 # ------------------------------------------------------------------------------
1919 systemd_tty_ask_password_agent_SOURCES = \
1920         src/tty-ask-password-agent/tty-ask-password-agent.c
1921
1922 systemd_tty_ask_password_agent_LDADD = \
1923         libsystemd-label.la \
1924         libsystemd-shared.la
1925
1926 # ------------------------------------------------------------------------------
1927 libsystemd_la_SOURCES = \
1928         src/libsystemd/libsystemd.sym \
1929         src/systemd/sd-bus.h \
1930         src/systemd/sd-bus-protocol.h \
1931         src/systemd/sd-bus-vtable.h \
1932         src/systemd/sd-memfd.h \
1933         src/systemd/sd-utf8.h \
1934         src/systemd/sd-event.h \
1935         src/systemd/sd-rtnl.h \
1936         src/systemd/sd-resolve.h \
1937         src/systemd/sd-login.h \
1938         src/systemd/sd-id128.h \
1939         src/systemd/sd-daemon.h \
1940         src/libsystemd/sd-bus/sd-bus.c \
1941         src/libsystemd/sd-bus/bus-control.c \
1942         src/libsystemd/sd-bus/bus-control.h \
1943         src/libsystemd/sd-bus/bus-error.c \
1944         src/libsystemd/sd-bus/bus-error.h \
1945         src/libsystemd/sd-bus/bus-internal.c \
1946         src/libsystemd/sd-bus/bus-internal.h \
1947         src/libsystemd/sd-bus/bus-socket.c \
1948         src/libsystemd/sd-bus/bus-socket.h \
1949         src/libsystemd/sd-bus/bus-kernel.c \
1950         src/libsystemd/sd-bus/bus-kernel.h \
1951         src/libsystemd/sd-bus/bus-container.c \
1952         src/libsystemd/sd-bus/bus-container.h \
1953         src/libsystemd/sd-bus/bus-message.c \
1954         src/libsystemd/sd-bus/bus-message.h \
1955         src/libsystemd/sd-bus/bus-creds.c \
1956         src/libsystemd/sd-bus/bus-creds.h \
1957         src/libsystemd/sd-bus/bus-signature.c \
1958         src/libsystemd/sd-bus/bus-signature.h \
1959         src/libsystemd/sd-bus/bus-type.c \
1960         src/libsystemd/sd-bus/bus-type.h \
1961         src/libsystemd/sd-bus/bus-match.c \
1962         src/libsystemd/sd-bus/bus-match.h \
1963         src/libsystemd/sd-bus/bus-bloom.c \
1964         src/libsystemd/sd-bus/bus-bloom.h \
1965         src/libsystemd/sd-bus/bus-introspect.c \
1966         src/libsystemd/sd-bus/bus-introspect.h \
1967         src/libsystemd/sd-bus/bus-objects.c \
1968         src/libsystemd/sd-bus/bus-objects.h \
1969         src/libsystemd/sd-bus/bus-gvariant.c \
1970         src/libsystemd/sd-bus/bus-gvariant.h \
1971         src/libsystemd/sd-bus/bus-convenience.c \
1972         src/libsystemd/sd-bus/bus-util.c \
1973         src/libsystemd/sd-bus/bus-util.h \
1974         src/libsystemd/sd-bus/bus-protocol.h \
1975         src/libsystemd/sd-bus/kdbus.h \
1976         src/libsystemd/sd-bus/sd-memfd.c \
1977         src/libsystemd/sd-utf8/sd-utf8.c \
1978         src/libsystemd/sd-event/sd-event.c \
1979         src/libsystemd/sd-event/event-util.h \
1980         src/libsystemd/sd-rtnl/sd-rtnl.c \
1981         src/libsystemd/sd-rtnl/rtnl-internal.h \
1982         src/libsystemd/sd-rtnl/rtnl-message.c \
1983         src/libsystemd/sd-rtnl/rtnl-util.h \
1984         src/libsystemd/sd-rtnl/rtnl-util.c \
1985         src/libsystemd/sd-resolve/sd-resolve.c \
1986         src/libsystemd/sd-resolve/resolve-util.h \
1987         src/libsystemd/sd-id128/sd-id128.c \
1988         src/libsystemd/sd-daemon/sd-daemon.c \
1989         src/login/sd-login.c \
1990         src/login/login-shared.c \
1991         src/login/login-shared.h
1992
1993 nodist_libsystemd_la_SOURCES = \
1994         src/libsystemd/sd-bus/bus-error-mapping.c
1995
1996 libsystemd_la_LIBADD = \
1997         libsystemd-shared.la \
1998         $(RT_LIBS) \
1999         -lresolv
2000
2001 libsystemd_la_CFLAGS = \
2002         $(AM_CFLAGS) \
2003         -pthread
2004
2005 libsystemd_la_LDFLAGS = \
2006         $(AM_LDFLAGS) \
2007         -version-info $(LIBSYSTEMD_CURRENT):$(LIBSYSTEMD_REVISION):$(LIBSYSTEMD_AGE) \
2008         -Wl,--version-script=$(top_srcdir)/src/libsystemd/libsystemd.sym
2009
2010 pkgconfiglib_DATA += \
2011         src/libsystemd/libsystemd.pc
2012
2013 pkginclude_HEADERS += \
2014         src/systemd/sd-login.h \
2015         src/systemd/sd-id128.h \
2016         src/systemd/sd-daemon.h
2017
2018 if ENABLE_KDBUS
2019 pkginclude_HEADERS += \
2020         src/systemd/sd-bus.h \
2021         src/systemd/sd-bus-protocol.h \
2022         src/systemd/sd-bus-vtable.h \
2023         src/systemd/sd-memfd.h \
2024         src/systemd/sd-utf8.h \
2025         src/systemd/sd-event.h \
2026         src/systemd/sd-rtnl.h \
2027         src/systemd/sd-resolve.h
2028 endif
2029
2030 EXTRA_DIST += \
2031         src/libsystemd/sd-bus/bus-error-mapping.gperf \
2032         src/libsystemd/sd-bus/DIFFERENCES \
2033         src/libsystemd/sd-bus/GVARIANT-SERIALIZATION \
2034         src/libsystemd/libsystemd.pc.in
2035
2036 CLEANFILES += \
2037         src/libsystemd/sd-bus/bus-error-mapping.c
2038
2039 lib_LTLIBRARIES += \
2040         libsystemd.la
2041
2042 libsystemd_internal_la_SOURCES = \
2043         $(libsystemd_la_SOURCES)
2044
2045 nodist_libsystemd_internal_la_SOURCES = \
2046         $(nodist_libsystemd_la_SOURCES)
2047
2048 libsystemd_internal_la_CFLAGS = \
2049         $(libsystemd_la_CFLAGS)
2050
2051 noinst_LTLIBRARIES += \
2052         libsystemd-internal.la
2053
2054 libsystemd_dump_la_SOURCES = \
2055         src/libsystemd/sd-bus/bus-dump.c \
2056         src/libsystemd/sd-bus/bus-dump.h
2057
2058 libsystemd_dump_la_CFLAGS = \
2059         $(AM_CFLAGS) \
2060         $(CAP_CFLAGS)
2061
2062 noinst_LTLIBRARIES += \
2063         libsystemd-dump.la
2064
2065 tests += \
2066         test-bus-marshal \
2067         test-bus-signature \
2068         test-bus-chat \
2069         test-bus-cleanup \
2070         test-bus-server \
2071         test-bus-match \
2072         test-bus-kernel \
2073         test-bus-kernel-bloom \
2074         test-bus-kernel-benchmark \
2075         test-bus-memfd \
2076         test-bus-zero-copy \
2077         test-bus-introspect \
2078         test-bus-objects \
2079         test-bus-error \
2080         test-bus-creds \
2081         test-bus-gvariant \
2082         test-event \
2083         test-rtnl \
2084         test-resolve
2085
2086 bin_PROGRAMS += \
2087         busctl
2088
2089 test_bus_marshal_SOURCES = \
2090         src/libsystemd/sd-bus/test-bus-marshal.c
2091
2092 test_bus_marshal_LDADD = \
2093         libsystemd-internal.la \
2094         libsystemd-shared.la \
2095         libsystemd-dump.la \
2096         libsystemd-capability.la \
2097         $(GLIB_LIBS) \
2098         $(DBUS_LIBS) \
2099         $(CAP_LIBS)
2100
2101 test_bus_marshal_CFLAGS = \
2102         $(AM_CFLAGS) \
2103         $(GLIB_CFLAGS) \
2104         $(DBUS_CFLAGS) \
2105         $(CAP_CFLAGS)
2106
2107 test_bus_signature_SOURCES = \
2108         src/libsystemd/sd-bus/test-bus-signature.c
2109
2110 test_bus_signature_LDADD = \
2111         libsystemd-shared.la \
2112         libsystemd-internal.la
2113
2114 test_bus_chat_SOURCES = \
2115         src/libsystemd/sd-bus/test-bus-chat.c
2116
2117 test_bus_chat_CFLAGS = \
2118         $(AM_CFLAGS) \
2119         -pthread
2120
2121 test_bus_chat_LDADD = \
2122         libsystemd-internal.la \
2123         libsystemd-shared.la
2124
2125 test_bus_cleanup_SOURCES = \
2126         src/libsystemd/sd-bus/test-bus-cleanup.c
2127
2128 test_bus_cleanup_LDADD = \
2129         libsystemd-internal.la \
2130         libsystemd-shared.la
2131
2132 test_bus_server_SOURCES = \
2133         src/libsystemd/sd-bus/test-bus-server.c
2134
2135 test_bus_server_CFLAGS = \
2136         $(AM_CFLAGS) \
2137         -pthread
2138
2139 test_bus_server_LDADD = \
2140         libsystemd-internal.la \
2141         libsystemd-shared.la
2142
2143 test_bus_objects_SOURCES = \
2144         src/libsystemd/sd-bus/test-bus-objects.c
2145
2146 test_bus_objects_CFLAGS = \
2147         $(AM_CFLAGS) \
2148         $(CAP_CFLAGS) \
2149         -pthread
2150
2151 test_bus_objects_LDADD = \
2152         libsystemd-internal.la \
2153         libsystemd-shared.la \
2154         libsystemd-dump.la \
2155         libsystemd-capability.la \
2156         $(CAP_LIBS)
2157
2158 test_bus_error_SOURCES = \
2159         src/libsystemd/sd-bus/test-bus-error.c
2160
2161 test_bus_error_LDADD = \
2162         libsystemd-internal.la \
2163         libsystemd-shared.la
2164
2165 test_bus_gvariant_SOURCES = \
2166         src/libsystemd/sd-bus/test-bus-gvariant.c
2167
2168 test_bus_gvariant_LDADD = \
2169         libsystemd-internal.la \
2170         libsystemd-shared.la \
2171         libsystemd-dump.la \
2172         libsystemd-capability.la \
2173         $(GLIB_LIBS) \
2174         $(CAP_LIBS)
2175
2176 test_bus_gvariant_CFLAGS = \
2177         $(AM_CFLAGS) \
2178         $(GLIB_CFLAGS)
2179         $(CAP_CFLAGS)
2180
2181 test_bus_creds_SOURCES = \
2182         src/libsystemd/sd-bus/test-bus-creds.c
2183
2184 test_bus_creds_LDADD = \
2185         libsystemd-internal.la \
2186         libsystemd-shared.la \
2187         libsystemd-dump.la \
2188         libsystemd-capability.la
2189
2190 test_bus_match_SOURCES = \
2191         src/libsystemd/sd-bus/test-bus-match.c
2192
2193 test_bus_match_LDADD = \
2194         libsystemd-internal.la \
2195         libsystemd-shared.la
2196
2197 test_bus_kernel_SOURCES = \
2198         src/libsystemd/sd-bus/test-bus-kernel.c
2199
2200 test_bus_kernel_LDADD = \
2201         libsystemd-internal.la \
2202         libsystemd-shared.la \
2203         libsystemd-dump.la \
2204         libsystemd-capability.la \
2205         $(CAP_LIBS)
2206
2207 test_bus_kernel_CFLAGS = \
2208         $(AM_CFLAGS) \
2209         $(CAP_CFLAGS)
2210
2211 test_bus_kernel_bloom_SOURCES = \
2212         src/libsystemd/sd-bus/test-bus-kernel-bloom.c
2213
2214 test_bus_kernel_bloom_LDADD = \
2215         libsystemd-internal.la \
2216         libsystemd-shared.la
2217
2218 test_bus_kernel_benchmark_SOURCES = \
2219         src/libsystemd/sd-bus/test-bus-kernel-benchmark.c
2220
2221 test_bus_kernel_benchmark_LDADD = \
2222         libsystemd-internal.la \
2223         libsystemd-shared.la
2224
2225 test_bus_memfd_SOURCES = \
2226         src/libsystemd/sd-bus/test-bus-memfd.c
2227
2228 test_bus_memfd_LDADD = \
2229         libsystemd-internal.la \
2230         libsystemd-shared.la
2231
2232 test_bus_zero_copy_SOURCES = \
2233         src/libsystemd/sd-bus/test-bus-zero-copy.c
2234
2235 test_bus_zero_copy_LDADD = \
2236         libsystemd-internal.la \
2237         libsystemd-shared.la \
2238         libsystemd-dump.la \
2239         libsystemd-capability.la \
2240         $(CAP_LIBS)
2241
2242 test_bus_zero_copy_CFLAGS = \
2243         $(AM_CFLAGS) \
2244         $(CAP_CFLAGS)
2245
2246 test_bus_introspect_SOURCES = \
2247         src/libsystemd/sd-bus/test-bus-introspect.c
2248
2249 test_bus_introspect_LDADD = \
2250         libsystemd-shared.la \
2251         libsystemd-internal.la
2252
2253 test_event_SOURCES = \
2254         src/libsystemd/sd-event/test-event.c
2255
2256 test_event_LDADD = \
2257         libsystemd-internal.la \
2258         libsystemd-shared.la
2259
2260 test_rtnl_SOURCES = \
2261         src/libsystemd/sd-rtnl/test-rtnl.c
2262
2263 test_rtnl_LDADD = \
2264         libsystemd-internal.la \
2265         libsystemd-shared.la
2266
2267 test_resolve_SOURCES = \
2268         src/systemd/sd-resolve.h \
2269         src/libsystemd/sd-resolve/test-resolve.c
2270
2271 test_resolve_LDADD = \
2272         libsystemd-internal.la \
2273         libsystemd-shared.la \
2274         -lresolv
2275
2276 test_resolve_CFLAGS = \
2277         $(AM_CFLAGS) \
2278         -pthread
2279
2280 busctl_SOURCES = \
2281         src/libsystemd/sd-bus/busctl.c
2282
2283 busctl_LDADD = \
2284         libsystemd-internal.la \
2285         libsystemd-shared.la \
2286         libsystemd-dump.la \
2287         libsystemd-capability.la \
2288         $(CAP_LIBS)
2289
2290 busctl_CFLAGS = \
2291         $(AM_CFLAGS) \
2292         $(CAP_CFLAGS)
2293
2294 # ------------------------------------------------------------------------------
2295 noinst_LTLIBRARIES += \
2296         libsystemd-dhcp.la
2297
2298 libsystemd_dhcp_la_SOURCES = \
2299         src/systemd/sd-dhcp-client.h \
2300         src/libsystemd-dhcp/sd-dhcp-client.c \
2301         src/libsystemd-dhcp/dhcp-lease.h \
2302         src/libsystemd-dhcp/dhcp-lease.c \
2303         src/libsystemd-dhcp/dhcp-network.c \
2304         src/libsystemd-dhcp/dhcp-option.c \
2305         src/libsystemd-dhcp/dhcp-packet.c \
2306         src/libsystemd-dhcp/dhcp-internal.h \
2307         src/libsystemd-dhcp/dhcp-protocol.h
2308
2309 libsystemd_dhcp_la_LIBADD = \
2310         libsystemd-internal.la \
2311         libsystemd-shared.la
2312
2313 test_dhcp_option_SOURCES = \
2314         src/libsystemd-dhcp/dhcp-protocol.h \
2315         src/libsystemd-dhcp/dhcp-internal.h \
2316         src/libsystemd-dhcp/test-dhcp-option.c
2317
2318 test_dhcp_option_LDADD = \
2319         libsystemd-dhcp.la \
2320         libsystemd-internal.la \
2321         libsystemd-shared.la
2322
2323 test_dhcp_client_SOURCES = \
2324         src/systemd/sd-dhcp-client.h \
2325         src/libsystemd-dhcp/dhcp-protocol.h \
2326         src/libsystemd-dhcp/dhcp-internal.h \
2327         src/libsystemd-dhcp/test-dhcp-client.c
2328
2329 test_dhcp_client_LDADD = \
2330         libsystemd-dhcp.la \
2331         libsystemd-internal.la \
2332         libsystemd-shared.la
2333
2334 tests += \
2335         test-dhcp-option \
2336         test-dhcp-client
2337
2338 # ------------------------------------------------------------------------------
2339 if ENABLE_GTK_DOC
2340 SUBDIRS += \
2341         docs/libudev
2342
2343 noinst_DATA += \
2344         docs/html/libudev \
2345         docs/html/gudev
2346 endif
2347
2348 include_HEADERS += \
2349         src/libudev/libudev.h
2350
2351 lib_LTLIBRARIES += \
2352         libudev.la
2353
2354 libudev_la_SOURCES =\
2355         src/libudev/libudev.sym \
2356         src/libudev/libudev-private.h \
2357         src/libudev/libudev.c \
2358         src/libudev/libudev-list.c \
2359         src/libudev/libudev-util.c \
2360         src/libudev/libudev-device.c \
2361         src/libudev/libudev-enumerate.c \
2362         src/libudev/libudev-monitor.c \
2363         src/libudev/libudev-queue.c \
2364         src/libudev/libudev-hwdb-def.h \
2365         src/libudev/libudev-hwdb.c
2366
2367 libudev_la_CFLAGS = \
2368         $(AM_CFLAGS) \
2369         -fvisibility=hidden
2370
2371 libudev_la_LDFLAGS = \
2372         $(AM_LDFLAGS) \
2373         -version-info $(LIBUDEV_CURRENT):$(LIBUDEV_REVISION):$(LIBUDEV_AGE) \
2374         -Wl,--version-script=$(top_srcdir)/src/libudev/libudev.sym
2375
2376 libudev_la_LIBADD = \
2377         libsystemd-internal.la \
2378         libsystemd-shared.la
2379
2380 pkgconfiglib_DATA += \
2381         src/libudev/libudev.pc
2382
2383 EXTRA_DIST += \
2384         src/libudev/libudev.pc.in
2385
2386 CLEANFILES += \
2387         src/libudev/libudev.pc \
2388         docs/html/libudev \
2389         docs/html/gudev
2390
2391 docs/html/libudev:
2392         $(AM_V_at)$(MKDIR_P) $(dir $@)
2393         $(AM_V_LN)$(LN_S) -f ../libudev/html $@
2394
2395 docs/html/gudev:
2396         $(AM_V_at)$(MKDIR_P) $(dir $@)
2397         $(AM_V_LN)$(LN_S) -f ../gudev/html $@
2398
2399 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
2400 libudev-install-hook:
2401         libname=libudev.so && $(move-to-rootlibdir)
2402
2403 libudev-uninstall-hook:
2404         rm -f $(DESTDIR)$(rootlibdir)/libudev.so*
2405
2406 INSTALL_EXEC_HOOKS += libudev-install-hook
2407 UNINSTALL_EXEC_HOOKS += libudev-uninstall-hook
2408
2409 # ------------------------------------------------------------------------------
2410 noinst_LTLIBRARIES += \
2411         libudev-internal.la
2412
2413 libudev_internal_la_SOURCES =\
2414         $(libudev_la_SOURCES) \
2415         src/libudev/libudev-device-private.c \
2416         src/libudev/libudev-queue-private.c
2417
2418 libudev_internal_la_CFLAGS = \
2419         $(AM_CFLAGS) \
2420         -fvisibility=default
2421
2422 # ------------------------------------------------------------------------------
2423 INSTALL_DIRS += \
2424         $(sysconfdir)/udev/rules.d \
2425         $(sysconfdir)/udev/hwdb.d
2426
2427 dist_network_DATA = \
2428         network/99-default.link
2429
2430 dist_udevrules_DATA += \
2431         rules/99-systemd.rules \
2432         rules/42-usb-hid-pm.rules \
2433         rules/50-udev-default.rules \
2434         rules/60-drm.rules \
2435         rules/60-keyboard.rules \
2436         rules/60-persistent-storage-tape.rules \
2437         rules/60-persistent-serial.rules \
2438         rules/60-persistent-input.rules \
2439         rules/60-persistent-alsa.rules \
2440         rules/60-persistent-storage.rules \
2441         rules/64-btrfs.rules \
2442         rules/75-net-description.rules \
2443         rules/75-tty-description.rules \
2444         rules/78-sound-card.rules \
2445         rules/80-net-setup-link.rules \
2446         rules/95-udev-late.rules
2447
2448 dist_udevhwdb_DATA = \
2449         hwdb/20-pci-vendor-model.hwdb \
2450         hwdb/20-pci-classes.hwdb \
2451         hwdb/20-usb-vendor-model.hwdb \
2452         hwdb/20-usb-classes.hwdb \
2453         hwdb/20-sdio-vendor-model.hwdb \
2454         hwdb/20-sdio-classes.hwdb \
2455         hwdb/20-bluetooth-vendor-product.hwdb \
2456         hwdb/20-acpi-vendor.hwdb \
2457         hwdb/20-OUI.hwdb \
2458         hwdb/60-keyboard.hwdb
2459
2460 udevconfdir = $(sysconfdir)/udev
2461 dist_udevconf_DATA = \
2462         src/udev/udev.conf
2463
2464 sharepkgconfigdir = $(datadir)/pkgconfig
2465 sharepkgconfig_DATA = \
2466         src/udev/udev.pc
2467
2468 EXTRA_DIST += \
2469         rules/99-systemd.rules.in \
2470         src/udev/udev.pc.in
2471
2472 CLEANFILES += \
2473         rules/99-systemd.rules \
2474         src/udev/udev.pc
2475
2476 EXTRA_DIST += \
2477         units/systemd-udevd.service.in \
2478         units/systemd-udev-trigger.service.in \
2479         units/systemd-udev-settle.service.in
2480
2481 CLEANFILES += \
2482         units/systemd-udevd.service \
2483         units/systemd-udev-trigger.service \
2484         units/systemd-udev-settle.service
2485
2486 SOCKETS_TARGET_WANTS += \
2487         systemd-udevd-control.socket \
2488         systemd-udevd-kernel.socket
2489 SYSINIT_TARGET_WANTS += \
2490         systemd-udevd.service \
2491         systemd-udev-trigger.service
2492
2493 rootbin_PROGRAMS += \
2494         udevadm
2495
2496 rootlibexec_PROGRAMS += \
2497         systemd-udevd
2498
2499 noinst_LTLIBRARIES += \
2500         libudev-core.la
2501
2502 src/udev/keyboard-keys.txt:
2503         $(AM_V_at)$(MKDIR_P) $(dir $@)
2504         $(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/' > $@
2505
2506 src/udev/keyboard-keys-from-name.gperf: src/udev/keyboard-keys.txt
2507         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print tolower(substr($$1 ,5)) ", " $$1 }' < $< > $@
2508
2509 src/udev/keyboard-keys-from-name.h: src/udev/keyboard-keys-from-name.gperf
2510         $(AM_V_GPERF)$(GPERF) -L ANSI-C -t -N keyboard_lookup_key -H hash_key_name -p -C < $< > $@
2511
2512 src/udev/keyboard-keys-to-name.h: src/udev/keyboard-keys.txt
2513         $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char* const key_names[KEY_CNT] = { "} { print "[" $$1 "] = \"" $$1 "\"," } END{print "};"}' < $< > $@
2514
2515 libudev_core_la_SOURCES = \
2516         src/udev/udev.h \
2517         src/udev/udev-event.c \
2518         src/udev/udev-watch.c \
2519         src/udev/udev-node.c \
2520         src/udev/udev-rules.c \
2521         src/udev/udev-ctrl.c \
2522         src/udev/udev-builtin.c \
2523         src/udev/udev-builtin-btrfs.c \
2524         src/udev/udev-builtin-hwdb.c \
2525         src/udev/udev-builtin-input_id.c \
2526         src/udev/udev-builtin-keyboard.c \
2527         src/udev/udev-builtin-net_id.c \
2528         src/udev/udev-builtin-net_setup_link.c \
2529         src/udev/udev-builtin-path_id.c \
2530         src/udev/udev-builtin-usb_id.c \
2531         src/udev/net/link-config.h \
2532         src/udev/net/link-config.c \
2533         src/udev/net/ethtool-util.h \
2534         src/udev/net/ethtool-util.c
2535
2536 nodist_libudev_core_la_SOURCES = \
2537         src/udev/keyboard-keys-from-name.h \
2538         src/udev/keyboard-keys-to-name.h \
2539         src/udev/net/link-config-gperf.c
2540
2541 BUILT_SOURCES += \
2542         $(nodist_libudev_core_la_SOURCES)
2543
2544 CLEANFILES += \
2545         src/udev/keyboard-keys-from-name.gperf \
2546         src/udev/keyboard-keys.txt \
2547         src/udev/net/link-config-gperf.c
2548
2549 EXTRA_DIST += \
2550         src/udev/net/link-config-gperf.gperf
2551
2552 libudev_core_la_CFLAGS = \
2553         $(AM_CFLAGS) \
2554         $(BLKID_CFLAGS) \
2555         $(KMOD_CFLAGS)
2556
2557 libudev_core_la_LIBADD = \
2558         libudev-internal.la \
2559         libsystemd-label.la \
2560         libsystemd-internal.la \
2561         libsystemd-shared.la \
2562         $(BLKID_LIBS) \
2563         $(KMOD_LIBS)
2564
2565 libudev_core_la_CPPFLAGS = \
2566         $(AM_CPPFLAGS) \
2567         -DFIRMWARE_PATH="$(FIRMWARE_PATH)"
2568
2569 if ENABLE_FIRMWARE
2570 libudev_core_la_SOURCES += \
2571         src/udev/udev-builtin-firmware.c
2572
2573 dist_udevrules_DATA += \
2574         rules/50-firmware.rules
2575 endif
2576
2577 if HAVE_KMOD
2578 libudev_core_la_SOURCES += \
2579         src/udev/udev-builtin-kmod.c
2580
2581 dist_udevrules_DATA += \
2582         rules/80-drivers.rules
2583 endif
2584
2585 if HAVE_BLKID
2586 libudev_core_la_SOURCES += \
2587         src/udev/udev-builtin-blkid.c
2588 endif
2589
2590 if HAVE_ACL
2591 libudev_core_la_SOURCES += \
2592         src/udev/udev-builtin-uaccess.c \
2593         src/login/logind-acl.c \
2594         src/login/sd-login.c \
2595         src/systemd/sd-login.h \
2596         src/login/login-shared.c \
2597         src/login/login-shared.h
2598
2599 libudev_core_la_LIBADD += \
2600         libsystemd-acl.la
2601 endif
2602
2603 systemd_udevd_SOURCES = \
2604         src/udev/udevd.c
2605
2606 systemd_udevd_LDADD = \
2607         libudev-core.la
2608
2609 udevadm_SOURCES = \
2610         src/udev/udevadm.c \
2611         src/udev/udevadm-info.c \
2612         src/udev/udevadm-control.c \
2613         src/udev/udevadm-monitor.c \
2614         src/udev/udevadm-hwdb.c \
2615         src/udev/udevadm-settle.c \
2616         src/udev/udevadm-trigger.c \
2617         src/udev/udevadm-test.c \
2618         src/udev/udevadm-test-builtin.c
2619
2620 udevadm_LDADD = \
2621         libudev-core.la
2622
2623 # Update hwdb on installation. Do not bother if installing
2624 # in DESTDIR, since this is likely for packaging purposes.
2625 hwdb-update-hook:
2626         -test -n "$(DESTDIR)" || $(rootbindir)/udevadm hwdb --update
2627
2628 INSTALL_DATA_HOOKS += \
2629         hwdb-update-hook
2630
2631 hwdb-remove-hook:
2632         -test -n "$(DESTDIR)" || rm -f /etc/udev/hwdb.bin
2633
2634 # ------------------------------------------------------------------------------
2635 TESTS += \
2636         test/udev-test.pl \
2637         test/rules-test.sh
2638
2639 manual_tests += \
2640         test-libudev \
2641         test-udev
2642
2643 test_libudev_SOURCES = \
2644         src/test/test-libudev.c
2645
2646 test_libudev_LDADD = \
2647         libsystemd-label.la \
2648         libudev-internal.la \
2649         libsystemd-shared.la
2650
2651 test_udev_SOURCES = \
2652         src/test/test-udev.c
2653
2654 test_udev_LDADD = \
2655         libudev-core.la \
2656         $(BLKID_LIBS) \
2657         $(KMOD_LIBS) \
2658         $(SELINUX_LIBS)
2659
2660 if HAVE_ACL
2661 test_udev_LDADD += \
2662         libsystemd-acl.la
2663 endif
2664
2665 check_DATA += \
2666         test/sys
2667
2668 # packed sysfs test tree
2669 test/sys:
2670         $(AM_V_at)$(MKDIR_P) $(dir $@)
2671         $(AM_V_GEN)tar -C test/ -xJf $(top_srcdir)/test/sys.tar.xz
2672
2673 test-sys-distclean:
2674         -rm -rf test/sys
2675 DISTCLEAN_LOCAL_HOOKS += test-sys-distclean
2676
2677 EXTRA_DIST += \
2678         test/sys.tar.xz \
2679         test/udev-test.pl \
2680         test/rules-test.sh \
2681         test/rule-syntax-check.py
2682
2683 # ------------------------------------------------------------------------------
2684 ata_id_SOURCES = \
2685         src/udev/ata_id/ata_id.c
2686
2687 ata_id_LDADD = \
2688         libudev-internal.la \
2689         libsystemd-shared.la
2690
2691 udevlibexec_PROGRAMS += \
2692         ata_id
2693
2694 # ------------------------------------------------------------------------------
2695 cdrom_id_SOURCES = \
2696         src/udev/cdrom_id/cdrom_id.c
2697
2698 cdrom_id_LDADD = \
2699         libudev-internal.la \
2700         libsystemd-shared.la
2701
2702 udevlibexec_PROGRAMS += \
2703         cdrom_id
2704
2705 dist_udevrules_DATA += \
2706         rules/60-cdrom_id.rules
2707
2708 # ------------------------------------------------------------------------------
2709 collect_SOURCES = \
2710         src/udev/collect/collect.c
2711
2712 collect_LDADD = \
2713         libudev-internal.la \
2714         libsystemd-shared.la
2715
2716 udevlibexec_PROGRAMS += \
2717         collect
2718
2719 # ------------------------------------------------------------------------------
2720 scsi_id_SOURCES =\
2721         src/udev/scsi_id/scsi_id.c \
2722         src/udev/scsi_id/scsi_serial.c \
2723         src/udev/scsi_id/scsi.h \
2724         src/udev/scsi_id/scsi_id.h
2725
2726 scsi_id_LDADD = \
2727         libudev-internal.la \
2728         libsystemd-shared.la
2729
2730 udevlibexec_PROGRAMS += \
2731         scsi_id
2732
2733 EXTRA_DIST += \
2734         src/udev/scsi_id/README
2735
2736 # ------------------------------------------------------------------------------
2737 v4l_id_SOURCES = \
2738         src/udev/v4l_id/v4l_id.c
2739
2740 v4l_id_LDADD = \
2741         libudev-internal.la
2742
2743 udevlibexec_PROGRAMS += \
2744         v4l_id
2745
2746 dist_udevrules_DATA += \
2747         rules/60-persistent-v4l.rules
2748
2749 # ------------------------------------------------------------------------------
2750 accelerometer_SOURCES = \
2751         src/udev/accelerometer/accelerometer.c
2752
2753 accelerometer_LDADD = \
2754         libudev-internal.la -lm \
2755         libsystemd-shared.la
2756
2757 udevlibexec_PROGRAMS += \
2758         accelerometer
2759
2760 dist_udevrules_DATA += \
2761         rules/61-accelerometer.rules
2762
2763 # ------------------------------------------------------------------------------
2764 if ENABLE_GUDEV
2765 if ENABLE_GTK_DOC
2766 SUBDIRS += \
2767         docs/gudev
2768 endif
2769
2770 libgudev_includedir = \
2771         $(includedir)/gudev-1.0/gudev
2772
2773 libgudev_include_HEADERS = \
2774         src/gudev/gudev.h \
2775         src/gudev/gudevenums.h \
2776         src/gudev/gudevenumtypes.h \
2777         src/gudev/gudevtypes.h \
2778         src/gudev/gudevclient.h \
2779         src/gudev/gudevdevice.h \
2780         src/gudev/gudevenumerator.h
2781
2782 lib_LTLIBRARIES += libgudev-1.0.la
2783
2784 pkgconfiglib_DATA += \
2785         src/gudev/gudev-1.0.pc
2786
2787 CLEANFILES += \
2788         src/gudev/gudev-1.0.pc
2789
2790 libgudev_1_0_la_SOURCES = \
2791         src/gudev/gudevenums.h \
2792         src/gudev/gudevenumtypes.h \
2793         src/gudev/gudevenumtypes.h\
2794         src/gudev/gudevtypes.h \
2795         src/gudev/gudevclient.h \
2796         src/gudev/gudevclient.c \
2797         src/gudev/gudevdevice.h \
2798         src/gudev/gudevdevice.c \
2799         src/gudev/gudevenumerator.h \
2800         src/gudev/gudevenumerator.c \
2801         src/gudev/gudevprivate.h
2802
2803 nodist_libgudev_1_0_la_SOURCES = \
2804         src/gudev/gudevmarshal.h \
2805         src/gudev/gudevmarshal.c \
2806         src/gudev/gudevenumtypes.h \
2807         src/gudev/gudevenumtypes.c
2808
2809 BUILT_SOURCES += \
2810         $(nodist_libgudev_1_0_la_SOURCES)
2811
2812 libgudev_1_0_la_CPPFLAGS = \
2813         $(AM_CPPFLAGS) \
2814         -I$(top_builddir)/src\
2815         -I$(top_srcdir)/src\
2816         -I$(top_builddir)/src/gudev \
2817         -I$(top_srcdir)/src/gudev \
2818         -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT \
2819         -D_GUDEV_COMPILATION \
2820         -DG_LOG_DOMAIN=\"GUdev\"
2821
2822 libgudev_1_0_la_CFLAGS = \
2823         $(AM_CFLAGS) \
2824         -fvisibility=default \
2825         $(GLIB_CFLAGS)
2826
2827 libgudev_1_0_la_LIBADD = \
2828         libudev.la \
2829         $(GLIB_LIBS)
2830
2831 libgudev_1_0_la_LDFLAGS = \
2832         $(AM_LDFLAGS) \
2833         -version-info $(LIBGUDEV_CURRENT):$(LIBGUDEV_REVISION):$(LIBGUDEV_AGE) \
2834         -export-dynamic -no-undefined \
2835         -export-symbols-regex '^g_udev_.*'
2836
2837 src/gudev/gudevmarshal.h: src/gudev/gudevmarshal.list
2838         $(AM_V_at)$(MKDIR_P) $(dir $@)
2839         $(AM_V_GEN)glib-genmarshal $< --prefix=g_udev_marshal --header > $@
2840
2841 src/gudev/gudevmarshal.c: src/gudev/gudevmarshal.list
2842         $(AM_V_at)$(MKDIR_P) $(dir $@)
2843         $(AM_V_GEN)echo '#include "gudevmarshal.h"' > $@ && \
2844         glib-genmarshal $< --prefix=g_udev_marshal --body >> $@
2845
2846 src/gudev/gudevenumtypes.%: src/gudev/gudevenumtypes.%.template src/gudev/gudevenums.h
2847         $(AM_V_at)$(MKDIR_P) $(dir $@)
2848         $(AM_V_GEN)glib-mkenums --template $^ > $@
2849
2850 if HAVE_INTROSPECTION
2851 -include $(INTROSPECTION_MAKEFILE)
2852
2853 src/gudev/GUdev-1.0.gir: libgudev-1.0.la
2854
2855 src_gudev_GUdev_1_0_gir_INCLUDES = GObject-2.0
2856
2857 src_gudev_GUdev_1_0_gir_CFLAGS = \
2858         $(AM_CFLAGS) \
2859         $(INCLUDES) \
2860         -D_GUDEV_COMPILATION \
2861         -D_GUDEV_WORK_AROUND_DEV_T_BUG \
2862         -I$(top_srcdir)/src \
2863         -I$(top_builddir)/src \
2864         -I$(top_srcdir)/src/gudev \
2865         -I$(top_builddir)/src/gudev
2866
2867 src_gudev_GUdev_1_0_gir_LIBS = libgudev-1.0.la
2868
2869 src_gudev_GUdev_1_0_gir_SCANNERFLAGS = \
2870         --pkg-export=gudev-1.0 \
2871         --warn-all
2872
2873 src_gudev_GUdev_1_0_gir_FILES = \
2874         src/gudev/gudev.h \
2875         src/gudev/gudevtypes.h \
2876         src/gudev/gudevenums.h \
2877         src/gudev/gudevenumtypes.h \
2878         src/gudev/gudevclient.h \
2879         src/gudev/gudevdevice.h \
2880         src/gudev/gudevenumerator.h \
2881         src/gudev/gudevclient.c \
2882         src/gudev/gudevdevice.c \
2883         src/gudev/gudevenumerator.c
2884
2885 INTROSPECTION_GIRS = src/gudev/GUdev-1.0.gir
2886 INTROSPECTION_SCANNER_ARGS = --c-include=gudev/gudev.h
2887
2888 girdir = $(datadir)/gir-1.0
2889 gir_DATA = \
2890         src/gudev/GUdev-1.0.gir
2891
2892 typelibsdir = $(libdir)/girepository-1.0
2893 typelibs_DATA = \
2894         src/gudev/GUdev-1.0.typelib
2895
2896 CLEANFILES += $(gir_DATA) $(typelibs_DATA)
2897 endif # HAVE_INTROSPECTION
2898
2899 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
2900 libgudev-install-hook:
2901         libname=libgudev-1.0.so && $(move-to-rootlibdir)
2902
2903 libgudev-uninstall-hook:
2904         rm -f $(DESTDIR)$(rootlibdir)/libgudev-1.0.so*
2905
2906 INSTALL_EXEC_HOOKS += libgudev-install-hook
2907 UNINSTALL_EXEC_HOOKS += libgudev-uninstall-hook
2908 endif
2909
2910 EXTRA_DIST += \
2911         src/gudev/gudev-1.0.pc.in \
2912         src/gudev/gudevmarshal.list \
2913         src/gudev/gudevenumtypes.h.template \
2914         src/gudev/gudevenumtypes.c.template \
2915         src/gudev/gjs-example.js \
2916         src/gudev/seed-example-enum.js \
2917         src/gudev/seed-example.js
2918
2919 # ------------------------------------------------------------------------------
2920 mtd_probe_SOURCES =  \
2921         src/udev/mtd_probe/mtd_probe.c \
2922         src/udev/mtd_probe/mtd_probe.h \
2923         src/udev/mtd_probe/probe_smartmedia.c
2924
2925 dist_udevrules_DATA += \
2926         rules/75-probe_mtd.rules
2927
2928 udevlibexec_PROGRAMS += \
2929         mtd_probe
2930
2931 # ------------------------------------------------------------------------------
2932 test_id128_SOURCES = \
2933         src/test/test-id128.c
2934
2935 test_id128_LDADD = \
2936         libsystemd-internal.la \
2937         libsystemd-shared.la
2938
2939 tests += \
2940         test-id128
2941
2942 # ------------------------------------------------------------------------------
2943
2944 rootlibexec_PROGRAMS += \
2945         systemd-activate
2946
2947 systemd_activate_SOURCES = \
2948         src/activate/activate.c
2949
2950 systemd_activate_LDADD = \
2951         libsystemd-label.la \
2952         libsystemd-internal.la \
2953         libsystemd-shared.la
2954
2955 # ------------------------------------------------------------------------------
2956 systemd_journald_SOURCES = \
2957         src/journal/journald.c \
2958         src/journal/journald-server.h
2959
2960 systemd_journald_LDADD = \
2961         libsystemd-journal-core.la \
2962         libsystemd-internal.la \
2963         libsystemd-shared.la
2964
2965 systemd_cat_SOURCES = \
2966         src/journal/cat.c
2967
2968 systemd_cat_LDADD = \
2969         libsystemd-journal-core.la
2970
2971 # using _CFLAGS = in the conditional below would suppress AM_CFLAGS
2972 journalctl_CFLAGS = \
2973         $(AM_CFLAGS)
2974
2975 journalctl_SOURCES = \
2976         src/journal/journalctl.c
2977
2978 journalctl_LDADD = \
2979         libsystemd-journal-internal.la \
2980         libsystemd-internal.la \
2981         libsystemd-logs.la \
2982         libsystemd-shared.la
2983
2984 if HAVE_ACL
2985 journalctl_LDADD += \
2986         libsystemd-acl.la
2987 endif
2988
2989 if HAVE_QRENCODE
2990 journalctl_SOURCES += \
2991         src/journal/journal-qrcode.c \
2992         src/journal/journal-qrcode.h
2993
2994 journalctl_CFLAGS += \
2995         $(QRENCODE_CFLAGS)
2996
2997 journalctl_LDADD += \
2998         $(QRENCODE_LIBS)
2999 endif
3000
3001 test_journal_SOURCES = \
3002         src/journal/test-journal.c
3003
3004 test_journal_LDADD = \
3005         libsystemd-journal-core.la
3006
3007 test_journal_send_SOURCES = \
3008         src/journal/test-journal-send.c
3009
3010 test_journal_send_LDADD = \
3011         libsystemd-journal-core.la
3012
3013 test_journal_syslog_SOURCES = \
3014         src/journal/test-journal-syslog.c
3015
3016 test_journal_syslog_LDADD = \
3017         libsystemd-journal-core.la
3018
3019 test_journal_match_SOURCES = \
3020         src/journal/test-journal-match.c
3021
3022 test_journal_match_LDADD = \
3023         libsystemd-journal-core.la
3024
3025 test_journal_enum_SOURCES = \
3026         src/journal/test-journal-enum.c
3027
3028 test_journal_enum_LDADD = \
3029         libsystemd-journal-core.la
3030
3031 test_journal_stream_SOURCES = \
3032         src/journal/test-journal-stream.c
3033
3034 test_journal_stream_LDADD = \
3035         libsystemd-journal-core.la
3036
3037 test_journal_flush_SOURCES = \
3038         src/journal/test-journal-flush.c
3039
3040 test_journal_flush_LDADD = \
3041         libsystemd-journal-core.la
3042
3043 test_journal_init_SOURCES = \
3044         src/journal/test-journal-init.c
3045
3046 test_journal_init_LDADD = \
3047         libsystemd-journal-core.la
3048
3049 test_journal_verify_SOURCES = \
3050         src/journal/test-journal-verify.c
3051
3052 test_journal_verify_LDADD = \
3053         libsystemd-journal-core.la
3054
3055 test_journal_interleaving_SOURCES = \
3056         src/journal/test-journal-interleaving.c
3057
3058 test_journal_interleaving_LDADD = \
3059         libsystemd-journal-core.la
3060
3061 test_mmap_cache_SOURCES = \
3062         src/journal/test-mmap-cache.c
3063
3064 test_mmap_cache_LDADD = \
3065         libsystemd-journal-core.la
3066
3067 test_catalog_SOURCES = \
3068         src/journal/test-catalog.c
3069
3070 test_catalog_CPPFLAGS = \
3071         $(AM_CPPFLAGS) \
3072         -DCATALOG_DIR=\"$(abs_top_srcdir)/catalog\"
3073
3074 test_catalog_LDADD = \
3075         libsystemd-journal-core.la
3076
3077 libsystemd_journal_la_SOURCES = \
3078         src/journal/libsystemd-journal.sym \
3079         src/journal/sd-journal.c \
3080         src/systemd/sd-journal.h \
3081         src/systemd/_sd-common.h \
3082         src/journal/journal-file.c \
3083         src/journal/journal-file.h \
3084         src/journal/journal-vacuum.c \
3085         src/journal/journal-vacuum.h \
3086         src/journal/journal-verify.c \
3087         src/journal/journal-verify.h \
3088         src/journal/lookup3.c \
3089         src/journal/lookup3.h \
3090         src/journal/journal-send.c \
3091         src/journal/journal-def.h \
3092         src/journal/compress.h \
3093         src/journal/catalog.c \
3094         src/journal/catalog.h \
3095         src/journal/mmap-cache.c \
3096         src/journal/mmap-cache.h
3097
3098 libsystemd_journal_la_CFLAGS = \
3099         $(AM_CFLAGS) \
3100         -fvisibility=hidden
3101
3102 libsystemd_journal_la_LDFLAGS = \
3103         $(AM_LDFLAGS) \
3104         -version-info $(LIBSYSTEMD_JOURNAL_CURRENT):$(LIBSYSTEMD_JOURNAL_REVISION):$(LIBSYSTEMD_JOURNAL_AGE) \
3105         -Wl,--version-script=$(top_srcdir)/src/journal/libsystemd-journal.sym
3106
3107 libsystemd_journal_la_LIBADD = \
3108         libsystemd-label.la \
3109         libsystemd-internal.la \
3110         libsystemd-shared.la
3111
3112 libsystemd_journal_internal_la_SOURCES = \
3113         $(libsystemd_journal_la_SOURCES)
3114
3115 # using _CFLAGS = in the conditional below would suppress AM_CFLAGS
3116 libsystemd_journal_internal_la_CFLAGS = \
3117         $(AM_CFLAGS)
3118
3119 libsystemd_journal_internal_la_LIBADD =
3120
3121 if HAVE_XZ
3122 libsystemd_journal_la_SOURCES += \
3123         src/journal/compress.c
3124
3125 libsystemd_journal_la_CFLAGS += \
3126         $(XZ_CFLAGS)
3127
3128 libsystemd_journal_la_LIBADD += \
3129         $(XZ_LIBS)
3130
3131 libsystemd_journal_internal_la_CFLAGS += \
3132         $(XZ_CFLAGS)
3133
3134 libsystemd_journal_internal_la_LIBADD += \
3135         $(XZ_LIBS)
3136 endif
3137
3138 libsystemd_journal_core_la_SOURCES = \
3139         src/journal/journald-kmsg.c \
3140         src/journal/journald-kmsg.h \
3141         src/journal/journald-syslog.c \
3142         src/journal/journald-syslog.h \
3143         src/journal/journald-stream.c \
3144         src/journal/journald-stream.h \
3145         src/journal/journald-server.c \
3146         src/journal/journald-server.h \
3147         src/journal/journald-console.c \
3148         src/journal/journald-console.h \
3149         src/journal/journald-native.c \
3150         src/journal/journald-native.h \
3151         src/journal/journald-rate-limit.c \
3152         src/journal/journald-rate-limit.h \
3153         src/journal/journal-internal.h
3154
3155 nodist_libsystemd_journal_core_la_SOURCES = \
3156         src/journal/journald-gperf.c
3157
3158 libsystemd_journal_core_la_LIBADD = \
3159         libsystemd-journal-internal.la \
3160         libudev-internal.la \
3161         libsystemd-capability.la \
3162         libsystemd-label.la \
3163         libsystemd-internal.la \
3164         libsystemd-shared.la
3165
3166 if HAVE_ACL
3167 libsystemd_journal_core_la_LIBADD += \
3168         libsystemd-acl.la
3169 endif
3170
3171 noinst_LTLIBRARIES += \
3172         libsystemd-journal-core.la
3173
3174 if HAVE_GCRYPT
3175 libsystemd_journal_la_SOURCES += \
3176         src/journal/journal-authenticate.c \
3177         src/journal/journal-authenticate.h \
3178         src/journal/fsprg.c \
3179         src/journal/fsprg.h
3180
3181 libsystemd_journal_la_CFLAGS += \
3182         $(GCRYPT_CFLAGS) \
3183         -Wno-pointer-arith
3184
3185 libsystemd_journal_la_LIBADD += \
3186         $(GCRYPT_LIBS)
3187
3188 libsystemd_journal_internal_la_CFLAGS += \
3189         $(GCRYPT_CFLAGS) \
3190         -Wno-pointer-arith
3191
3192 libsystemd_journal_internal_la_LIBADD += \
3193         $(GCRYPT_LIBS)
3194 endif
3195
3196 # move lib from $(libdir) to $(rootlibdir) and update devel link, if
3197 # needed. Also, grant read access to new journal files to members of
3198 # "adm" and "wheel".
3199 libsystemd-journal-install-hook:
3200         libname=libsystemd-journal.so && $(move-to-rootlibdir)
3201         -$(MKDIR_P) $(DESTDIR)/var/log/journal
3202         -chown 0:0 $(DESTDIR)/var/log/journal
3203         -chmod 755 $(DESTDIR)/var/log/journal
3204         -setfacl -nm g:adm:rx,d:g:adm:rx $(DESTDIR)/var/log/journal/
3205         -setfacl -nm g:wheel:rx,d:g:wheel:rx $(DESTDIR)/var/log/journal/
3206
3207 libsystemd-journal-uninstall-hook:
3208         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-journal.so*
3209
3210 INSTALL_EXEC_HOOKS += libsystemd-journal-install-hook
3211 UNINSTALL_EXEC_HOOKS += libsystemd-journal-uninstall-hook
3212
3213 # ------------------------------------------------------------------------------
3214
3215 # Update catalog on installation. Do not bother if installing
3216 # in DESTDIR, since this is likely for packaging purposes.
3217 catalog-update-hook:
3218         -test -n "$(DESTDIR)" || $(rootbindir)/journalctl --update-catalog
3219
3220 INSTALL_DATA_HOOKS += \
3221         catalog-update-hook
3222
3223 catalog-remove-hook:
3224         -test -n "$(DESTDIR)" || rm -f $(catalogstatedir)/database
3225
3226 UNINSTALL_DATA_HOOKS += \
3227         catalog-remove-hook
3228
3229 manual_tests += \
3230         test-journal-enum
3231
3232 tests += \
3233         test-journal \
3234         test-journal-send \
3235         test-journal-syslog \
3236         test-journal-match \
3237         test-journal-stream \
3238         test-journal-init \
3239         test-journal-verify \
3240         test-journal-interleaving \
3241         test-journal-flush \
3242         test-mmap-cache \
3243         test-catalog
3244
3245 pkginclude_HEADERS += \
3246         src/systemd/sd-journal.h \
3247         src/systemd/sd-messages.h \
3248         src/systemd/_sd-common.h
3249
3250 lib_LTLIBRARIES += \
3251         libsystemd-journal.la
3252
3253 noinst_LTLIBRARIES += \
3254         libsystemd-journal-internal.la
3255
3256 rootlibexec_PROGRAMS += \
3257         systemd-journald
3258
3259 rootbin_PROGRAMS += \
3260         journalctl
3261
3262 bin_PROGRAMS += \
3263         systemd-cat
3264
3265 dist_systemunit_DATA += \
3266         units/systemd-journald.socket
3267
3268 nodist_systemunit_DATA += \
3269         units/systemd-journald.service \
3270         units/systemd-journal-flush.service
3271
3272 dist_pkgsysconf_DATA += \
3273         src/journal/journald.conf
3274
3275 pkgconfiglib_DATA += \
3276         src/journal/libsystemd-journal.pc
3277
3278 dist_catalog_DATA = \
3279         catalog/systemd.fr.catalog \
3280         catalog/systemd.ru.catalog \
3281         catalog/systemd.it.catalog \
3282         catalog/systemd.catalog
3283
3284 SOCKETS_TARGET_WANTS += \
3285         systemd-journald.socket
3286 SYSINIT_TARGET_WANTS += \
3287         systemd-journald.service \
3288         systemd-journal-flush.service
3289
3290 EXTRA_DIST += \
3291         src/journal/libsystemd-journal.pc.in \
3292         units/systemd-journald.service.in \
3293         units/systemd-journal-flush.service.in \
3294         src/journal/journald-gperf.gperf
3295
3296 CLEANFILES += \
3297         src/journal/journald-gperf.c
3298
3299 # ------------------------------------------------------------------------------
3300 if HAVE_MICROHTTPD
3301 gatewayddocumentrootdir=$(pkgdatadir)/gatewayd
3302
3303 rootlibexec_PROGRAMS += \
3304         systemd-journal-gatewayd
3305
3306 systemd_journal_gatewayd_SOURCES = \
3307         src/journal/journal-gatewayd.c \
3308         src/journal/microhttpd-util.h \
3309         src/journal/microhttpd-util.c
3310
3311 systemd_journal_gatewayd_LDADD = \
3312         libsystemd-logs.la \
3313         libsystemd-journal-internal.la \
3314         libsystemd-internal.la \
3315         libsystemd-shared.la \
3316         $(MICROHTTPD_LIBS)
3317
3318 systemd_journal_gatewayd_CFLAGS = \
3319         $(AM_CFLAGS) \
3320         $(MICROHTTPD_CFLAGS)
3321
3322 systemd_journal_gatewayd_CPPFLAGS = \
3323         $(AM_CPPFLAGS) \
3324         -DDOCUMENT_ROOT=\"$(gatewayddocumentrootdir)\"
3325
3326 dist_systemunit_DATA += \
3327         units/systemd-journal-gatewayd.socket
3328
3329 nodist_systemunit_DATA += \
3330         units/systemd-journal-gatewayd.service
3331
3332 dist_gatewayddocumentroot_DATA = \
3333         src/journal/browse.html
3334
3335 endif
3336
3337 EXTRA_DIST += \
3338         units/systemd-journal-gatewayd.service.in
3339
3340 # ------------------------------------------------------------------------------
3341
3342 systemd_socket_proxyd_SOURCES = \
3343         src/socket-proxy/socket-proxyd.c
3344
3345 systemd_socket_proxyd_LDADD = \
3346         libsystemd-logs.la \
3347         libsystemd-internal.la \
3348         libsystemd-journal-internal.la \
3349         libsystemd-shared.la
3350
3351 # ------------------------------------------------------------------------------
3352 if ENABLE_COREDUMP
3353 systemd_coredump_SOURCES = \
3354         src/journal/coredump.c
3355
3356 systemd_coredump_LDADD = \
3357         libsystemd-journal-internal.la \
3358         libsystemd-label.la \
3359         libsystemd-shared.la \
3360         libsystemd-internal.la
3361
3362 rootlibexec_PROGRAMS += \
3363         systemd-coredump
3364
3365 systemd_coredumpctl_SOURCES = \
3366         src/journal/coredumpctl.c
3367
3368 systemd_coredumpctl_LDADD = \
3369         libsystemd-journal-internal.la \
3370         libsystemd-internal.la \
3371         libsystemd-shared.la
3372
3373 bin_PROGRAMS += \
3374         systemd-coredumpctl
3375
3376 dist_bashcompletion_DATA += \
3377         shell-completion/bash/systemd-coredumpctl
3378
3379 dist_zshcompletion_DATA += \
3380         shell-completion/zsh/_systemd-coredumpctl
3381
3382 sysctl_DATA = \
3383         sysctl.d/50-coredump.conf
3384
3385 CLEANFILES += \
3386         sysctl.d/50-coredump.conf
3387 endif
3388
3389 EXTRA_DIST += \
3390         sysctl.d/50-coredump.conf.in
3391
3392 # ------------------------------------------------------------------------------
3393 if ENABLE_BINFMT
3394 systemd_binfmt_SOURCES = \
3395         src/binfmt/binfmt.c
3396
3397 systemd_binfmt_LDADD = \
3398         libsystemd-shared.la
3399
3400 rootlibexec_PROGRAMS += \
3401         systemd-binfmt
3402
3403 dist_systemunit_DATA += \
3404         units/proc-sys-fs-binfmt_misc.automount \
3405         units/proc-sys-fs-binfmt_misc.mount
3406
3407 nodist_systemunit_DATA += \
3408         units/systemd-binfmt.service
3409
3410 INSTALL_DIRS += \
3411         $(prefix)/lib/binfmt.d \
3412         $(sysconfdir)/binfmt.d
3413
3414 SYSINIT_TARGET_WANTS += \
3415         systemd-binfmt.service \
3416         proc-sys-fs-binfmt_misc.automount
3417
3418 endif
3419
3420 EXTRA_DIST += \
3421         units/systemd-binfmt.service.in
3422
3423 # ------------------------------------------------------------------------------
3424 if ENABLE_VCONSOLE
3425 systemd_vconsole_setup_SOURCES = \
3426         src/vconsole/vconsole-setup.c
3427
3428 systemd_vconsole_setup_LDADD = \
3429         libsystemd-shared.la
3430
3431 rootlibexec_PROGRAMS += \
3432         systemd-vconsole-setup
3433
3434 nodist_systemunit_DATA += \
3435         units/systemd-vconsole-setup.service
3436
3437 SYSINIT_TARGET_WANTS += \
3438         systemd-vconsole-setup.service
3439 endif
3440
3441 EXTRA_DIST += \
3442         units/systemd-vconsole-setup.service.in
3443
3444 # ------------------------------------------------------------------------------
3445 if ENABLE_READAHEAD
3446 systemd_readahead_SOURCES = \
3447         src/readahead/readahead.c \
3448         src/readahead/readahead-collect.c \
3449         src/readahead/readahead-replay.c \
3450         src/readahead/readahead-analyze.c \
3451         src/readahead/readahead-common.c \
3452         src/readahead/readahead-common.h
3453
3454 systemd_readahead_LDADD = \
3455         libsystemd-internal.la \
3456         libudev-internal.la \
3457         libsystemd-shared.la
3458
3459 dist_doc_DATA += \
3460         src/readahead/sd-readahead.c \
3461         src/systemd/sd-readahead.h
3462
3463 rootlibexec_PROGRAMS += \
3464         systemd-readahead
3465
3466 dist_systemunit_DATA += \
3467         units/systemd-readahead-drop.service \
3468         units/systemd-readahead-done.timer
3469
3470 nodist_systemunit_DATA += \
3471         units/systemd-readahead-collect.service \
3472         units/systemd-readahead-replay.service \
3473         units/systemd-readahead-done.service
3474
3475 endif
3476
3477 EXTRA_DIST += \
3478         units/systemd-readahead-collect.service.in \
3479         units/systemd-readahead-replay.service.in \
3480         units/systemd-readahead-done.service.in
3481
3482 # ------------------------------------------------------------------------------
3483 if ENABLE_BOOTCHART
3484 systemd_bootchart_SOURCES = \
3485         src/bootchart/bootchart.c \
3486         src/bootchart/bootchart.h \
3487         src/bootchart/store.c \
3488         src/bootchart/store.h \
3489         src/bootchart/svg.c \
3490         src/bootchart/svg.h
3491
3492 systemd_bootchart_LDADD = \
3493         libsystemd-journal-internal.la \
3494         libsystemd-shared.la
3495
3496 rootlibexec_PROGRAMS += \
3497         systemd-bootchart
3498
3499 dist_pkgsysconf_DATA += \
3500         src/bootchart/bootchart.conf
3501 endif
3502
3503 # ------------------------------------------------------------------------------
3504 if ENABLE_QUOTACHECK
3505 rootlibexec_PROGRAMS += \
3506         systemd-quotacheck
3507
3508 nodist_systemunit_DATA += \
3509         units/systemd-quotacheck.service
3510
3511 systemd_quotacheck_SOURCES = \
3512         src/quotacheck/quotacheck.c
3513
3514 systemd_quotacheck_LDADD = \
3515         libsystemd-shared.la
3516 endif
3517
3518 EXTRA_DIST += \
3519         units/systemd-quotacheck.service.in
3520
3521 nodist_systemunit_DATA += \
3522         units/quotaon.service
3523
3524 # ------------------------------------------------------------------------------
3525 if ENABLE_RANDOMSEED
3526 rootlibexec_PROGRAMS += \
3527         systemd-random-seed
3528
3529 nodist_systemunit_DATA += \
3530         units/systemd-random-seed.service
3531
3532 systemd_random_seed_SOURCES = \
3533         src/random-seed/random-seed.c
3534
3535 systemd_random_seed_LDADD = \
3536         libsystemd-label.la \
3537         libsystemd-shared.la
3538
3539 SYSINIT_TARGET_WANTS += \
3540         systemd-random-seed.service
3541
3542 endif
3543
3544 EXTRA_DIST += \
3545         units/systemd-random-seed.service.in
3546
3547 # ------------------------------------------------------------------------------
3548 if ENABLE_BACKLIGHT
3549 rootlibexec_PROGRAMS += \
3550         systemd-backlight
3551
3552 nodist_systemunit_DATA += \
3553         units/systemd-backlight@.service
3554
3555 systemd_backlight_SOURCES = \
3556         src/backlight/backlight.c
3557
3558 systemd_backlight_LDADD = \
3559         libsystemd-label.la \
3560         libudev-internal.la \
3561         libsystemd-shared.la
3562 endif
3563
3564 EXTRA_DIST += \
3565         units/systemd-backlight@.service.in
3566
3567 # ------------------------------------------------------------------------------
3568 if ENABLE_RFKILL
3569 rootlibexec_PROGRAMS += \
3570         systemd-rfkill
3571
3572 nodist_systemunit_DATA += \
3573         units/systemd-rfkill@.service
3574
3575 systemd_rfkill_SOURCES = \
3576         src/rfkill/rfkill.c
3577
3578 systemd_rfkill_LDADD = \
3579         libsystemd-label.la \
3580         libudev-internal.la \
3581         libsystemd-shared.la
3582 endif
3583
3584 EXTRA_DIST += \
3585         units/systemd-rfkill@.service.in
3586
3587 # ------------------------------------------------------------------------------
3588 if HAVE_LIBCRYPTSETUP
3589 rootlibexec_PROGRAMS += \
3590         systemd-cryptsetup
3591
3592 systemgenerator_PROGRAMS += \
3593         systemd-cryptsetup-generator
3594
3595 dist_systemunit_DATA += \
3596         units/cryptsetup.target
3597
3598 systemd_cryptsetup_SOURCES = \
3599         src/cryptsetup/cryptsetup.c
3600
3601 systemd_cryptsetup_CFLAGS = \
3602         $(AM_CFLAGS) \
3603         $(LIBCRYPTSETUP_CFLAGS)
3604
3605 systemd_cryptsetup_LDADD = \
3606         libsystemd-label.la \
3607         libudev-internal.la \
3608         libsystemd-shared.la \
3609         $(LIBCRYPTSETUP_LIBS)
3610
3611 systemd_cryptsetup_generator_SOURCES = \
3612         src/cryptsetup/cryptsetup-generator.c
3613
3614 systemd_cryptsetup_generator_LDADD = \
3615         libsystemd-label.la \
3616         libsystemd-shared.la
3617
3618 SYSINIT_TARGET_WANTS += \
3619         cryptsetup.target
3620
3621 endif
3622
3623 # ------------------------------------------------------------------------------
3624 if ENABLE_HOSTNAMED
3625 systemd_hostnamed_SOURCES = \
3626         src/hostname/hostnamed.c
3627
3628 systemd_hostnamed_LDADD = \
3629         libsystemd-label.la \
3630         libsystemd-internal.la \
3631         libsystemd-shared.la
3632
3633 rootlibexec_PROGRAMS += \
3634         systemd-hostnamed
3635
3636 nodist_systemunit_DATA += \
3637         units/systemd-hostnamed.service
3638
3639 dist_systemunit_DATA += \
3640         units/org.freedesktop.hostname1.busname
3641
3642 dist_dbuspolicy_DATA += \
3643         src/hostname/org.freedesktop.hostname1.conf
3644
3645 dist_dbussystemservice_DATA += \
3646         src/hostname/org.freedesktop.hostname1.service
3647
3648 polkitpolicy_files += \
3649         src/hostname/org.freedesktop.hostname1.policy
3650
3651 SYSTEM_UNIT_ALIASES += \
3652         systemd-hostnamed.service dbus-org.freedesktop.hostname1.service
3653
3654 BUSNAMES_TARGET_WANTS += \
3655         org.freedesktop.hostname1.busname
3656
3657 hostnamectl_SOURCES = \
3658         src/hostname/hostnamectl.c
3659
3660 hostnamectl_LDADD = \
3661         libsystemd-internal.la \
3662         libsystemd-shared.la
3663
3664 bin_PROGRAMS += \
3665         hostnamectl
3666
3667 dist_bashcompletion_DATA += \
3668         shell-completion/bash/hostnamectl
3669
3670 dist_zshcompletion_DATA += \
3671         shell-completion/zsh/_hostnamectl
3672
3673 endif
3674
3675 polkitpolicy_in_files += \
3676         src/hostname/org.freedesktop.hostname1.policy.in
3677
3678 EXTRA_DIST += \
3679         units/systemd-hostnamed.service.in
3680
3681 # ------------------------------------------------------------------------------
3682 if ENABLE_KDBUS
3683 systemd_bus_driverd_SOURCES = \
3684         src/bus-driverd/bus-driverd.c
3685
3686 systemd_bus_driverd_LDADD = \
3687         libsystemd-internal.la \
3688         libsystemd-shared.la
3689
3690 rootlibexec_PROGRAMS += \
3691         systemd-bus-driverd
3692
3693 nodist_systemunit_DATA += \
3694         units/systemd-bus-driverd.service
3695
3696 dist_systemunit_DATA += \
3697         units/org.freedesktop.DBus.busname
3698
3699 BUSNAMES_TARGET_WANTS += \
3700         org.freedesktop.DBus.busname
3701
3702 nodist_userunit_DATA += \
3703         units/user/systemd-bus-driverd.service
3704
3705 USER_BUSNAMES_TARGET_WANTS += \
3706         org.freedesktop.DBus.busname
3707
3708 USER_UNIT_ALIASES += \
3709         $(systemunitdir)/org.freedesktop.DBus.busname org.freedesktop.DBus.busname
3710 endif
3711
3712 EXTRA_DIST += \
3713         units/systemd-bus-driverd.service.in \
3714         units/user/systemd-bus-driverd.service.in
3715
3716 # ------------------------------------------------------------------------------
3717 if ENABLE_LOCALED
3718 systemd_localed_SOURCES = \
3719         src/locale/localed.c
3720
3721 systemd_localed_LDADD = \
3722         libsystemd-label.la \
3723         libsystemd-internal.la \
3724         libsystemd-shared.la
3725
3726 nodist_systemunit_DATA += \
3727         units/systemd-localed.service
3728
3729 dist_systemunit_DATA += \
3730         units/org.freedesktop.locale1.busname
3731
3732 rootlibexec_PROGRAMS += \
3733         systemd-localed
3734
3735 dist_dbuspolicy_DATA += \
3736         src/locale/org.freedesktop.locale1.conf
3737
3738 dist_dbussystemservice_DATA += \
3739         src/locale/org.freedesktop.locale1.service
3740
3741 polkitpolicy_files += \
3742         src/locale/org.freedesktop.locale1.policy
3743
3744 SYSTEM_UNIT_ALIASES += \
3745         systemd-localed.service dbus-org.freedesktop.locale1.service
3746
3747 BUSNAMES_TARGET_WANTS += \
3748         org.freedesktop.locale1.busname
3749
3750 dist_pkgdata_DATA += \
3751         src/locale/kbd-model-map
3752
3753 dist_noinst_SCRIPT = \
3754         src/locale/generate-kbd-model-map
3755
3756 update-kbd-model-map: src/locale/generate-kbd-model-map
3757         $PYTHON $< >src/locale/kbd-model-map
3758
3759 localectl_SOURCES = \
3760         src/locale/localectl.c
3761
3762 localectl_LDADD = \
3763         libsystemd-internal.la \
3764         libsystemd-shared.la
3765
3766 bin_PROGRAMS += \
3767         localectl
3768
3769 dist_bashcompletion_DATA += \
3770         shell-completion/bash/localectl
3771
3772 dist_zshcompletion_DATA += \
3773         shell-completion/zsh/_localectl
3774
3775 endif
3776
3777 .PHONY: update-kbd-model-map
3778
3779 polkitpolicy_in_files += \
3780         src/locale/org.freedesktop.locale1.policy.in
3781
3782 EXTRA_DIST += \
3783         units/systemd-localed.service.in
3784
3785 # ------------------------------------------------------------------------------
3786 if ENABLE_TIMEDATED
3787 systemd_timedated_SOURCES = \
3788         src/timedate/timedated.c
3789
3790 systemd_timedated_LDADD = \
3791         libsystemd-label.la \
3792         libsystemd-internal.la \
3793         libsystemd-shared.la
3794
3795 rootlibexec_PROGRAMS += \
3796         systemd-timedated
3797
3798 dist_dbussystemservice_DATA += \
3799         src/timedate/org.freedesktop.timedate1.service
3800
3801 dist_dbuspolicy_DATA += \
3802         src/timedate/org.freedesktop.timedate1.conf
3803
3804 nodist_systemunit_DATA += \
3805         units/systemd-timedated.service
3806
3807 dist_systemunit_DATA += \
3808         units/org.freedesktop.timedate1.busname
3809
3810 polkitpolicy_files += \
3811         src/timedate/org.freedesktop.timedate1.policy
3812
3813 INSTALL_DIRS += \
3814         $(prefix)/lib/systemd/ntp-units.d \
3815         $(sysconfdir)/systemd/ntp-units.d
3816
3817 SYSTEM_UNIT_ALIASES += \
3818         systemd-timedated.service dbus-org.freedesktop.timedate1.service
3819
3820 BUSNAMES_TARGET_WANTS += \
3821         org.freedesktop.timedate1.busname
3822
3823 timedatectl_SOURCES = \
3824         src/timedate/timedatectl.c
3825
3826 timedatectl_LDADD = \
3827         libsystemd-internal.la \
3828         libsystemd-shared.la
3829
3830 bin_PROGRAMS += \
3831         timedatectl
3832
3833 dist_bashcompletion_DATA += \
3834         shell-completion/bash/timedatectl
3835
3836 dist_zshcompletion_DATA += \
3837         shell-completion/zsh/_timedatectl
3838 endif
3839
3840 polkitpolicy_in_files += \
3841         src/timedate/org.freedesktop.timedate1.policy.in
3842
3843 EXTRA_DIST += \
3844         units/systemd-timedated.service.in
3845
3846 # ------------------------------------------------------------------------------
3847 if HAVE_MYHOSTNAME
3848 libnss_myhostname_la_SOURCES = \
3849         src/nss-myhostname/nss-myhostname.c \
3850         src/nss-myhostname/ifconf.h \
3851         src/nss-myhostname/netlink.c
3852
3853 libnss_myhostname_la_LDFLAGS = \
3854         $(AM_LDFLAGS) \
3855         -module \
3856         -export-dynamic \
3857         -avoid-version \
3858         -shared \
3859         -shrext .so.2
3860
3861 lib_LTLIBRARIES += \
3862         libnss_myhostname.la
3863 endif
3864
3865 # ------------------------------------------------------------------------------
3866 if ENABLE_MACHINED
3867 systemd_machined_SOURCES = \
3868         src/machine/machined.c \
3869         src/machine/machined.h
3870
3871 systemd_machined_LDADD = \
3872         libsystemd-machine-core.la
3873
3874 rootlibexec_PROGRAMS += \
3875         systemd-machined
3876
3877 libsystemd_machine_core_la_SOURCES = \
3878         src/machine/machined-dbus.c \
3879         src/machine/machine.c \
3880         src/machine/machine.h \
3881         src/machine/machine-dbus.c
3882
3883 libsystemd_machine_core_la_LIBADD = \
3884         libsystemd-label.la \
3885         libsystemd-internal.la \
3886         libudev-internal.la \
3887         libsystemd-shared.la
3888
3889 noinst_LTLIBRARIES += \
3890         libsystemd-machine-core.la
3891
3892 machinectl_SOURCES = \
3893         src/machine/machinectl.c
3894
3895 machinectl_LDADD = \
3896         libsystemd-internal.la \
3897         libsystemd-shared.la
3898
3899 rootbin_PROGRAMS += \
3900         machinectl
3901
3902 dist_bashcompletion_DATA += \
3903         shell-completion/bash/machinectl
3904
3905 test_machine_tables_SOURCES = \
3906         src/machine/test-machine-tables.c
3907
3908 test_machine_tables_LDADD = \
3909         libsystemd-machine-core.la
3910
3911 tests += \
3912         test-machine-tables
3913
3914 nodist_systemunit_DATA += \
3915         units/systemd-machined.service
3916
3917 dist_systemunit_DATA += \
3918         units/machine.slice \
3919         units/org.freedesktop.machine1.busname
3920
3921 dist_dbussystemservice_DATA += \
3922         src/machine/org.freedesktop.machine1.service
3923
3924 dist_dbuspolicy_DATA += \
3925         src/machine/org.freedesktop.machine1.conf
3926
3927 dist_zshcompletion_DATA += \
3928         shell-completion/zsh/_machinectl
3929
3930 SYSTEM_UNIT_ALIASES += \
3931         systemd-machined.service dbus-org.freedesktop.machine1.service
3932
3933 BUSNAMES_TARGET_WANTS += \
3934         org.freedesktop.machine1.busname
3935
3936 EXTRA_DIST += \
3937         units/systemd-machined.service.in
3938
3939 endif
3940
3941 # ------------------------------------------------------------------------------
3942 if ENABLE_NETWORKD
3943 rootlibexec_PROGRAMS += \
3944         systemd-networkd
3945
3946 systemd_networkd_SOURCES = \
3947         src/network/networkd.h \
3948         src/network/networkd.c \
3949         src/network/networkd-link.c \
3950         src/network/networkd-netdev.c \
3951         src/network/networkd-network.c \
3952         src/network/networkd-address.c \
3953         src/network/networkd-route.c \
3954         src/network/networkd-manager.c
3955
3956 nodist_systemd_networkd_SOURCES = \
3957         src/network/networkd-gperf.c
3958
3959 systemd_networkd_LDADD = \
3960         libudev-internal.la \
3961         libsystemd-internal.la \
3962         libsystemd-dhcp.la \
3963         libsystemd-label.la \
3964         libsystemd-shared.la
3965
3966 nodist_systemunit_DATA += \
3967         units/systemd-networkd.service
3968
3969 MULTI_USER_TARGET_WANTS += \
3970         systemd-networkd.service
3971
3972 test_network_SOURCES = \
3973         src/network/test-network.c \
3974         src/network/networkd.h \
3975         src/network/networkd-link.c \
3976         src/network/networkd-netdev.c \
3977         src/network/networkd-network.c \
3978         src/network/networkd-address.c \
3979         src/network/networkd-route.c \
3980         src/network/networkd-manager.c \
3981         src/network/networkd-gperf.c
3982
3983 test_network_LDADD = \
3984         libudev-internal.la \
3985         libsystemd-internal.la \
3986         libsystemd-dhcp.la \
3987         libsystemd-label.la \
3988         libsystemd-shared.la
3989
3990 tests += \
3991         test-network
3992
3993 EXTRA_DIST += \
3994         src/network/networkd-gperf.gperf \
3995         units/systemd-networkd.service.in
3996
3997 CLEANFILES += \
3998         src/network/networkd-gperf.c
3999 endif
4000
4001 # ------------------------------------------------------------------------------
4002 if ENABLE_LOGIND
4003 systemd_logind_SOURCES = \
4004         src/login/logind.c \
4005         src/login/logind.h
4006
4007 nodist_systemd_logind_SOURCES = \
4008         src/login/logind-gperf.c
4009
4010 systemd_logind_LDADD = \
4011         libsystemd-logind-core.la
4012
4013 libsystemd_logind_core_la_SOURCES = \
4014         src/login/logind-core.c \
4015         src/login/logind-device.c \
4016         src/login/logind-device.h \
4017         src/login/logind-button.c \
4018         src/login/logind-button.h \
4019         src/login/logind-action.c \
4020         src/login/logind-action.h \
4021         src/login/logind-seat.c \
4022         src/login/logind-seat.h \
4023         src/login/logind-session.c \
4024         src/login/logind-session.h \
4025         src/login/logind-session-device.c \
4026         src/login/logind-session-device.h \
4027         src/login/logind-user.c \
4028         src/login/logind-user.h \
4029         src/login/logind-inhibit.c \
4030         src/login/logind-inhibit.h \
4031         src/login/logind-dbus.c \
4032         src/login/logind-session-dbus.c \
4033         src/login/logind-seat-dbus.c \
4034         src/login/logind-user-dbus.c \
4035         src/login/logind-acl.h \
4036         src/login/login-shared.c \
4037         src/login/login-shared.h
4038
4039 libsystemd_logind_core_la_LIBADD = \
4040         libsystemd-label.la \
4041         libsystemd-capability.la \
4042         libsystemd-internal.la \
4043         libudev-internal.la \
4044         libsystemd-shared.la
4045
4046 if HAVE_ACL
4047 libsystemd_logind_core_la_SOURCES += \
4048         src/login/logind-acl.c
4049
4050 libsystemd_logind_core_la_LIBADD += \
4051         libsystemd-acl.la
4052 endif
4053
4054 noinst_LTLIBRARIES += \
4055         libsystemd-logind-core.la
4056
4057 systemd_user_sessions_SOURCES = \
4058         src/login/user-sessions.c
4059
4060 systemd_user_sessions_LDADD = \
4061         libsystemd-shared.la
4062
4063 rootlibexec_PROGRAMS += \
4064         systemd-logind \
4065         systemd-user-sessions
4066
4067 loginctl_SOURCES = \
4068         src/login/loginctl.c \
4069         src/login/sysfs-show.c
4070
4071 loginctl_LDADD = \
4072         libsystemd-internal.la \
4073         libudev-internal.la \
4074         libsystemd-shared.la
4075
4076 rootbin_PROGRAMS += \
4077         loginctl
4078
4079 dist_bashcompletion_DATA += \
4080         shell-completion/bash/loginctl
4081
4082 dist_zshcompletion_DATA += \
4083         shell-completion/zsh/_loginctl \
4084         shell-completion/zsh/_systemd-inhibit
4085
4086 systemd_inhibit_SOURCES = \
4087         src/login/inhibit.c
4088
4089 systemd_inhibit_LDADD = \
4090         libsystemd-internal.la \
4091         libsystemd-shared.la
4092
4093 rootbin_PROGRAMS += \
4094         systemd-inhibit
4095
4096 test_login_SOURCES = \
4097         src/login/test-login.c
4098
4099 test_login_LDADD = \
4100         libsystemd-internal.la \
4101         libsystemd-shared.la
4102
4103 test_login_shared_SOURCES = \
4104         src/login/test-login-shared.c
4105
4106 test_login_shared_LDADD = \
4107         libsystemd-internal.la \
4108         libsystemd-shared.la
4109
4110 test_inhibit_SOURCES = \
4111         src/login/test-inhibit.c
4112
4113 test_inhibit_LDADD = \
4114         libsystemd-internal.la \
4115         libsystemd-shared.la
4116
4117 test_login_tables_SOURCES = \
4118         src/login/test-login-tables.c
4119
4120 test_login_tables_LDADD = \
4121         libsystemd-logind-core.la
4122
4123 manual_tests += \
4124         test-login \
4125         test-inhibit
4126
4127 tests += \
4128         test-login-tables \
4129         test-login-shared
4130
4131 if HAVE_PAM
4132 pam_systemd_la_SOURCES = \
4133         src/login/pam-module.c
4134
4135 pam_systemd_la_CFLAGS = \
4136         $(AM_CFLAGS) \
4137         $(PAM_CFLAGS) \
4138         -fvisibility=hidden
4139
4140 pam_systemd_la_LDFLAGS = \
4141         $(AM_LDFLAGS) \
4142         -module \
4143         -export-dynamic \
4144         -avoid-version \
4145         -shared \
4146         -export-symbols-regex '^pam_sm_.*'
4147
4148 pam_systemd_la_LIBADD = \
4149         libsystemd-capability.la \
4150         libsystemd-internal.la \
4151         libsystemd-shared.la \
4152         $(PAM_LIBS)
4153
4154 pamlib_LTLIBRARIES = \
4155         pam_systemd.la
4156
4157 dist_pamconf_DATA = \
4158         src/login/systemd-user
4159 endif
4160
4161 nodist_systemunit_DATA += \
4162         units/systemd-logind.service \
4163         units/systemd-user-sessions.service
4164
4165 dist_systemunit_DATA += \
4166         units/user.slice \
4167         units/org.freedesktop.login1.busname
4168
4169 dist_dbussystemservice_DATA += \
4170         src/login/org.freedesktop.login1.service
4171
4172 dist_dbuspolicy_DATA += \
4173         src/login/org.freedesktop.login1.conf
4174
4175 dist_pkgsysconf_DATA += \
4176         src/login/logind.conf
4177
4178 polkitpolicy_files += \
4179         src/login/org.freedesktop.login1.policy
4180
4181 INSTALL_DIRS += \
4182         $(systemdstatedir)
4183
4184 MULTI_USER_TARGET_WANTS += \
4185         systemd-logind.service \
4186         systemd-user-sessions.service
4187
4188 SYSTEM_UNIT_ALIASES += \
4189         systemd-logind.service dbus-org.freedesktop.login1.service
4190
4191 BUSNAMES_TARGET_WANTS += \
4192         org.freedesktop.login1.busname
4193
4194 if ENABLE_MULTI_SEAT_X
4195
4196 systemd_multi_seat_x_SOURCES = \
4197         src/login/multi-seat-x.c
4198
4199 systemd_multi_seat_x_LDADD = \
4200         libsystemd-label.la \
4201         libsystemd-shared.la
4202
4203 rootlibexec_PROGRAMS += \
4204         systemd-multi-seat-x
4205
4206 endif
4207
4208 dist_udevrules_DATA += \
4209         src/login/70-uaccess.rules \
4210         src/login/70-power-switch.rules
4211
4212 nodist_udevrules_DATA += \
4213         src/login/71-seat.rules \
4214         src/login/73-seat-late.rules
4215
4216 CLEANFILES += \
4217         src/login/logind-gperf.c \
4218         src/login/71-seat.rules \
4219         src/login/73-seat-late.rules
4220 endif
4221
4222 polkitpolicy_in_files += \
4223         src/login/org.freedesktop.login1.policy.in
4224
4225 EXTRA_DIST += \
4226         src/login/logind-gperf.gperf \
4227         src/login/71-seat.rules.in \
4228         src/login/73-seat-late.rules.in \
4229         units/systemd-logind.service.in \
4230         units/systemd-user-sessions.service.in
4231
4232 # ------------------------------------------------------------------------------
4233 if HAVE_PYTHON_DEVEL
4234 pkgpyexec_LTLIBRARIES = \
4235         _journal.la \
4236         id128.la \
4237         _daemon.la \
4238         _reader.la \
4239         login.la
4240
4241 _journal_la_SOURCES = \
4242         src/python-systemd/_journal.c
4243
4244 _journal_la_CFLAGS = \
4245         $(AM_CFLAGS) \
4246         -fvisibility=default \
4247         $(PYTHON_DEVEL_CFLAGS)
4248
4249 _journal_la_LDFLAGS = \
4250         $(AM_LDFLAGS) \
4251         -shared \
4252         -module \
4253         -avoid-version
4254
4255 _journal_la_LIBADD = \
4256         $(PYTHON_DEVEL_LIBS) \
4257         libsystemd-journal.la
4258
4259 id128_la_SOURCES = \
4260         src/python-systemd/id128.c \
4261         src/python-systemd/id128-constants.h \
4262         src/python-systemd/pyutil.c \
4263         src/python-systemd/pyutil.h
4264
4265 id128_la_CFLAGS = \
4266         $(AM_CFLAGS) \
4267         -fvisibility=default \
4268         $(PYTHON_DEVEL_CFLAGS) \
4269         -I$(top_builddir)/src/python-systemd
4270
4271 id128_la_LDFLAGS = \
4272         $(AM_LDFLAGS) \
4273         -shared \
4274         -module \
4275         -avoid-version
4276
4277 id128_la_LIBADD = \
4278         $(PYTHON_DEVEL_LIBS) \
4279         libsystemd.la
4280
4281 _daemon_la_SOURCES = \
4282         src/python-systemd/_daemon.c \
4283         src/python-systemd/pyutil.c \
4284         src/python-systemd/pyutil.h
4285
4286 _daemon_la_CFLAGS = \
4287         $(AM_CFLAGS) \
4288         -fvisibility=default \
4289         $(PYTHON_DEVEL_CFLAGS) \
4290         -I$(top_builddir)/src/python-systemd
4291
4292 _daemon_la_LDFLAGS = \
4293         $(AM_LDFLAGS) \
4294         -shared \
4295         -module \
4296         -avoid-version
4297
4298 _daemon_la_LIBADD = \
4299         $(PYTHON_DEVEL_LIBS) \
4300         libsystemd.la
4301
4302 _reader_la_SOURCES = \
4303         src/python-systemd/_reader.c \
4304         src/python-systemd/pyutil.c \
4305         src/python-systemd/pyutil.h
4306
4307 _reader_la_CFLAGS = \
4308         $(AM_CFLAGS) \
4309         -fvisibility=default \
4310         $(PYTHON_DEVEL_CFLAGS)
4311
4312 _reader_la_LDFLAGS = \
4313         $(AM_LDFLAGS) \
4314         -shared \
4315         -module \
4316         -avoid-version
4317
4318 _reader_la_LIBADD = \
4319         $(PYTHON_DEVEL_LIBS) \
4320         libsystemd.la \
4321         libsystemd-journal.la \
4322         libsystemd-shared.la
4323
4324 login_la_SOURCES = \
4325         src/python-systemd/login.c \
4326         src/python-systemd/pyutil.c \
4327         src/python-systemd/pyutil.h
4328
4329 login_la_CFLAGS = \
4330         $(AM_CFLAGS) \
4331         -fvisibility=default \
4332         $(PYTHON_DEVEL_CFLAGS)
4333
4334 login_la_LDFLAGS = \
4335         $(AM_LDFLAGS) \
4336         -shared \
4337         -module \
4338         -avoid-version
4339
4340 login_la_LIBADD = \
4341         $(PYTHON_DEVEL_LIBS) \
4342         libsystemd.la \
4343         libsystemd-shared.la
4344
4345 dist_pkgpyexec_PYTHON = \
4346         src/python-systemd/journal.py \
4347         src/python-systemd/daemon.py \
4348         src/python-systemd/__init__.py
4349
4350 src/python-systemd/id128-constants.h: src/systemd/sd-messages.h
4351         $(AM_V_at)$(MKDIR_P) $(dir $@)
4352         $(AM_V_GEN)$(SED) -n -r 's/,//g; s/#define (SD_MESSAGE_[A-Z0-9_]+)\s.*/add_id(m, "\1", \1) JOINER/p' <$< >$@
4353
4354 BUILT_SOURCES += \
4355         src/python-systemd/id128-constants.h
4356
4357 SPHINXOPTS = -D version=$(VERSION) -D release=$(VERSION)
4358 sphinx-%:
4359         $(AM_V_at)test -n "$(SPHINX_BUILD)" || { echo " *** sphinx-build is not available"; exit 1; }
4360         $(AM_V_GEN)PYTHONPATH=$(DESTDIR)$(pyexecdir) LD_LIBRARY_PATH=$(DESTDIR)$(libdir) $(SPHINX_BUILD) -b $* $(SPHINXOPTS) $(top_srcdir)/src/python-systemd/docs $(top_builddir)/docs/html/python-systemd/
4361         $(AM_V_at)echo Output has been generated in $(abs_top_builddir)/docs/html/python-systemd/
4362
4363 python-shell:
4364         $(AM_V_at)echo "Starting python with $(DESTDIR)$(pyexecdir)"
4365         $(AM_V_at)PYTHONPATH=$(DESTDIR)$(pyexecdir) LD_LIBRARY_PATH=$(DESTDIR)$(libdir) $(PYTHON)
4366
4367 destdir-sphinx: all
4368         dir="$$(mktemp -d /tmp/systemd-install.XXXXXX)" && \
4369                 $(MAKE) DESTDIR="$$dir" install && \
4370                 $(MAKE) DESTDIR="$$dir" sphinx-html && \
4371                 rm -rf "$$dir"
4372
4373 endif
4374
4375 CLEAN_LOCAL_HOOKS += clean-sphinx
4376
4377 .PHONY: python-shell destdir-sphinx clean-sphinx clean-python
4378
4379 clean-sphinx:
4380         -rm -rf docs/html/python-systemd/
4381
4382 # Remove Python stuff, e.g. to force rebuilding for a different Python version.
4383 clean-python:
4384         -rm -rf src/python-systemd/.libs src/python-systemd/*.l[ao]
4385         -rm -f _daemon.la id128.la _journal.la login.la _reader.la
4386
4387 # ------------------------------------------------------------------------------
4388 if ENABLE_COMPAT_LIBS
4389
4390 define generate-fake-lib
4391         $(AM_V_at)$(MKDIR_P) $(dir $@)
4392         $(AM_V_GEN)sed -r -n 's/^ +(sd_.*);/void new_\1(void);\n__asm__(".symver new_\1,\1@LIBSYSTEMD_209");\nstatic void (*resolve_\1(void)) (void) {\n\treturn new_\1;\n}\nvoid \1(void) __attribute__((ifunc("resolve_\1")));\nobsolete_lib(\1,$(notdir $(basename $<)));\n/p' <$< >$@
4393 endef
4394
4395 libsystemd_login_la_SOURCES = \
4396         libsystemd-login.c \
4397         src/compat-libs/libsystemd-login.sym
4398
4399 libsystemd_login_la_CFLAGS = \
4400         $(AM_CFLAGS) \
4401         -fvisibility=default \
4402         -imacros $(top_srcdir)/src/compat-libs/linkwarning.h \
4403         -fno-lto
4404
4405 libsystemd_login_la_LDFLAGS = \
4406         $(AM_LDFLAGS) \
4407         -version-info $(LIBSYSTEMD_LOGIN_CURRENT):$(LIBSYSTEMD_LOGIN_REVISION):$(LIBSYSTEMD_LOGIN_AGE) \
4408         -Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-login.sym
4409
4410 libsystemd_login_la_LIBADD = \
4411         libsystemd.la
4412
4413 libsystemd_id128_la_SOURCES = \
4414         libsystemd-id128.c \
4415         src/compat-libs/libsystemd-id128.sym
4416
4417 libsystemd_id128_la_CFLAGS = \
4418         $(libsystemd_login_la_CFLAGS)
4419
4420 libsystemd_id128_la_LDFLAGS = \
4421         $(AM_LDFLAGS) \
4422         -version-info $(LIBSYSTEMD_ID128_CURRENT):$(LIBSYSTEMD_ID128_REVISION):$(LIBSYSTEMD_ID128_AGE) \
4423         -Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-id128.sym
4424
4425 libsystemd_id128_la_LIBADD = \
4426         libsystemd.la
4427
4428 libsystemd_daemon_la_SOURCES = \
4429         libsystemd-daemon.c \
4430         src/compat-libs/libsystemd-daemon.sym
4431
4432 libsystemd_daemon_la_CFLAGS = \
4433         $(libsystemd_login_la_CFLAGS)
4434
4435 libsystemd_daemon_la_LDFLAGS = \
4436         $(AM_LDFLAGS) \
4437         -version-info $(LIBSYSTEMD_DAEMON_CURRENT):$(LIBSYSTEMD_DAEMON_REVISION):$(LIBSYSTEMD_DAEMON_AGE) \
4438         -Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-daemon.sym
4439
4440 libsystemd_daemon_la_LIBADD = \
4441         libsystemd.la
4442
4443 BUILT_SOURCES += \
4444         libsystemd-login.c \
4445         libsystemd-id128.c \
4446         libsystemd-daemon.c
4447
4448 libsystemd-%.c: src/compat-libs/libsystemd-%.sym
4449         $(generate-fake-lib)
4450
4451 lib_LTLIBRARIES += \
4452         libsystemd-login.la \
4453         libsystemd-id128.la \
4454         libsystemd-daemon.la
4455
4456 pkgconfiglib_DATA += \
4457         src/compat-libs/libsystemd-login.pc \
4458         src/compat-libs/libsystemd-id128.pc \
4459         src/compat-libs/libsystemd-daemon.pc
4460
4461 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
4462 compat-lib-install-hook:
4463         libname=libsystemd-login.so && $(move-to-rootlibdir)
4464         libname=libsystemd-id128.so && $(move-to-rootlibdir)
4465         libname=libsystemd-daemon.so && $(move-to-rootlibdir)
4466
4467 compat-lib-uninstall-hook:
4468         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-login.so*
4469         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-id128.so*
4470         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-daemon.so*
4471
4472 INSTALL_EXEC_HOOKS += compat-lib-install-hook
4473 UNINSTALL_EXEC_HOOKS += compat-lib-uninstall-hook
4474
4475 endif
4476
4477 EXTRA_DIST += \
4478         src/compat-libs/libsystemd-login.pc.in \
4479         src/compat-libs/libsystemd-id128.pc.in \
4480         src/compat-libs/libsystemd-daemon.pc.in
4481
4482 # ------------------------------------------------------------------------------
4483 substitutions = \
4484        '|rootlibexecdir=$(rootlibexecdir)|' \
4485        '|rootbindir=$(rootbindir)|' \
4486        '|bindir=$(bindir)|' \
4487        '|SYSTEMCTL=$(rootbindir)/systemctl|' \
4488        '|SYSTEMD_NOTIFY=$(rootbindir)/systemd-notify|' \
4489        '|pkgsysconfdir=$(pkgsysconfdir)|' \
4490        '|SYSTEM_CONFIG_UNIT_PATH=$(pkgsysconfdir)/system|' \
4491        '|USER_CONFIG_UNIT_PATH=$(pkgsysconfdir)/user|' \
4492        '|pkgdatadir=$(pkgdatadir)|' \
4493        '|systemunitdir=$(systemunitdir)|' \
4494        '|userunitdir=$(userunitdir)|' \
4495        '|systempresetdir=$(systempresetdir)|' \
4496        '|userpresetdir=$(userpresetdir)|' \
4497        '|udevhwdbdir=$(udevhwdbdir)|' \
4498        '|udevrulesdir=$(udevrulesdir)|' \
4499        '|catalogdir=$(catalogdir)|' \
4500        '|tmpfilesdir=$(tmpfilesdir)|' \
4501        '|sysctldir=$(sysctldir)|' \
4502        '|systemgeneratordir=$(systemgeneratordir)|' \
4503        '|usergeneratordir=$(usergeneratordir)|' \
4504        '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
4505        '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
4506        '|PACKAGE_URL=$(PACKAGE_URL)|' \
4507        '|RANDOM_SEED_DIR=$(localstatedir)/lib/systemd/|' \
4508        '|RANDOM_SEED=$(localstatedir)/lib/systemd/random-seed|' \
4509        '|prefix=$(prefix)|' \
4510        '|exec_prefix=$(exec_prefix)|' \
4511        '|libdir=$(libdir)|' \
4512        '|includedir=$(includedir)|' \
4513        '|VERSION=$(VERSION)|' \
4514        '|rootprefix=$(rootprefix)|' \
4515        '|udevlibexecdir=$(udevlibexecdir)|' \
4516        '|SUSHELL=$(SUSHELL)|' \
4517        '|DEBUGTTY=$(DEBUGTTY)|' \
4518        '|KILL=$(KILL)|' \
4519        '|KMOD=$(KMOD)|' \
4520        '|MKDIR_P=$(MKDIR_P)|' \
4521        '|QUOTAON=$(QUOTAON)|' \
4522        '|QUOTACHECK=$(QUOTACHECK)|' \
4523        '|SYSTEM_SYSVINIT_PATH=$(sysvinitdir)|' \
4524        '|VARLOGDIR=$(varlogdir)|' \
4525        '|RC_LOCAL_SCRIPT_PATH_START=$(RC_LOCAL_SCRIPT_PATH_START)|' \
4526        '|RC_LOCAL_SCRIPT_PATH_STOP=$(RC_LOCAL_SCRIPT_PATH_STOP)|' \
4527        '|PYTHON=$(PYTHON)|' \
4528        '|PYTHON_BINARY=$(PYTHON_BINARY)|'
4529
4530 SED_PROCESS = \
4531         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
4532         $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
4533                 < $< > $@
4534
4535 units/%: units/%.in
4536         $(SED_PROCESS)
4537
4538 man/%: man/%.in
4539         $(SED_PROCESS)
4540
4541 sysctl.d/%: sysctl.d/%.in
4542         $(SED_PROCESS)
4543
4544 %.pc: %.pc.in
4545         $(SED_PROCESS)
4546
4547 src/core/macros.%: src/core/macros.%.in
4548         $(SED_PROCESS)
4549
4550 src/%.policy.in: src/%.policy.in.in
4551         $(SED_PROCESS)
4552
4553 %.rules: %.rules.in
4554         $(SED_PROCESS)
4555
4556 %.sh: %.sh.in
4557         $(SED_PROCESS)
4558         $(AM_V_GEN)chmod +x $@
4559
4560 src/%.c: src/%.gperf
4561         $(AM_V_at)$(MKDIR_P) $(dir $@)
4562         $(AM_V_GPERF)$(GPERF) < $< > $@
4563
4564 src/%: src/%.m4
4565         $(AM_V_at)$(MKDIR_P) $(dir $@)
4566         $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
4567
4568 units/%: units/%.m4
4569         $(AM_V_at)$(MKDIR_P) $(dir $@)
4570         $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_SYSTEM=1 < $< > $@
4571
4572 units/user/%: units/%.m4
4573         $(AM_V_at)$(MKDIR_P) $(dir $@)
4574         $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_USER=1 < $< > $@
4575
4576 if ENABLE_POLKIT
4577 nodist_polkitpolicy_DATA = \
4578         $(polkitpolicy_files) \
4579         $(polkitpolicy_in_in_files:.policy.in.in=.policy)
4580 endif
4581
4582 EXTRA_DIST += \
4583         $(polkitpolicy_in_files) \
4584         $(polkitpolicy_in_in_files)
4585
4586 CLEANFILES += \
4587         $(nodist_systemunit_DATA) \
4588         $(nodist_userunit_DATA) \
4589         $(pkgconfigdata_DATA) \
4590         $(pkgconfiglib_DATA) \
4591         $(nodist_polkitpolicy_DATA)
4592
4593 # ------------------------------------------------------------------------------
4594 if ENABLE_MANPAGES
4595 man/custom-entities.ent:
4596         $(AM_V_GEN)$(MKDIR_P) $(dir $@)
4597         $(AM_V_GEN)(echo '<?xml version="1.0" encoding="utf-8" ?>' && \
4598          printf '$(subst '|,<!ENTITY ,$(subst =, ",$(subst |',">\n,$(substitutions))))') \
4599          > $@ # '
4600
4601 DISTCLEANFILES += \
4602         man/custom-entities.ent
4603
4604 XSLTPROC_FLAGS = \
4605         --nonet \
4606         --xinclude \
4607         --stringparam man.output.quietly 1 \
4608         --stringparam funcsynopsis.style ansi \
4609         --stringparam man.authors.section.enabled 0 \
4610         --stringparam man.copyright.section.enabled 0 \
4611         --stringparam systemd.version $(VERSION) \
4612         --path '$(builddir)/man:$(srcdir)/man'
4613
4614 XSLTPROC_PROCESS_MAN = \
4615         $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-man.xsl $<
4616
4617