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