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 -- $(GENERAL_ALIASES) && \
211 dir= && $(install-relative-aliases)
213 define install-aliases
214 while [ -n "$$1" ]; do \
215 $(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \
216 rm -f $(DESTDIR)$$dir/$$2 && \
217 $(LN_S) $$1 $(DESTDIR)$$dir/$$2 && \
218 shift 2 || exit $$?; \
222 define install-relative-aliases
223 while [ -n "$$1" ]; do \
224 $(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \
225 rm -f $(DESTDIR)$$dir/$$2 && \
226 $(LN_S) --relative $(DESTDIR)$$1 $(DESTDIR)$$dir/$$2 && \
227 shift 2 || exit $$?; \
231 install-touch-usr-hook:
232 touch -c $(DESTDIR)/$(prefix)
234 INSTALL_EXEC_HOOKS += \
235 install-target-wants-hook \
236 install-directories-hook \
237 install-aliases-hook \
238 install-touch-usr-hook
241 INSTALL_EXEC_HOOKS += \
242 install-busnames-target-wants-hook
245 # ------------------------------------------------------------------------------
246 AM_V_M4 = $(AM_V_M4_$(V))
247 AM_V_M4_ = $(AM_V_M4_$(AM_DEFAULT_VERBOSITY))
248 AM_V_M4_0 = @echo " M4 " $@;
250 AM_V_XSLT = $(AM_V_XSLT_$(V))
251 AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
252 AM_V_XSLT_0 = @echo " XSLT " $@;
254 AM_V_GPERF = $(AM_V_GPERF_$(V))
255 AM_V_GPERF_ = $(AM_V_GPERF_$(AM_DEFAULT_VERBOSITY))
256 AM_V_GPERF_0 = @echo " GPERF " $@;
258 AM_V_LN = $(AM_V_LN_$(V))
259 AM_V_LN_ = $(AM_V_LN_$(AM_DEFAULT_VERBOSITY))
260 AM_V_LN_0 = @echo " LN " $@;
262 AM_V_RM = $(AM_V_RM_$(V))
263 AM_V_RM_ = $(AM_V_RM_$(AM_DEFAULT_VERBOSITY))
264 AM_V_RM_0 = @echo " RM " $@;
266 # ------------------------------------------------------------------------------
269 rootlibexec_PROGRAMS =
270 dist_bashcompletion_DATA =
271 dist_zshcompletion_DATA =
279 src/libelogind/sd-bus/PORTING-DBUS1 \
280 src/libelogind/sd-bus/DIFFERENCES \
281 src/libelogind/sd-bus/GVARIANT-SERIALIZATION
283 @INTLTOOL_POLICY_RULE@
285 # ------------------------------------------------------------------------------
290 include Makefile-man.am
292 .PHONY: man update-man-list
293 man: $(MANPAGES) $(MANPAGES_ALIAS) $(HTML_FILES) $(HTML_ALIAS)
296 ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
298 ${XML_FILES:.xml=.html}
300 ${patsubst %.1,%.html,${patsubst %.3,%.html,${patsubst %.5,%.html,${patsubst %.7,%.html,${patsubst %.8,%.html,$(MANPAGES_ALIAS)}}}}}
317 $(AM_V_at)$(MKDIR_P) $(dir $@)
318 $(AM_V_LN)$(LN_S) -f ../../man $@
333 tools/make-man-index.py \
334 tools/make-directive-index.py \
337 # ------------------------------------------------------------------------------
338 noinst_LTLIBRARIES += \
341 libelogind_shared_la_SOURCES = \
342 src/shared/capability.c \
343 src/shared/capability.h \
344 src/shared/linux/auto_dev-ioctl.h \
345 src/shared/ioprio.h \
346 src/shared/missing.h \
347 src/shared/initreq.h \
348 src/shared/securebits.h \
349 src/shared/special.h \
351 src/shared/unaligned.h \
354 src/shared/sparse-endian.h \
355 src/shared/refcnt.h \
356 src/shared/udev-util.h \
357 src/shared/device-nodes.c \
358 src/shared/device-nodes.h \
363 src/shared/architecture.c \
364 src/shared/architecture.h \
365 src/shared/fstab-util.c \
366 src/shared/fstab-util.h \
367 src/shared/path-util.c \
368 src/shared/path-util.h \
369 src/shared/time-util.c \
370 src/shared/time-util.h \
371 src/shared/locale-util.c \
372 src/shared/locale-util.h \
373 src/shared/mempool.c \
374 src/shared/mempool.h \
375 src/shared/hashmap.c \
376 src/shared/hashmap.h \
377 src/shared/siphash24.c \
378 src/shared/siphash24.h \
384 src/shared/sleep-config.c \
385 src/shared/sleep-config.h \
388 src/shared/env-util.c \
389 src/shared/env-util.h \
390 src/shared/strbuf.c \
391 src/shared/strbuf.h \
392 src/shared/strxcpyx.c \
393 src/shared/strxcpyx.h \
394 src/shared/conf-parser.c \
395 src/shared/conf-parser.h \
398 src/shared/ratelimit.h \
399 src/shared/ratelimit.c \
400 src/shared/exit-status.c \
401 src/shared/exit-status.h \
404 src/shared/gunicode.c \
405 src/shared/gunicode.h \
408 src/shared/socket-util.c \
409 src/shared/socket-util.h \
410 src/shared/in-addr-util.c \
411 src/shared/in-addr-util.h \
412 src/shared/ether-addr-util.h \
413 src/shared/conf-files.c \
414 src/shared/conf-files.h \
415 src/shared/cgroup-util.c \
416 src/shared/cgroup-util.h \
417 src/shared/cgroup-show.c \
418 src/shared/cgroup-show.h \
419 src/shared/unit-name.c \
420 src/shared/unit-name.h \
421 src/shared/watchdog.c \
422 src/shared/watchdog.h \
423 src/shared/replace-var.c \
424 src/shared/replace-var.h \
425 src/shared/spawn-polkit-agent.c \
426 src/shared/spawn-polkit-agent.h \
427 src/shared/clock-util.c \
428 src/shared/clock-util.h \
429 src/shared/calendarspec.c \
430 src/shared/calendarspec.h \
431 src/shared/fileio.c \
432 src/shared/fileio.h \
433 src/shared/output-mode.h \
434 src/shared/MurmurHash2.c \
435 src/shared/MurmurHash2.h \
436 src/shared/acpi-fpdt.h \
437 src/shared/acpi-fpdt.c \
440 src/shared/smack-util.c \
441 src/shared/smack-util.h \
442 src/shared/apparmor-util.c \
443 src/shared/apparmor-util.h \
444 src/shared/ima-util.c \
445 src/shared/ima-util.h \
446 src/shared/ptyfwd.c \
447 src/shared/ptyfwd.h \
448 src/shared/errno-list.c \
449 src/shared/errno-list.h \
450 src/shared/af-list.c \
451 src/shared/af-list.h \
452 src/shared/arphrd-list.c \
453 src/shared/arphrd-list.h \
454 src/shared/cap-list.c \
455 src/shared/cap-list.h \
462 src/shared/selinux-util.c \
463 src/shared/selinux-util.h \
466 src/shared/socket-label.c \
467 src/shared/mkdir-label.c \
468 src/shared/fileio-label.h \
469 src/shared/fileio-label.c \
470 src/shared/bus-label.c \
471 src/shared/bus-label.h \
473 src/shared/clean-ipc.h \
474 src/shared/clean-ipc.c \
475 src/shared/login-shared.c \
476 src/shared/login-shared.h \
479 src/shared/barrier.c \
480 src/shared/barrier.h \
485 src/shared/base-filesystem.c \
486 src/shared/base-filesystem.h \
487 src/shared/memfd-util.c \
488 src/shared/memfd-util.h \
489 src/shared/uid-range.c \
490 src/shared/uid-range.h \
491 src/shared/nss-util.h \
494 src/shared/sigbus.c \
495 src/shared/sigbus.h \
497 src/shared/import-util.c \
498 src/shared/import-util.h \
499 src/shared/sysctl-util.c \
500 src/shared/sysctl-util.h
502 nodist_libelogind_shared_la_SOURCES = \
503 src/shared/errno-from-name.h \
504 src/shared/errno-to-name.h \
505 src/shared/af-from-name.h \
506 src/shared/af-to-name.h \
507 src/shared/arphrd-from-name.h \
508 src/shared/arphrd-to-name.h \
509 src/shared/cap-from-name.h \
510 src/shared/cap-to-name.h
512 libelogind_shared_la_CFLAGS = \
518 libelogind_shared_la_LIBADD = \
522 # ------------------------------------------------------------------------------
524 noinst_LTLIBRARIES += \
527 libelogind_acl_la_SOURCES = \
528 src/shared/acl-util.c \
529 src/shared/acl-util.h
531 libelogind_acl_la_CFLAGS = \
535 libelogind_acl_la_LIBADD = \
539 gperf_txt_sources = \
540 src/shared/errno-list.txt \
541 src/shared/af-list.txt \
542 src/shared/arphrd-list.txt \
543 src/shared/cap-list.txt
546 $(gperf_gperf_sources:-gperf.gperf=-gperf.c) \
547 $(gperf_txt_sources:-list.txt=-from-name.h) \
548 $(gperf_txt_sources:-list.txt=-to-name.h)
551 $(gperf_txt_sources:-list.txt=-from-name.gperf)
556 $(gperf_gperf_m4_sources) \
557 $(gperf_gperf_sources) \
558 $(gperf_txt_sources:-list.txt=-from-name.gperf)
563 %-from-name.gperf: %-list.txt
564 $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct $(notdir $*)_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' <$< >$@
566 %-from-name.h: %-from-name.gperf
567 $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_$(notdir $*) -H hash_$(notdir $*)_name -p -C <$< >$@
570 src/shared/errno-list.txt:
571 $(AM_V_at)$(MKDIR_P) $(dir $@)
572 $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include errno.h - </dev/null | $(AWK) '/^#define[ \t]+E[^ _]+[ \t]+/ { print $$2; }' >$@
574 src/shared/errno-to-name.h: src/shared/errno-list.txt
575 $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const errno_names[] = { "} !/EDEADLOCK/ && !/EWOULDBLOCK/ && !/ENOTSUP/ { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
578 src/shared/af-list.txt:
579 $(AM_V_at)$(MKDIR_P) $(dir $@)
580 $(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; }' >$@
582 src/shared/af-to-name.h: src/shared/af-list.txt
583 $(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 "};"}' <$< >$@
586 src/shared/arphrd-list.txt:
587 $(AM_V_at)$(MKDIR_P) $(dir $@)
588 $(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_//' >$@
590 src/shared/arphrd-to-name.h: src/shared/arphrd-list.txt
591 $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const arphrd_names[] = { "} !/CISCO/ { printf "[ARPHRD_%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
593 src/shared/arphrd-from-name.gperf: src/shared/arphrd-list.txt
594 $(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 }' <$< >$@
597 src/shared/cap-list.txt:
598 $(AM_V_at)$(MKDIR_P) $(dir $@)
599 $(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 >$@
601 src/shared/cap-to-name.h: src/shared/cap-list.txt
602 $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const capability_names[] = { "} { printf "[%s] = \"%s\",\n", $$1, tolower($$1) } END{print "};"}' <$< >$@
604 src/shared/cap-from-name.gperf: src/shared/cap-list.txt
605 $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct capability_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' <$< >$@
607 src/shared/cap-from-name.h: src/shared/cap-from-name.gperf
608 $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_capability -H hash_capability_name -p -C <$< >$@
610 # ------------------------------------------------------------------------------
611 dist_factory_etc_DATA =
614 dist_factory_pam_DATA = \
615 factory/etc/pam.d/system-auth \
616 factory/etc/pam.d/other
619 # ------------------------------------------------------------------------------
620 noinst_LTLIBRARIES += \
621 libelogind-internal.la
623 libelogind_internal_la_SOURCES = \
624 src/systemd/sd-bus.h \
625 src/systemd/sd-bus-protocol.h \
626 src/systemd/sd-bus-vtable.h \
627 src/systemd/sd-utf8.h \
628 src/systemd/sd-event.h \
629 src/systemd/sd-rtnl.h \
630 src/systemd/sd-resolve.h \
631 src/systemd/sd-login.h \
632 src/systemd/sd-id128.h \
633 src/systemd/sd-daemon.h \
634 src/systemd/sd-path.h \
635 src/systemd/sd-network.h \
636 src/systemd/sd-device.h \
637 src/libelogind/sd-bus/sd-bus.c \
638 src/libelogind/sd-bus/bus-control.c \
639 src/libelogind/sd-bus/bus-control.h \
640 src/libelogind/sd-bus/bus-error.c \
641 src/libelogind/sd-bus/bus-error.h \
642 src/libelogind/sd-bus/bus-common-errors.h \
643 src/libelogind/sd-bus/bus-common-errors.c \
644 src/libelogind/sd-bus/bus-internal.c \
645 src/libelogind/sd-bus/bus-internal.h \
646 src/libelogind/sd-bus/bus-socket.c \
647 src/libelogind/sd-bus/bus-socket.h \
648 src/libelogind/sd-bus/bus-kernel.c \
649 src/libelogind/sd-bus/bus-kernel.h \
650 src/libelogind/sd-bus/bus-container.c \
651 src/libelogind/sd-bus/bus-container.h \
652 src/libelogind/sd-bus/bus-message.c \
653 src/libelogind/sd-bus/bus-message.h \
654 src/libelogind/sd-bus/bus-creds.c \
655 src/libelogind/sd-bus/bus-creds.h \
656 src/libelogind/sd-bus/bus-signature.c \
657 src/libelogind/sd-bus/bus-signature.h \
658 src/libelogind/sd-bus/bus-type.c \
659 src/libelogind/sd-bus/bus-type.h \
660 src/libelogind/sd-bus/bus-match.c \
661 src/libelogind/sd-bus/bus-match.h \
662 src/libelogind/sd-bus/bus-bloom.c \
663 src/libelogind/sd-bus/bus-bloom.h \
664 src/libelogind/sd-bus/bus-introspect.c \
665 src/libelogind/sd-bus/bus-introspect.h \
666 src/libelogind/sd-bus/bus-objects.c \
667 src/libelogind/sd-bus/bus-objects.h \
668 src/libelogind/sd-bus/bus-gvariant.c \
669 src/libelogind/sd-bus/bus-gvariant.h \
670 src/libelogind/sd-bus/bus-convenience.c \
671 src/libelogind/sd-bus/bus-track.c \
672 src/libelogind/sd-bus/bus-track.h \
673 src/libelogind/sd-bus/bus-util.c \
674 src/libelogind/sd-bus/bus-util.h \
675 src/libelogind/sd-bus/bus-slot.c \
676 src/libelogind/sd-bus/bus-slot.h \
677 src/libelogind/sd-bus/bus-protocol.h \
678 src/libelogind/sd-bus/kdbus.h \
679 src/libelogind/sd-utf8/sd-utf8.c \
680 src/libelogind/sd-event/sd-event.c \
681 src/libelogind/sd-event/event-util.h \
682 src/libelogind/sd-rtnl/sd-rtnl.c \
683 src/libelogind/sd-rtnl/rtnl-internal.h \
684 src/libelogind/sd-rtnl/rtnl-message.c \
685 src/libelogind/sd-rtnl/rtnl-types.h \
686 src/libelogind/sd-rtnl/rtnl-types.c \
687 src/libelogind/sd-rtnl/rtnl-util.h \
688 src/libelogind/sd-rtnl/rtnl-util.c \
689 src/libelogind/sd-rtnl/local-addresses.h \
690 src/libelogind/sd-rtnl/local-addresses.c \
691 src/libelogind/sd-id128/sd-id128.c \
692 src/libelogind/sd-daemon/sd-daemon.c \
693 src/libelogind/sd-login/sd-login.c \
694 src/libelogind/sd-path/sd-path.c \
695 src/libelogind/sd-network/sd-network.c \
696 src/libelogind/sd-network/network-util.h \
697 src/libelogind/sd-network/network-util.c \
698 src/libelogind/sd-device/device-internal.h \
699 src/libelogind/sd-device/device-util.h \
700 src/libelogind/sd-device/sd-device.c \
701 src/libelogind/sd-device/device-private.c \
702 src/libelogind/sd-device/device-private.h
704 nodist_libelogind_internal_la_SOURCES = \
705 src/libelogind/libelogind.sym
707 libelogind_internal_la_CFLAGS = \
712 src/libelogind/libelogind.sym
715 libelogind_internal_la_LIBADD = \
718 libelogind_internal_la_LDFLAGS = \
720 -version-info $(LIBELOGIND_CURRENT):$(LIBELOGIND_REVISION):$(LIBELOGIND_AGE) \
721 -Wl,--version-script=$(top_builddir)/src/libelogind/libelogind.sym
723 libelogind-install-hook:
724 libname=libelogind.so && $(move-to-rootlibdir)
726 libelogind-uninstall-hook:
727 rm -f $(DESTDIR)$(rootlibdir)/libelogind.so*
729 INSTALL_EXEC_HOOKS += libelogind-install-hook
730 UNINSTALL_EXEC_HOOKS += libelogind-uninstall-hook
732 pkgconfiglib_DATA += \
733 src/libelogind/libelogind.pc
735 pkginclude_HEADERS += \
736 src/systemd/sd-login.h
738 # ------------------------------------------------------------------------------
743 nodist_elogind_SOURCES = \
744 src/login/logind-gperf.c
749 libelogind_core_la_SOURCES = \
750 src/login/logind-core.c \
751 src/login/logind-device.c \
752 src/login/logind-device.h \
753 src/login/logind-button.c \
754 src/login/logind-button.h \
755 src/login/logind-action.c \
756 src/login/logind-action.h \
757 src/login/logind-seat.c \
758 src/login/logind-seat.h \
759 src/login/logind-session.c \
760 src/login/logind-session.h \
761 src/login/logind-session-device.c \
762 src/login/logind-session-device.h \
763 src/login/logind-user.c \
764 src/login/logind-user.h \
765 src/login/logind-inhibit.c \
766 src/login/logind-inhibit.h \
767 src/login/logind-dbus.c \
768 src/login/logind-session-dbus.c \
769 src/login/logind-seat-dbus.c \
770 src/login/logind-user-dbus.c \
771 src/login/logind-acl.h
773 libelogind_core_la_LIBADD = \
775 libelogind-internal.la
778 libelogind_core_la_SOURCES += \
779 src/login/logind-acl.c
781 libelogind_core_la_LIBADD += \
785 noinst_LTLIBRARIES += \
788 rootlibexec_PROGRAMS += \
792 src/login/loginctl.c \
793 src/login/sysfs-show.h \
794 src/login/sysfs-show.c
798 libelogind-internal.la \
801 rootbin_PROGRAMS += \
804 dist_bashcompletion_DATA += \
805 shell-completion/bash/loginctl
807 dist_zshcompletion_DATA += \
808 shell-completion/zsh/_loginctl
810 systemd_inhibit_SOURCES = \
813 systemd_inhibit_LDADD = \
814 libelogind-internal.la \
817 rootbin_PROGRAMS += \
820 test_login_SOURCES = \
821 src/libelogind/sd-login/test-login.c
824 libelogind-internal.la \
827 test_login_shared_SOURCES = \
828 src/login/test-login-shared.c
830 test_login_shared_LDADD = \
831 libelogind-internal.la \
834 test_inhibit_SOURCES = \
835 src/login/test-inhibit.c
837 test_inhibit_LDADD = \
838 libelogind-internal.la \
841 test_login_tables_SOURCES = \
842 src/login/test-login-tables.c
844 test_login_tables_LDADD = \
856 pam_elogind_la_SOURCES = \
857 src/login/pam_elogind.sym \
858 src/login/pam_elogind.c
860 pam_elogind_la_CFLAGS = \
865 pam_elogind_la_LDFLAGS = \
871 -Wl,--version-script=$(top_srcdir)/src/login/pam_elogind.sym
873 pam_elogind_la_LIBADD = \
874 libelogind-internal.la \
877 pamlib_LTLIBRARIES = \
880 dist_pamconf_DATA = \
881 src/login/elogind-user
885 dist_dbussystemservice_DATA += \
886 src/login/org.freedesktop.login1.service
888 dist_dbuspolicy_DATA += \
889 src/login/org.freedesktop.login1.conf
891 dist_pkgsysconf_DATA += \
892 src/login/logind.conf
894 polkitpolicy_files += \
895 src/login/org.freedesktop.login1.policy
900 SYSTEM_UNIT_ALIASES += \
901 elogind.service dbus-org.freedesktop.login1.service
903 dist_udevrules_DATA = \
904 src/login/70-uaccess.rules \
905 src/login/70-power-switch.rules
907 nodist_udevrules_DATA = \
908 src/login/71-seat.rules \
909 src/login/73-seat-late.rules
911 polkitpolicy_in_files += \
912 src/login/org.freedesktop.login1.policy.in
914 gperf_gperf_sources = \
915 src/login/logind-gperf.gperf
918 src/login/71-seat.rules.in \
919 src/login/73-seat-late.rules.in
921 # ------------------------------------------------------------------------------
923 '|rootlibexecdir=$(rootlibexecdir)|' \
924 '|rootbindir=$(rootbindir)|' \
925 '|bindir=$(bindir)|' \
926 '|pkgsysconfdir=$(pkgsysconfdir)|' \
927 '|pkgdatadir=$(pkgdatadir)|' \
928 '|udevrulesdir=$(udevrulesdir)|' \
929 '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
930 '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
931 '|PACKAGE_URL=$(PACKAGE_URL)|' \
932 '|prefix=$(prefix)|' \
933 '|exec_prefix=$(exec_prefix)|' \
934 '|libdir=$(libdir)|' \
935 '|includedir=$(includedir)|' \
936 '|VERSION=$(VERSION)|' \
937 '|rootprefix=$(rootprefix)|' \
938 '|MKDIR_P=$(MKDIR_P)|' \
939 '|VARLOGDIR=$(varlogdir)|' \
940 '|systemuidmax=$(SYSTEM_UID_MAX)|' \
941 '|systemgidmax=$(SYSTEM_GID_MAX)|'
944 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
945 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
954 sysctl.d/%: sysctl.d/%.in
963 src/%.policy.in: src/%.policy.in.in
966 shell-completion/%: shell-completion/%.in
977 $(AM_V_GEN)chmod +x $@
980 $(AM_V_at)$(MKDIR_P) $(dir $@)
981 $(AM_V_GPERF)$(GPERF) < $< > $@
984 $(AM_V_at)$(MKDIR_P) $(dir $@)
985 $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
987 sysusers.d/%: sysusers.d/%.m4
988 $(AM_V_at)$(MKDIR_P) $(dir $@)
989 $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
991 tmpfiles.d/%: tmpfiles.d/%.m4
992 $(AM_V_at)$(MKDIR_P) $(dir $@)
993 $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
997 $(AM_V_at)$(MKDIR_P) $(dir $@)
998 $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_SYSTEM=1 < $< > $@
1000 units/user/%: units/user/%.m4
1001 $(AM_V_at)$(MKDIR_P) $(dir $@)
1002 $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_USER=1 < $< > $@
1005 nodist_polkitpolicy_DATA = \
1006 $(polkitpolicy_files) \
1007 $(polkitpolicy_in_in_files:.policy.in.in=.policy)
1011 $(polkitpolicy_in_files) \
1012 $(polkitpolicy_in_in_files)
1014 # ------------------------------------------------------------------------------
1016 man/custom-entities.ent: configure.ac
1017 $(AM_V_GEN)$(MKDIR_P) $(dir $@)
1018 $(AM_V_GEN)(echo '<?xml version="1.0" encoding="utf-8" ?>' && \
1019 printf '$(subst '|,<!ENTITY ,$(subst =, ",$(subst |',">\n,$(substitutions))))') \
1023 man/custom-entities.ent
1028 --stringparam man.output.quietly 1 \
1029 --stringparam funcsynopsis.style ansi \
1030 --stringparam man.authors.section.enabled 0 \
1031 --stringparam man.copyright.section.enabled 0 \
1032 --stringparam elogind.version $(VERSION) \
1033 --path '$(builddir)/man:$(srcdir)/man'
1035 XSLTPROC_PROCESS_MAN = \
1036 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-man.xsl $<
1038 XSLTPROC_PROCESS_HTML = \
1039 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
1041 man/%.1: man/%.xml man/custom-man.xsl man/custom-entities.ent
1042 $(XSLTPROC_PROCESS_MAN)
1044 man/%.3: man/%.xml man/custom-man.xsl man/custom-entities.ent
1045 $(XSLTPROC_PROCESS_MAN)
1047 man/%.5: man/%.xml man/custom-man.xsl man/custom-entities.ent
1048 $(XSLTPROC_PROCESS_MAN)
1050 man/%.7: man/%.xml man/custom-man.xsl man/custom-entities.ent
1051 $(XSLTPROC_PROCESS_MAN)
1053 man/%.8: man/%.xml man/custom-man.xsl man/custom-entities.ent
1054 $(XSLTPROC_PROCESS_MAN)
1056 man/%.html: man/%.xml man/custom-html.xsl man/custom-entities.ent
1057 $(XSLTPROC_PROCESS_HTML)
1060 $(AM_V_LN)$(LN_S) -f $(notdir $<) $@
1066 man/custom-html.xsl \
1069 install-exec-hook: $(INSTALL_EXEC_HOOKS)
1071 uninstall-hook: $(UNINSTALL_DATA_HOOKS) $(UNINSTALL_EXEC_HOOKS)
1073 install-data-hook: $(INSTALL_DATA_HOOKS)
1075 distclean-local: $(DISTCLEAN_LOCAL_HOOKS)
1077 clean-local: $(CLEAN_LOCAL_HOOKS)
1078 rm -rf $(abs_srcdir)/install-tree
1080 DISTCHECK_CONFIGURE_FLAGS = \
1081 --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
1082 --with-dbussessionservicedir=$$dc_install_base/$(dbussessionservicedir) \
1083 --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
1084 --with-bashcompletiondir=$$dc_install_base/$(bashcompletiondir) \
1085 --with-zshcompletiondir=$$dc_install_base/$(zshcompletiondir) \
1086 --with-pamlibdir=$$dc_install_base/$(pamlibdir) \
1087 --with-pamconfdir=$$dc_install_base/$(pamconfdir) \
1088 --with-rootprefix=$$dc_install_base \
1089 --disable-split-usr \
1093 DISTCHECK_CONFIGURE_FLAGS += \