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