1 # -*- Mode: makefile; indent-tabs-mode: t -*-
3 # This file is part of elogind.
5 # Copyright 2010-2012 Lennart Poettering
6 # Copyright 2010-2012 Kay Sievers
7 # Copyright 2013 Zbigniew Jędrzejewski-Szmek
8 # Copyright 2013 David Strauss
10 # elogind 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.
15 # elogind 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.
20 # You should have received a copy of the GNU Lesser General Public License
21 # along with elogind; If not, see <http://www.gnu.org/licenses/>.
23 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
24 AM_MAKEFLAGS = --no-print-directory
25 AUTOMAKE_OPTIONS = color-tests parallel-tests
27 GCC_COLORS ?= 'ooh, shiny!'
32 # remove targets if the command fails
35 # keep intermediate files
38 # Keep the test-suite.log
39 .PRECIOUS: $(TEST_SUITE_LOG) Makefile
45 # Dirs of external packages
46 dbuspolicydir=@dbuspolicydir@
47 dbussessionservicedir=@dbussessionservicedir@
48 dbussystemservicedir=@dbussystemservicedir@
50 pamconfdir=@pamconfdir@
51 pkgconfiglibdir=$(libdir)/pkgconfig
52 polkitpolicydir=$(datadir)/polkit-1/actions
53 bashcompletiondir=@bashcompletiondir@
54 zshcompletiondir=@zshcompletiondir@
55 varlogdir=$(localstatedir)/log
56 elogindstatedir=$(localstatedir)/lib/elogind
58 # Our own, non-special dirs
59 pkgsysconfdir=$(sysconfdir)/elogind
60 pkgincludedir=$(includedir)/elogind
61 udevrulesdir=$(rootprefix)/lib/udev/rules.d
62 factory_etcdir = $(prefix)/share/factory/etc
63 factory_pamdir = $(prefix)/share/factory/etc/pam.d
65 # And these are the special ones for /
66 rootprefix=@rootprefix@
67 rootbindir=$(rootprefix)/bin
68 rootlibexecdir=$(rootprefix)/lib/elogind
73 UNINSTALL_EXEC_HOOKS =
75 UNINSTALL_DATA_HOOKS =
76 DISTCLEAN_LOCAL_HOOKS =
84 polkitpolicy_in_in_files =
85 polkitpolicy_in_files =
87 dist_pkgsysconf_DATA =
88 nodist_pkgsysconf_DATA =
90 dist_dbuspolicy_DATA =
91 dist_dbussystemservice_DATA =
97 PY_LOG_COMPILER = $(PYTHON)
99 noinst_PROGRAMS = $(manual_tests) $(tests)
106 in_files = $(filter %.in,$(EXTRA_DIST))
107 in_in_files = $(filter %.in.in, $(in_files))
108 m4_files = $(filter %.m4,$(EXTRA_DIST) $(in_files:.m4.in=.m4))
110 CLEANFILES = $(BUILT_SOURCES) \
111 $(pkgconfiglib_DATA) \
112 $(in_files:.in=) $(in_in_files:.in.in=) \
115 .PHONY: $(INSTALL_EXEC_HOOKS) $(UNINSTALL_EXEC_HOOKS) \
116 $(INSTALL_DATA_HOOKS) $(UNINSTALL_DATA_HOOKS) \
117 $(DISTCLEAN_LOCAL_HOOKS) $(CLEAN_LOCAL_HOOKS)
119 # FIXME a different pkttyagent path...
122 -include $(top_builddir)/config.h \
123 -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\" \
124 -DPOLKIT_AGENT_BINARY_PATH=\"$(bindir)/pkttyagent\" \
125 -DSYSTEM_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/system\" \
126 -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" \
127 -DUSER_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/user\" \
128 -DUSER_DATA_UNIT_PATH=\"$(userunitdir)\" \
129 -DROOTPREFIX=\"$(rootprefix)\" \
130 -DPOLKIT_AGENT_BINARY_PATH=\"$(bindir)/pkttyagent\" \
131 -DKEXEC=\"$(KEXEC)\" \
132 -DLIBDIR=\"$(libdir)\" \
133 -DROOTLIBDIR=\"$(rootlibdir)\" \
134 -DROOTLIBEXECDIR=\"$(rootlibexecdir)\" \
135 -DTEST_DIR=\"$(abs_top_srcdir)/test\" \
136 -I $(top_srcdir)/src \
137 -I $(top_builddir)/src/shared \
138 -I $(top_srcdir)/src/shared \
139 -I $(top_srcdir)/src/login \
140 -I $(top_srcdir)/src/systemd \
141 -I $(top_srcdir)/src/libelogind/sd-bus \
142 -I $(top_srcdir)/src/libelogind/sd-event \
143 -I $(top_srcdir)/src/libelogind/sd-device \
147 AM_CFLAGS = $(OUR_CFLAGS)
148 AM_LDFLAGS = $(OUR_LDFLAGS)
150 # ------------------------------------------------------------------------------
151 define move-to-rootlibdir
152 if test "$(libdir)" != "$(rootlibdir)"; then \
153 $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
154 so_img_name=$$(readlink $(DESTDIR)$(libdir)/$$libname) && \
155 rm -f $(DESTDIR)$(libdir)/$$libname && \
156 $(LN_S) --relative -f $(DESTDIR)$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/$$libname && \
157 mv $(DESTDIR)$(libdir)/$$libname.* $(DESTDIR)$(rootlibdir); \
163 SHUTDOWN_TARGET_WANTS =
164 LOCAL_FS_TARGET_WANTS =
165 MULTI_USER_TARGET_WANTS =
166 GRAPHICAL_TARGET_WANTS =
167 RESCUE_TARGET_WANTS =
168 SYSINIT_TARGET_WANTS =
169 SOCKETS_TARGET_WANTS =
170 BUSNAMES_TARGET_WANTS =
171 TIMERS_TARGET_WANTS =
172 USER_SOCKETS_TARGET_WANTS =
173 USER_DEFAULT_TARGET_WANTS =
174 USER_BUSNAMES_TARGET_WANTS =
176 SYSTEM_UNIT_ALIASES =
180 install-target-wants-hook:
181 what="$(SHUTDOWN_TARGET_WANTS)" && wants=shutdown.target && dir=$(systemunitdir) && $(add-wants)
182 what="$(LOCAL_FS_TARGET_WANTS)" && wants=local-fs.target && dir=$(systemunitdir) && $(add-wants)
183 what="$(MULTI_USER_TARGET_WANTS)" && wants=multi-user.target && dir=$(systemunitdir) && $(add-wants)
184 what="$(GRAPHICAL_TARGET_WANTS)" && wants=graphical.target && dir=$(systemunitdir) && $(add-wants)
185 what="$(RESCUE_TARGET_WANTS)" && wants=rescue.target && dir=$(systemunitdir) && $(add-wants)
186 what="$(SYSINIT_TARGET_WANTS)" && wants=sysinit.target && dir=$(systemunitdir) && $(add-wants)
187 what="$(SOCKETS_TARGET_WANTS)" && wants=sockets.target && dir=$(systemunitdir) && $(add-wants)
188 what="$(TIMERS_TARGET_WANTS)" && wants=timers.target && dir=$(systemunitdir) && $(add-wants)
189 what="$(SLICES_TARGET_WANTS)" && wants=slices.target && dir=$(systemunitdir) && $(add-wants)
190 what="$(USER_SOCKETS_TARGET_WANTS)" && wants=sockets.target && dir=$(userunitdir) && $(add-wants)
191 what="$(USER_DEFAULT_TARGET_WANTS)" && wants=default.target && dir=$(userunitdir) && $(add-wants)
193 install-busnames-target-wants-hook:
194 what="$(BUSNAMES_TARGET_WANTS)" && wants=busnames.target && dir=$(systemunitdir) && $(add-wants)
195 what="$(USER_BUSNAMES_TARGET_WANTS)" && wants=busnames.target && dir=$(userunitdir) && $(add-wants)
198 [ -z "$$what" ] || ( \
199 dir=$(DESTDIR)$$dir/$$wants.wants && \
200 $(MKDIR_P) -m 0755 $$dir && \
203 for i in $$what; do $(LN_S) ../$$i . || exit $$? ; done )
206 install-directories-hook:
207 $(MKDIR_P) $(addprefix $(DESTDIR),$(INSTALL_DIRS))
209 install-aliases-hook:
210 set -- $(SYSTEM_UNIT_ALIASES) && \
211 dir=$(systemunitdir) && $(install-aliases)
212 set -- $(USER_UNIT_ALIASES) && \
213 dir=$(userunitdir) && $(install-relative-aliases)
214 set -- $(GENERAL_ALIASES) && \
215 dir= && $(install-relative-aliases)
217 define install-aliases
218 while [ -n "$$1" ]; do \
219 $(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \
220 rm -f $(DESTDIR)$$dir/$$2 && \
221 $(LN_S) $$1 $(DESTDIR)$$dir/$$2 && \
222 shift 2 || exit $$?; \
226 define install-relative-aliases
227 while [ -n "$$1" ]; do \
228 $(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \
229 rm -f $(DESTDIR)$$dir/$$2 && \
230 $(LN_S) --relative $(DESTDIR)$$1 $(DESTDIR)$$dir/$$2 && \
231 shift 2 || exit $$?; \
235 install-touch-usr-hook:
236 touch -c $(DESTDIR)/$(prefix)
238 INSTALL_EXEC_HOOKS += \
239 install-target-wants-hook \
240 install-directories-hook \
241 install-aliases-hook \
242 install-touch-usr-hook
245 INSTALL_EXEC_HOOKS += \
246 install-busnames-target-wants-hook
249 # ------------------------------------------------------------------------------
250 AM_V_M4 = $(AM_V_M4_$(V))
251 AM_V_M4_ = $(AM_V_M4_$(AM_DEFAULT_VERBOSITY))
252 AM_V_M4_0 = @echo " M4 " $@;
254 AM_V_XSLT = $(AM_V_XSLT_$(V))
255 AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
256 AM_V_XSLT_0 = @echo " XSLT " $@;
258 AM_V_GPERF = $(AM_V_GPERF_$(V))
259 AM_V_GPERF_ = $(AM_V_GPERF_$(AM_DEFAULT_VERBOSITY))
260 AM_V_GPERF_0 = @echo " GPERF " $@;
262 AM_V_LN = $(AM_V_LN_$(V))
263 AM_V_LN_ = $(AM_V_LN_$(AM_DEFAULT_VERBOSITY))
264 AM_V_LN_0 = @echo " LN " $@;
266 AM_V_RM = $(AM_V_RM_$(V))
267 AM_V_RM_ = $(AM_V_RM_$(AM_DEFAULT_VERBOSITY))
268 AM_V_RM_0 = @echo " RM " $@;
270 # ------------------------------------------------------------------------------
273 rootlibexec_PROGRAMS =
274 dist_bashcompletion_DATA =
275 dist_zshcompletion_DATA =
283 src/libelogind/sd-bus/PORTING-DBUS1 \
284 src/libelogind/sd-bus/DIFFERENCES \
285 src/libelogind/sd-bus/GVARIANT-SERIALIZATION
287 @INTLTOOL_POLICY_RULE@
289 # ------------------------------------------------------------------------------
294 include Makefile-man.am
296 .PHONY: man update-man-list
297 man: $(MANPAGES) $(MANPAGES_ALIAS) $(HTML_FILES) $(HTML_ALIAS)
300 ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
302 ${XML_FILES:.xml=.html}
304 ${patsubst %.1,%.html,${patsubst %.3,%.html,${patsubst %.5,%.html,${patsubst %.7,%.html,${patsubst %.8,%.html,$(MANPAGES_ALIAS)}}}}}
321 $(AM_V_at)$(MKDIR_P) $(dir $@)
322 $(AM_V_LN)$(LN_S) -f ../../man $@
337 tools/make-man-index.py \
338 tools/make-directive-index.py \
341 # ------------------------------------------------------------------------------
342 noinst_LTLIBRARIES += \
345 libelogind_shared_la_SOURCES = \
346 src/shared/capability.c \
347 src/shared/capability.h \
348 src/shared/linux/auto_dev-ioctl.h \
349 src/shared/ioprio.h \
350 src/shared/missing.h \
351 src/shared/initreq.h \
352 src/shared/securebits.h \
353 src/shared/special.h \
355 src/shared/unaligned.h \
358 src/shared/sparse-endian.h \
359 src/shared/refcnt.h \
360 src/shared/udev-util.h \
361 src/shared/device-nodes.c \
362 src/shared/device-nodes.h \
367 src/shared/architecture.c \
368 src/shared/architecture.h \
369 src/shared/fstab-util.c \
370 src/shared/fstab-util.h \
371 src/shared/path-util.c \
372 src/shared/path-util.h \
373 src/shared/time-util.c \
374 src/shared/time-util.h \
375 src/shared/locale-util.c \
376 src/shared/locale-util.h \
377 src/shared/mempool.c \
378 src/shared/mempool.h \
379 src/shared/hashmap.c \
380 src/shared/hashmap.h \
381 src/shared/siphash24.c \
382 src/shared/siphash24.h \
388 src/shared/sleep-config.c \
389 src/shared/sleep-config.h \
392 src/shared/env-util.c \
393 src/shared/env-util.h \
394 src/shared/strbuf.c \
395 src/shared/strbuf.h \
396 src/shared/strxcpyx.c \
397 src/shared/strxcpyx.h \
398 src/shared/conf-parser.c \
399 src/shared/conf-parser.h \
402 src/shared/ratelimit.h \
403 src/shared/ratelimit.c \
404 src/shared/exit-status.c \
405 src/shared/exit-status.h \
408 src/shared/gunicode.c \
409 src/shared/gunicode.h \
412 src/shared/socket-util.c \
413 src/shared/socket-util.h \
414 src/shared/in-addr-util.c \
415 src/shared/in-addr-util.h \
416 src/shared/ether-addr-util.h \
417 src/shared/conf-files.c \
418 src/shared/conf-files.h \
419 src/shared/cgroup-util.c \
420 src/shared/cgroup-util.h \
421 src/shared/cgroup-show.c \
422 src/shared/cgroup-show.h \
423 src/shared/unit-name.c \
424 src/shared/unit-name.h \
425 src/shared/watchdog.c \
426 src/shared/watchdog.h \
427 src/shared/replace-var.c \
428 src/shared/replace-var.h \
429 src/shared/spawn-polkit-agent.c \
430 src/shared/spawn-polkit-agent.h \
431 src/shared/clock-util.c \
432 src/shared/clock-util.h \
433 src/shared/calendarspec.c \
434 src/shared/calendarspec.h \
435 src/shared/fileio.c \
436 src/shared/fileio.h \
437 src/shared/output-mode.h \
438 src/shared/MurmurHash2.c \
439 src/shared/MurmurHash2.h \
440 src/shared/acpi-fpdt.h \
441 src/shared/acpi-fpdt.c \
444 src/shared/smack-util.c \
445 src/shared/smack-util.h \
446 src/shared/apparmor-util.c \
447 src/shared/apparmor-util.h \
448 src/shared/ima-util.c \
449 src/shared/ima-util.h \
450 src/shared/ptyfwd.c \
451 src/shared/ptyfwd.h \
452 src/shared/errno-list.c \
453 src/shared/errno-list.h \
454 src/shared/af-list.c \
455 src/shared/af-list.h \
456 src/shared/arphrd-list.c \
457 src/shared/arphrd-list.h \
458 src/shared/cap-list.c \
459 src/shared/cap-list.h \
466 src/shared/selinux-util.c \
467 src/shared/selinux-util.h \
470 src/shared/socket-label.c \
471 src/shared/mkdir-label.c \
472 src/shared/fileio-label.h \
473 src/shared/fileio-label.c \
474 src/shared/bus-label.c \
475 src/shared/bus-label.h \
477 src/shared/clean-ipc.h \
478 src/shared/clean-ipc.c \
479 src/shared/login-shared.c \
480 src/shared/login-shared.h \
483 src/shared/barrier.c \
484 src/shared/barrier.h \
489 src/shared/base-filesystem.c \
490 src/shared/base-filesystem.h \
491 src/shared/memfd-util.c \
492 src/shared/memfd-util.h \
493 src/shared/uid-range.c \
494 src/shared/uid-range.h \
495 src/shared/nss-util.h \
498 src/shared/sigbus.c \
499 src/shared/sigbus.h \
501 src/shared/import-util.c \
502 src/shared/import-util.h \
503 src/shared/sysctl-util.c \
504 src/shared/sysctl-util.h
506 nodist_libelogind_shared_la_SOURCES = \
507 src/shared/errno-from-name.h \
508 src/shared/errno-to-name.h \
509 src/shared/af-from-name.h \
510 src/shared/af-to-name.h \
511 src/shared/arphrd-from-name.h \
512 src/shared/arphrd-to-name.h \
513 src/shared/cap-from-name.h \
514 src/shared/cap-to-name.h
516 libelogind_shared_la_CFLAGS = \
522 libelogind_shared_la_LIBADD = \
526 # ------------------------------------------------------------------------------
528 noinst_LTLIBRARIES += \
531 libelogind_acl_la_SOURCES = \
532 src/shared/acl-util.c \
533 src/shared/acl-util.h
535 libelogind_acl_la_CFLAGS = \
539 libelogind_acl_la_LIBADD = \
543 gperf_txt_sources = \
544 src/shared/errno-list.txt \
545 src/shared/af-list.txt \
546 src/shared/arphrd-list.txt \
547 src/shared/cap-list.txt
550 $(gperf_gperf_sources:-gperf.gperf=-gperf.c) \
551 $(gperf_txt_sources:-list.txt=-from-name.h) \
552 $(gperf_txt_sources:-list.txt=-to-name.h)
555 $(gperf_txt_sources:-list.txt=-from-name.gperf)
560 $(gperf_gperf_m4_sources) \
561 $(gperf_gperf_sources) \
562 $(gperf_txt_sources:-list.txt=-from-name.gperf)
567 %-from-name.gperf: %-list.txt
568 $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct $(notdir $*)_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' <$< >$@
570 %-from-name.h: %-from-name.gperf
571 $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_$(notdir $*) -H hash_$(notdir $*)_name -p -C <$< >$@
574 src/shared/errno-list.txt:
575 $(AM_V_at)$(MKDIR_P) $(dir $@)
576 $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include errno.h - </dev/null | $(AWK) '/^#define[ \t]+E[^ _]+[ \t]+/ { print $$2; }' >$@
578 src/shared/errno-to-name.h: src/shared/errno-list.txt
579 $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const errno_names[] = { "} !/EDEADLOCK/ && !/EWOULDBLOCK/ && !/ENOTSUP/ { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
582 src/shared/af-list.txt:
583 $(AM_V_at)$(MKDIR_P) $(dir $@)
584 $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include sys/socket.h - </dev/null | grep -v AF_UNSPEC | grep -v AF_MAX | $(AWK) '/^#define[ \t]+AF_[^ \t]+[ \t]+PF_[^ \t]/ { print $$2; }' >$@
586 src/shared/af-to-name.h: src/shared/af-list.txt
587 $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const af_names[] = { "} !/AF_FILE/ && !/AF_ROUTE/ && !/AF_LOCAL/ { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
590 src/shared/arphrd-list.txt:
591 $(AM_V_at)$(MKDIR_P) $(dir $@)
592 $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include net/if_arp.h - </dev/null | $(AWK) '/^#define[ \t]+ARPHRD_[^ \t]+[ \t]+[^ \t]/ { print $$2; }' | sed -e 's/ARPHRD_//' >$@
594 src/shared/arphrd-to-name.h: src/shared/arphrd-list.txt
595 $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const arphrd_names[] = { "} !/CISCO/ { printf "[ARPHRD_%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
597 src/shared/arphrd-from-name.gperf: src/shared/arphrd-list.txt
598 $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct arphrd_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, ARPHRD_%s\n", $$1, $$1 }' <$< >$@
601 src/shared/cap-list.txt:
602 $(AM_V_at)$(MKDIR_P) $(dir $@)
603 $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include linux/capability.h -include missing.h - </dev/null | $(AWK) '/^#define[ \t]+CAP_[A-Z_]+[ \t]+/ { print $$2; }' | grep -v CAP_LAST_CAP >$@
605 src/shared/cap-to-name.h: src/shared/cap-list.txt
606 $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const capability_names[] = { "} { printf "[%s] = \"%s\",\n", $$1, tolower($$1) } END{print "};"}' <$< >$@
608 src/shared/cap-from-name.gperf: src/shared/cap-list.txt
609 $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct capability_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' <$< >$@
611 src/shared/cap-from-name.h: src/shared/cap-from-name.gperf
612 $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_capability -H hash_capability_name -p -C <$< >$@
614 # ------------------------------------------------------------------------------
615 dist_factory_etc_DATA =
618 dist_factory_pam_DATA = \
619 factory/etc/pam.d/system-auth \
620 factory/etc/pam.d/other
623 # ------------------------------------------------------------------------------
624 noinst_LTLIBRARIES += \
625 libelogind-internal.la
627 libelogind_internal_la_SOURCES = \
628 src/systemd/sd-bus.h \
629 src/systemd/sd-bus-protocol.h \
630 src/systemd/sd-bus-vtable.h \
631 src/systemd/sd-utf8.h \
632 src/systemd/sd-event.h \
633 src/systemd/sd-rtnl.h \
634 src/systemd/sd-resolve.h \
635 src/systemd/sd-login.h \
636 src/systemd/sd-id128.h \
637 src/systemd/sd-daemon.h \
638 src/systemd/sd-path.h \
639 src/systemd/sd-network.h \
640 src/systemd/sd-device.h \
641 src/libelogind/sd-bus/sd-bus.c \
642 src/libelogind/sd-bus/bus-control.c \
643 src/libelogind/sd-bus/bus-control.h \
644 src/libelogind/sd-bus/bus-error.c \
645 src/libelogind/sd-bus/bus-error.h \
646 src/libelogind/sd-bus/bus-common-errors.h \
647 src/libelogind/sd-bus/bus-common-errors.c \
648 src/libelogind/sd-bus/bus-internal.c \
649 src/libelogind/sd-bus/bus-internal.h \
650 src/libelogind/sd-bus/bus-socket.c \
651 src/libelogind/sd-bus/bus-socket.h \
652 src/libelogind/sd-bus/bus-kernel.c \
653 src/libelogind/sd-bus/bus-kernel.h \
654 src/libelogind/sd-bus/bus-container.c \
655 src/libelogind/sd-bus/bus-container.h \
656 src/libelogind/sd-bus/bus-message.c \
657 src/libelogind/sd-bus/bus-message.h \
658 src/libelogind/sd-bus/bus-creds.c \
659 src/libelogind/sd-bus/bus-creds.h \
660 src/libelogind/sd-bus/bus-signature.c \
661 src/libelogind/sd-bus/bus-signature.h \
662 src/libelogind/sd-bus/bus-type.c \
663 src/libelogind/sd-bus/bus-type.h \
664 src/libelogind/sd-bus/bus-match.c \
665 src/libelogind/sd-bus/bus-match.h \
666 src/libelogind/sd-bus/bus-bloom.c \
667 src/libelogind/sd-bus/bus-bloom.h \
668 src/libelogind/sd-bus/bus-introspect.c \
669 src/libelogind/sd-bus/bus-introspect.h \
670 src/libelogind/sd-bus/bus-objects.c \
671 src/libelogind/sd-bus/bus-objects.h \
672 src/libelogind/sd-bus/bus-gvariant.c \
673 src/libelogind/sd-bus/bus-gvariant.h \
674 src/libelogind/sd-bus/bus-convenience.c \
675 src/libelogind/sd-bus/bus-track.c \
676 src/libelogind/sd-bus/bus-track.h \
677 src/libelogind/sd-bus/bus-util.c \
678 src/libelogind/sd-bus/bus-util.h \
679 src/libelogind/sd-bus/bus-slot.c \
680 src/libelogind/sd-bus/bus-slot.h \
681 src/libelogind/sd-bus/bus-protocol.h \
682 src/libelogind/sd-bus/kdbus.h \
683 src/libelogind/sd-utf8/sd-utf8.c \
684 src/libelogind/sd-event/sd-event.c \
685 src/libelogind/sd-event/event-util.h \
686 src/libelogind/sd-rtnl/sd-rtnl.c \
687 src/libelogind/sd-rtnl/rtnl-internal.h \
688 src/libelogind/sd-rtnl/rtnl-message.c \
689 src/libelogind/sd-rtnl/rtnl-types.h \
690 src/libelogind/sd-rtnl/rtnl-types.c \
691 src/libelogind/sd-rtnl/rtnl-util.h \
692 src/libelogind/sd-rtnl/rtnl-util.c \
693 src/libelogind/sd-rtnl/local-addresses.h \
694 src/libelogind/sd-rtnl/local-addresses.c \
695 src/libelogind/sd-id128/sd-id128.c \
696 src/libelogind/sd-daemon/sd-daemon.c \
697 src/libelogind/sd-login/sd-login.c \
698 src/libelogind/sd-path/sd-path.c \
699 src/libelogind/sd-network/sd-network.c \
700 src/libelogind/sd-network/network-util.h \
701 src/libelogind/sd-network/network-util.c \
702 src/libelogind/sd-device/device-internal.h \
703 src/libelogind/sd-device/device-util.h \
704 src/libelogind/sd-device/sd-device.c \
705 src/libelogind/sd-device/device-private.c \
706 src/libelogind/sd-device/device-private.h
708 nodist_libelogind_internal_la_SOURCES = \
709 src/libelogind/libelogind.sym
711 libelogind_internal_la_CFLAGS = \
716 src/libelogind/libelogind.sym
719 libelogind_internal_la_LIBADD = \
722 libelogind_internal_la_LDFLAGS = \
724 -version-info $(LIBELOGIND_CURRENT):$(LIBELOGIND_REVISION):$(LIBELOGIND_AGE) \
725 -Wl,--version-script=$(top_builddir)/src/libelogind/libelogind.sym
727 libelogind-install-hook:
728 libname=libelogind.so && $(move-to-rootlibdir)
730 libelogind-uninstall-hook:
731 rm -f $(DESTDIR)$(rootlibdir)/libelogind.so*
733 INSTALL_EXEC_HOOKS += libelogind-install-hook
734 UNINSTALL_EXEC_HOOKS += libelogind-uninstall-hook
736 pkgconfiglib_DATA += \
737 src/libelogind/libsystemd.pc
739 pkginclude_HEADERS += \
740 src/systemd/sd-login.h
742 # ------------------------------------------------------------------------------
747 nodist_elogind_SOURCES = \
748 src/login/logind-gperf.c
753 libelogind_core_la_SOURCES = \
754 src/login/logind-core.c \
755 src/login/logind-device.c \
756 src/login/logind-device.h \
757 src/login/logind-button.c \
758 src/login/logind-button.h \
759 src/login/logind-action.c \
760 src/login/logind-action.h \
761 src/login/logind-seat.c \
762 src/login/logind-seat.h \
763 src/login/logind-session.c \
764 src/login/logind-session.h \
765 src/login/logind-session-device.c \
766 src/login/logind-session-device.h \
767 src/login/logind-user.c \
768 src/login/logind-user.h \
769 src/login/logind-inhibit.c \
770 src/login/logind-inhibit.h \
771 src/login/logind-dbus.c \
772 src/login/logind-session-dbus.c \
773 src/login/logind-seat-dbus.c \
774 src/login/logind-user-dbus.c \
775 src/login/logind-acl.h
777 libelogind_core_la_LIBADD = \
779 libelogind-internal.la
782 libelogind_core_la_SOURCES += \
783 src/login/logind-acl.c
785 libelogind_core_la_LIBADD += \
789 noinst_LTLIBRARIES += \
792 rootlibexec_PROGRAMS += \
796 src/login/loginctl.c \
797 src/login/sysfs-show.h \
798 src/login/sysfs-show.c
802 libelogind-internal.la \
805 rootbin_PROGRAMS += \
808 dist_bashcompletion_DATA += \
809 shell-completion/bash/loginctl
811 dist_zshcompletion_DATA += \
812 shell-completion/zsh/_loginctl \
813 shell-completion/zsh/_systemd-inhibit
815 systemd_inhibit_SOURCES = \
818 systemd_inhibit_LDADD = \
819 libelogind-internal.la \
822 rootbin_PROGRAMS += \
825 test_login_SOURCES = \
826 src/libelogind/sd-login/test-login.c
829 libelogind-internal.la \
832 test_login_shared_SOURCES = \
833 src/login/test-login-shared.c
835 test_login_shared_LDADD = \
836 libelogind-internal.la \
839 test_inhibit_SOURCES = \
840 src/login/test-inhibit.c
842 test_inhibit_LDADD = \
843 libelogind-internal.la \
846 test_login_tables_SOURCES = \
847 src/login/test-login-tables.c
849 test_login_tables_LDADD = \
861 pam_elogind_la_SOURCES = \
862 src/login/pam_elogind.sym \
863 src/login/pam_elogind.c
865 pam_elogind_la_CFLAGS = \
870 pam_elogind_la_LDFLAGS = \
876 -Wl,--version-script=$(top_srcdir)/src/login/pam_elogind.sym
878 pam_elogind_la_LIBADD = \
879 libelogind-internal.la \
882 pamlib_LTLIBRARIES = \
885 dist_pamconf_DATA = \
886 src/login/elogind-user
890 dist_dbussystemservice_DATA += \
891 src/login/org.freedesktop.login1.service
893 dist_dbuspolicy_DATA += \
894 src/login/org.freedesktop.login1.conf
896 dist_pkgsysconf_DATA += \
897 src/login/logind.conf
899 polkitpolicy_files += \
900 src/login/org.freedesktop.login1.policy
905 SYSTEM_UNIT_ALIASES += \
906 elogind.service dbus-org.freedesktop.login1.service
908 dist_udevrules_DATA = \
909 src/login/70-uaccess.rules \
910 src/login/70-power-switch.rules
912 nodist_udevrules_DATA = \
913 src/login/71-seat.rules \
914 src/login/73-seat-late.rules
916 polkitpolicy_in_files += \
917 src/login/org.freedesktop.login1.policy.in
919 gperf_gperf_sources = \
920 src/login/logind-gperf.gperf
923 src/login/71-seat.rules.in \
924 src/login/73-seat-late.rules.in
926 # ------------------------------------------------------------------------------
928 '|rootlibexecdir=$(rootlibexecdir)|' \
929 '|rootbindir=$(rootbindir)|' \
930 '|bindir=$(bindir)|' \
931 '|pkgsysconfdir=$(pkgsysconfdir)|' \
932 '|pkgdatadir=$(pkgdatadir)|' \
933 '|udevrulesdir=$(udevrulesdir)|' \
934 '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
935 '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
936 '|PACKAGE_URL=$(PACKAGE_URL)|' \
937 '|prefix=$(prefix)|' \
938 '|exec_prefix=$(exec_prefix)|' \
939 '|libdir=$(libdir)|' \
940 '|includedir=$(includedir)|' \
941 '|VERSION=$(VERSION)|' \
942 '|rootprefix=$(rootprefix)|' \
943 '|MKDIR_P=$(MKDIR_P)|' \
944 '|VARLOGDIR=$(varlogdir)|' \
945 '|systemuidmax=$(SYSTEM_UID_MAX)|' \
946 '|systemgidmax=$(SYSTEM_GID_MAX)|'
949 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
950 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
959 sysctl.d/%: sysctl.d/%.in
968 src/%.policy.in: src/%.policy.in.in
971 shell-completion/%: shell-completion/%.in
982 $(AM_V_GEN)chmod +x $@
985 $(AM_V_at)$(MKDIR_P) $(dir $@)
986 $(AM_V_GPERF)$(GPERF) < $< > $@
989 $(AM_V_at)$(MKDIR_P) $(dir $@)
990 $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
992 sysusers.d/%: sysusers.d/%.m4
993 $(AM_V_at)$(MKDIR_P) $(dir $@)
994 $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
996 tmpfiles.d/%: tmpfiles.d/%.m4
997 $(AM_V_at)$(MKDIR_P) $(dir $@)
998 $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
1002 $(AM_V_at)$(MKDIR_P) $(dir $@)
1003 $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_SYSTEM=1 < $< > $@
1005 units/user/%: units/user/%.m4
1006 $(AM_V_at)$(MKDIR_P) $(dir $@)
1007 $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_USER=1 < $< > $@
1010 nodist_polkitpolicy_DATA = \
1011 $(polkitpolicy_files) \
1012 $(polkitpolicy_in_in_files:.policy.in.in=.policy)
1016 $(polkitpolicy_in_files) \
1017 $(polkitpolicy_in_in_files)
1019 # ------------------------------------------------------------------------------
1021 man/custom-entities.ent: configure.ac
1022 $(AM_V_GEN)$(MKDIR_P) $(dir $@)
1023 $(AM_V_GEN)(echo '<?xml version="1.0" encoding="utf-8" ?>' && \
1024 printf '$(subst '|,<!ENTITY ,$(subst =, ",$(subst |',">\n,$(substitutions))))') \
1028 man/custom-entities.ent
1033 --stringparam man.output.quietly 1 \
1034 --stringparam funcsynopsis.style ansi \
1035 --stringparam man.authors.section.enabled 0 \
1036 --stringparam man.copyright.section.enabled 0 \
1037 --stringparam elogind.version $(VERSION) \
1038 --path '$(builddir)/man:$(srcdir)/man'
1040 XSLTPROC_PROCESS_MAN = \
1041 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-man.xsl $<
1043 XSLTPROC_PROCESS_HTML = \
1044 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
1046 man/%.1: man/%.xml man/custom-man.xsl man/custom-entities.ent
1047 $(XSLTPROC_PROCESS_MAN)
1049 man/%.3: man/%.xml man/custom-man.xsl man/custom-entities.ent
1050 $(XSLTPROC_PROCESS_MAN)
1052 man/%.5: man/%.xml man/custom-man.xsl man/custom-entities.ent
1053 $(XSLTPROC_PROCESS_MAN)
1055 man/%.7: man/%.xml man/custom-man.xsl man/custom-entities.ent
1056 $(XSLTPROC_PROCESS_MAN)
1058 man/%.8: man/%.xml man/custom-man.xsl man/custom-entities.ent
1059 $(XSLTPROC_PROCESS_MAN)
1061 man/%.html: man/%.xml man/custom-html.xsl man/custom-entities.ent
1062 $(XSLTPROC_PROCESS_HTML)
1065 $(AM_V_LN)$(LN_S) -f $(notdir $<) $@
1071 man/custom-html.xsl \
1074 install-exec-hook: $(INSTALL_EXEC_HOOKS)
1076 uninstall-hook: $(UNINSTALL_DATA_HOOKS) $(UNINSTALL_EXEC_HOOKS)
1078 install-data-hook: $(INSTALL_DATA_HOOKS)
1080 distclean-local: $(DISTCLEAN_LOCAL_HOOKS)
1082 clean-local: $(CLEAN_LOCAL_HOOKS)
1083 rm -rf $(abs_srcdir)/install-tree
1085 DISTCHECK_CONFIGURE_FLAGS = \
1086 --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
1087 --with-dbussessionservicedir=$$dc_install_base/$(dbussessionservicedir) \
1088 --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
1089 --with-bashcompletiondir=$$dc_install_base/$(bashcompletiondir) \
1090 --with-zshcompletiondir=$$dc_install_base/$(zshcompletiondir) \
1091 --with-pamlibdir=$$dc_install_base/$(pamlibdir) \
1092 --with-pamconfdir=$$dc_install_base/$(pamconfdir) \
1093 --with-rootprefix=$$dc_install_base \
1094 --disable-split-usr \
1098 DISTCHECK_CONFIGURE_FLAGS += \