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