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