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