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/logs-show.h \
420 src/shared/unit-name.c \
421 src/shared/unit-name.h \
422 src/shared/watchdog.c \
423 src/shared/watchdog.h \
424 src/shared/replace-var.c \
425 src/shared/replace-var.h \
426 src/shared/spawn-polkit-agent.c \
427 src/shared/spawn-polkit-agent.h \
428 src/shared/clock-util.c \
429 src/shared/clock-util.h \
430 src/shared/calendarspec.c \
431 src/shared/calendarspec.h \
432 src/shared/fileio.c \
433 src/shared/fileio.h \
434 src/shared/output-mode.h \
435 src/shared/MurmurHash2.c \
436 src/shared/MurmurHash2.h \
437 src/shared/acpi-fpdt.h \
438 src/shared/acpi-fpdt.c \
441 src/shared/smack-util.c \
442 src/shared/smack-util.h \
443 src/shared/apparmor-util.c \
444 src/shared/apparmor-util.h \
445 src/shared/ima-util.c \
446 src/shared/ima-util.h \
447 src/shared/ptyfwd.c \
448 src/shared/ptyfwd.h \
449 src/shared/errno-list.c \
450 src/shared/errno-list.h \
451 src/shared/af-list.c \
452 src/shared/af-list.h \
453 src/shared/arphrd-list.c \
454 src/shared/arphrd-list.h \
455 src/shared/cap-list.c \
456 src/shared/cap-list.h \
463 src/shared/selinux-util.c \
464 src/shared/selinux-util.h \
467 src/shared/socket-label.c \
468 src/shared/mkdir-label.c \
469 src/shared/fileio-label.h \
470 src/shared/fileio-label.c \
471 src/shared/bus-label.c \
472 src/shared/bus-label.h \
474 src/shared/clean-ipc.h \
475 src/shared/clean-ipc.c \
476 src/shared/login-shared.c \
477 src/shared/login-shared.h \
480 src/shared/barrier.c \
481 src/shared/barrier.h \
486 src/shared/base-filesystem.c \
487 src/shared/base-filesystem.h \
488 src/shared/memfd-util.c \
489 src/shared/memfd-util.h \
490 src/shared/uid-range.c \
491 src/shared/uid-range.h \
492 src/shared/nss-util.h \
495 src/shared/sigbus.c \
496 src/shared/sigbus.h \
498 src/shared/import-util.c \
499 src/shared/import-util.h \
500 src/shared/sysctl-util.c \
501 src/shared/sysctl-util.h
503 nodist_libelogind_shared_la_SOURCES = \
504 src/shared/errno-from-name.h \
505 src/shared/errno-to-name.h \
506 src/shared/af-from-name.h \
507 src/shared/af-to-name.h \
508 src/shared/arphrd-from-name.h \
509 src/shared/arphrd-to-name.h \
510 src/shared/cap-from-name.h \
511 src/shared/cap-to-name.h
513 libelogind_shared_la_CFLAGS = \
519 libelogind_shared_la_LIBADD = \
523 # ------------------------------------------------------------------------------
525 noinst_LTLIBRARIES += \
528 libelogind_acl_la_SOURCES = \
529 src/shared/acl-util.c \
530 src/shared/acl-util.h
532 libelogind_acl_la_CFLAGS = \
536 libelogind_acl_la_LIBADD = \
540 gperf_txt_sources = \
541 src/shared/errno-list.txt \
542 src/shared/af-list.txt \
543 src/shared/arphrd-list.txt \
544 src/shared/cap-list.txt
547 $(gperf_gperf_sources:-gperf.gperf=-gperf.c) \
548 $(gperf_txt_sources:-list.txt=-from-name.h) \
549 $(gperf_txt_sources:-list.txt=-to-name.h)
552 $(gperf_txt_sources:-list.txt=-from-name.gperf)
557 $(gperf_gperf_m4_sources) \
558 $(gperf_gperf_sources) \
559 $(gperf_txt_sources:-list.txt=-from-name.gperf)
564 %-from-name.gperf: %-list.txt
565 $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct $(notdir $*)_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' <$< >$@
567 %-from-name.h: %-from-name.gperf
568 $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_$(notdir $*) -H hash_$(notdir $*)_name -p -C <$< >$@
571 src/shared/errno-list.txt:
572 $(AM_V_at)$(MKDIR_P) $(dir $@)
573 $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include errno.h - </dev/null | $(AWK) '/^#define[ \t]+E[^ _]+[ \t]+/ { print $$2; }' >$@
575 src/shared/errno-to-name.h: src/shared/errno-list.txt
576 $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const errno_names[] = { "} !/EDEADLOCK/ && !/EWOULDBLOCK/ && !/ENOTSUP/ { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
579 src/shared/af-list.txt:
580 $(AM_V_at)$(MKDIR_P) $(dir $@)
581 $(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; }' >$@
583 src/shared/af-to-name.h: src/shared/af-list.txt
584 $(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 "};"}' <$< >$@
587 src/shared/arphrd-list.txt:
588 $(AM_V_at)$(MKDIR_P) $(dir $@)
589 $(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_//' >$@
591 src/shared/arphrd-to-name.h: src/shared/arphrd-list.txt
592 $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const arphrd_names[] = { "} !/CISCO/ { printf "[ARPHRD_%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
594 src/shared/arphrd-from-name.gperf: src/shared/arphrd-list.txt
595 $(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 }' <$< >$@
598 src/shared/cap-list.txt:
599 $(AM_V_at)$(MKDIR_P) $(dir $@)
600 $(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 >$@
602 src/shared/cap-to-name.h: src/shared/cap-list.txt
603 $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const capability_names[] = { "} { printf "[%s] = \"%s\",\n", $$1, tolower($$1) } END{print "};"}' <$< >$@
605 src/shared/cap-from-name.gperf: src/shared/cap-list.txt
606 $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct capability_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' <$< >$@
608 src/shared/cap-from-name.h: src/shared/cap-from-name.gperf
609 $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_capability -H hash_capability_name -p -C <$< >$@
611 # ------------------------------------------------------------------------------
612 dist_factory_etc_DATA =
615 dist_factory_pam_DATA = \
616 factory/etc/pam.d/system-auth \
617 factory/etc/pam.d/other
620 # ------------------------------------------------------------------------------
621 noinst_LTLIBRARIES += \
622 libelogind-internal.la
624 libelogind_internal_la_SOURCES = \
625 src/systemd/sd-bus.h \
626 src/systemd/sd-bus-protocol.h \
627 src/systemd/sd-bus-vtable.h \
628 src/systemd/sd-utf8.h \
629 src/systemd/sd-event.h \
630 src/systemd/sd-rtnl.h \
631 src/systemd/sd-resolve.h \
632 src/systemd/sd-login.h \
633 src/systemd/sd-id128.h \
634 src/systemd/sd-daemon.h \
635 src/systemd/sd-path.h \
636 src/systemd/sd-network.h \
637 src/systemd/sd-device.h \
638 src/libelogind/sd-bus/sd-bus.c \
639 src/libelogind/sd-bus/bus-control.c \
640 src/libelogind/sd-bus/bus-control.h \
641 src/libelogind/sd-bus/bus-error.c \
642 src/libelogind/sd-bus/bus-error.h \
643 src/libelogind/sd-bus/bus-common-errors.h \
644 src/libelogind/sd-bus/bus-common-errors.c \
645 src/libelogind/sd-bus/bus-internal.c \
646 src/libelogind/sd-bus/bus-internal.h \
647 src/libelogind/sd-bus/bus-socket.c \
648 src/libelogind/sd-bus/bus-socket.h \
649 src/libelogind/sd-bus/bus-kernel.c \
650 src/libelogind/sd-bus/bus-kernel.h \
651 src/libelogind/sd-bus/bus-container.c \
652 src/libelogind/sd-bus/bus-container.h \
653 src/libelogind/sd-bus/bus-message.c \
654 src/libelogind/sd-bus/bus-message.h \
655 src/libelogind/sd-bus/bus-creds.c \
656 src/libelogind/sd-bus/bus-creds.h \
657 src/libelogind/sd-bus/bus-signature.c \
658 src/libelogind/sd-bus/bus-signature.h \
659 src/libelogind/sd-bus/bus-type.c \
660 src/libelogind/sd-bus/bus-type.h \
661 src/libelogind/sd-bus/bus-match.c \
662 src/libelogind/sd-bus/bus-match.h \
663 src/libelogind/sd-bus/bus-bloom.c \
664 src/libelogind/sd-bus/bus-bloom.h \
665 src/libelogind/sd-bus/bus-introspect.c \
666 src/libelogind/sd-bus/bus-introspect.h \
667 src/libelogind/sd-bus/bus-objects.c \
668 src/libelogind/sd-bus/bus-objects.h \
669 src/libelogind/sd-bus/bus-gvariant.c \
670 src/libelogind/sd-bus/bus-gvariant.h \
671 src/libelogind/sd-bus/bus-convenience.c \
672 src/libelogind/sd-bus/bus-track.c \
673 src/libelogind/sd-bus/bus-track.h \
674 src/libelogind/sd-bus/bus-util.c \
675 src/libelogind/sd-bus/bus-util.h \
676 src/libelogind/sd-bus/bus-slot.c \
677 src/libelogind/sd-bus/bus-slot.h \
678 src/libelogind/sd-bus/bus-protocol.h \
679 src/libelogind/sd-bus/kdbus.h \
680 src/libelogind/sd-utf8/sd-utf8.c \
681 src/libelogind/sd-event/sd-event.c \
682 src/libelogind/sd-event/event-util.h \
683 src/libelogind/sd-rtnl/sd-rtnl.c \
684 src/libelogind/sd-rtnl/rtnl-internal.h \
685 src/libelogind/sd-rtnl/rtnl-message.c \
686 src/libelogind/sd-rtnl/rtnl-types.h \
687 src/libelogind/sd-rtnl/rtnl-types.c \
688 src/libelogind/sd-rtnl/rtnl-util.h \
689 src/libelogind/sd-rtnl/rtnl-util.c \
690 src/libelogind/sd-rtnl/local-addresses.h \
691 src/libelogind/sd-rtnl/local-addresses.c \
692 src/libelogind/sd-id128/sd-id128.c \
693 src/libelogind/sd-daemon/sd-daemon.c \
694 src/libelogind/sd-login/sd-login.c \
695 src/libelogind/sd-path/sd-path.c \
696 src/libelogind/sd-network/sd-network.c \
697 src/libelogind/sd-network/network-util.h \
698 src/libelogind/sd-network/network-util.c \
699 src/libelogind/sd-device/device-internal.h \
700 src/libelogind/sd-device/device-util.h \
701 src/libelogind/sd-device/sd-device.c \
702 src/libelogind/sd-device/device-private.c \
703 src/libelogind/sd-device/device-private.h
705 nodist_libelogind_internal_la_SOURCES = \
706 src/libelogind/libelogind.sym
708 libelogind_internal_la_CFLAGS = \
713 src/libelogind/libelogind.sym
716 libelogind_internal_la_LIBADD = \
719 libelogind_internal_la_LDFLAGS = \
725 libelogind_la_SOURCES =
727 libelogind_la_CFLAGS = \
730 libelogind_la_LDFLAGS = \
732 -version-info $(LIBELOGIND_CURRENT):$(LIBELOGIND_REVISION):$(LIBELOGIND_AGE) \
733 -Wl,--version-script=src/libelogind/libelogind.sym
735 libelogind_la_LIBADD = \
736 libelogind-internal.la
738 libelogind-install-hook:
739 libname=libelogind.so && $(move-to-rootlibdir)
741 libelogind-uninstall-hook:
742 rm -f $(DESTDIR)$(rootlibdir)/libelogind.so*
744 INSTALL_EXEC_HOOKS += libelogind-install-hook
745 UNINSTALL_EXEC_HOOKS += libelogind-uninstall-hook
747 pkgconfiglib_DATA += \
748 src/libelogind/libelogind.pc
750 pkginclude_HEADERS += \
751 src/systemd/sd-login.h \
752 src/systemd/sd-messages.h \
753 src/systemd/sd-journal.h \
754 src/systemd/_sd-common.h
757 src/libelogind/libelogind.sym.m4 \
758 src/libelogind/libelogind.pc.in \
759 src/libelogind/sd-bus/DIFFERENCES \
760 src/libelogind/sd-bus/GVARIANT-SERIALIZATION
763 src/libelogind/libelogind.sym
766 src/libelogind/libelogind.sym
769 # ------------------------------------------------------------------------------
774 nodist_elogind_SOURCES = \
775 src/login/logind-gperf.c
780 libelogind_core_la_SOURCES = \
781 src/login/logind-core.c \
782 src/login/logind-device.c \
783 src/login/logind-device.h \
784 src/login/logind-button.c \
785 src/login/logind-button.h \
786 src/login/logind-action.c \
787 src/login/logind-action.h \
788 src/login/logind-seat.c \
789 src/login/logind-seat.h \
790 src/login/logind-session.c \
791 src/login/logind-session.h \
792 src/login/logind-session-device.c \
793 src/login/logind-session-device.h \
794 src/login/logind-user.c \
795 src/login/logind-user.h \
796 src/login/logind-inhibit.c \
797 src/login/logind-inhibit.h \
798 src/login/logind-dbus.c \
799 src/login/logind-session-dbus.c \
800 src/login/logind-seat-dbus.c \
801 src/login/logind-user-dbus.c \
802 src/login/logind-acl.h
804 libelogind_core_la_LIBADD = \
806 libelogind-internal.la
809 libelogind_core_la_SOURCES += \
810 src/login/logind-acl.c
812 libelogind_core_la_LIBADD += \
816 noinst_LTLIBRARIES += \
819 rootlibexec_PROGRAMS += \
823 src/login/loginctl.c \
824 src/login/sysfs-show.h \
825 src/login/sysfs-show.c
829 libelogind-internal.la \
832 rootbin_PROGRAMS += \
835 dist_bashcompletion_DATA += \
836 shell-completion/bash/loginctl
838 dist_zshcompletion_DATA += \
839 shell-completion/zsh/_loginctl
841 systemd_inhibit_SOURCES = \
844 systemd_inhibit_LDADD = \
845 libelogind-internal.la \
848 rootbin_PROGRAMS += \
851 test_login_SOURCES = \
852 src/libelogind/sd-login/test-login.c
855 libelogind-internal.la \
858 test_login_shared_SOURCES = \
859 src/login/test-login-shared.c
861 test_login_shared_LDADD = \
862 libelogind-internal.la \
865 test_inhibit_SOURCES = \
866 src/login/test-inhibit.c
868 test_inhibit_LDADD = \
869 libelogind-internal.la \
872 test_login_tables_SOURCES = \
873 src/login/test-login-tables.c \
874 src/shared/test-tables.h
876 test_login_tables_LDADD = \
888 pam_elogind_la_SOURCES = \
889 src/login/pam_elogind.sym \
890 src/login/pam_elogind.c
892 pam_elogind_la_CFLAGS = \
897 pam_elogind_la_LDFLAGS = \
903 -Wl,--version-script=$(top_srcdir)/src/login/pam_elogind.sym
905 pam_elogind_la_LIBADD = \
906 libelogind-internal.la \
909 pamlib_LTLIBRARIES = \
912 dist_pamconf_DATA = \
913 src/login/elogind-user
917 dist_dbussystemservice_DATA += \
918 src/login/org.freedesktop.login1.service
920 dist_dbuspolicy_DATA += \
921 src/login/org.freedesktop.login1.conf
923 dist_pkgsysconf_DATA += \
924 src/login/logind.conf
926 polkitpolicy_files += \
927 src/login/org.freedesktop.login1.policy
932 SYSTEM_UNIT_ALIASES += \
933 elogind.service dbus-org.freedesktop.login1.service
935 dist_udevrules_DATA = \
936 src/login/70-uaccess.rules \
937 src/login/70-power-switch.rules
939 nodist_udevrules_DATA = \
940 src/login/71-seat.rules \
941 src/login/73-seat-late.rules
943 polkitpolicy_in_files += \
944 src/login/org.freedesktop.login1.policy.in
946 gperf_gperf_sources = \
947 src/login/logind-gperf.gperf
950 src/login/71-seat.rules.in \
951 src/login/73-seat-late.rules.in
953 # ------------------------------------------------------------------------------
955 '|rootlibexecdir=$(rootlibexecdir)|' \
956 '|rootbindir=$(rootbindir)|' \
957 '|bindir=$(bindir)|' \
958 '|pkgsysconfdir=$(pkgsysconfdir)|' \
959 '|pkgdatadir=$(pkgdatadir)|' \
960 '|udevrulesdir=$(udevrulesdir)|' \
961 '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
962 '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
963 '|PACKAGE_URL=$(PACKAGE_URL)|' \
964 '|prefix=$(prefix)|' \
965 '|exec_prefix=$(exec_prefix)|' \
966 '|libdir=$(libdir)|' \
967 '|includedir=$(includedir)|' \
968 '|VERSION=$(VERSION)|' \
969 '|rootprefix=$(rootprefix)|' \
970 '|MKDIR_P=$(MKDIR_P)|' \
971 '|VARLOGDIR=$(varlogdir)|' \
972 '|systemuidmax=$(SYSTEM_UID_MAX)|' \
973 '|systemgidmax=$(SYSTEM_GID_MAX)|'
976 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
977 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
986 sysctl.d/%: sysctl.d/%.in
995 src/%.policy.in: src/%.policy.in.in
998 shell-completion/%: shell-completion/%.in
1009 $(AM_V_GEN)chmod +x $@
1011 src/%.c: src/%.gperf
1012 $(AM_V_at)$(MKDIR_P) $(dir $@)
1013 $(AM_V_GPERF)$(GPERF) < $< > $@
1016 $(AM_V_at)$(MKDIR_P) $(dir $@)
1017 $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
1019 sysusers.d/%: sysusers.d/%.m4
1020 $(AM_V_at)$(MKDIR_P) $(dir $@)
1021 $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
1023 tmpfiles.d/%: tmpfiles.d/%.m4
1024 $(AM_V_at)$(MKDIR_P) $(dir $@)
1025 $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
1029 $(AM_V_at)$(MKDIR_P) $(dir $@)
1030 $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_SYSTEM=1 < $< > $@
1032 units/user/%: units/user/%.m4
1033 $(AM_V_at)$(MKDIR_P) $(dir $@)
1034 $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_USER=1 < $< > $@
1037 nodist_polkitpolicy_DATA = \
1038 $(polkitpolicy_files) \
1039 $(polkitpolicy_in_in_files:.policy.in.in=.policy)
1043 $(polkitpolicy_in_files) \
1044 $(polkitpolicy_in_in_files)
1046 # ------------------------------------------------------------------------------
1048 man/custom-entities.ent: configure.ac
1049 $(AM_V_GEN)$(MKDIR_P) $(dir $@)
1050 $(AM_V_GEN)(echo '<?xml version="1.0" encoding="utf-8" ?>' && \
1051 printf '$(subst '|,<!ENTITY ,$(subst =, ",$(subst |',">\n,$(substitutions))))') \
1055 man/custom-entities.ent
1060 --stringparam man.output.quietly 1 \
1061 --stringparam funcsynopsis.style ansi \
1062 --stringparam man.authors.section.enabled 0 \
1063 --stringparam man.copyright.section.enabled 0 \
1064 --stringparam elogind.version $(VERSION) \
1065 --path '$(builddir)/man:$(srcdir)/man'
1067 XSLTPROC_PROCESS_MAN = \
1068 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-man.xsl $<
1070 XSLTPROC_PROCESS_HTML = \
1071 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
1073 man/%.1: man/%.xml man/custom-man.xsl man/custom-entities.ent
1074 $(XSLTPROC_PROCESS_MAN)
1076 man/%.3: man/%.xml man/custom-man.xsl man/custom-entities.ent
1077 $(XSLTPROC_PROCESS_MAN)
1079 man/%.5: man/%.xml man/custom-man.xsl man/custom-entities.ent
1080 $(XSLTPROC_PROCESS_MAN)
1082 man/%.7: man/%.xml man/custom-man.xsl man/custom-entities.ent
1083 $(XSLTPROC_PROCESS_MAN)
1085 man/%.8: man/%.xml man/custom-man.xsl man/custom-entities.ent
1086 $(XSLTPROC_PROCESS_MAN)
1088 man/%.html: man/%.xml man/custom-html.xsl man/custom-entities.ent
1089 $(XSLTPROC_PROCESS_HTML)
1092 $(AM_V_LN)$(LN_S) -f $(notdir $<) $@
1098 man/custom-html.xsl \
1101 install-exec-hook: $(INSTALL_EXEC_HOOKS)
1103 uninstall-hook: $(UNINSTALL_DATA_HOOKS) $(UNINSTALL_EXEC_HOOKS)
1105 install-data-hook: $(INSTALL_DATA_HOOKS)
1107 distclean-local: $(DISTCLEAN_LOCAL_HOOKS)
1109 clean-local: $(CLEAN_LOCAL_HOOKS)
1110 rm -rf $(abs_srcdir)/install-tree
1112 DISTCHECK_CONFIGURE_FLAGS = \
1113 --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
1114 --with-dbussessionservicedir=$$dc_install_base/$(dbussessionservicedir) \
1115 --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
1116 --with-bashcompletiondir=$$dc_install_base/$(bashcompletiondir) \
1117 --with-zshcompletiondir=$$dc_install_base/$(zshcompletiondir) \
1118 --with-pamlibdir=$$dc_install_base/$(pamlibdir) \
1119 --with-pamconfdir=$$dc_install_base/$(pamconfdir) \
1120 --with-rootprefix=$$dc_install_base \
1121 --disable-split-usr \
1125 DISTCHECK_CONFIGURE_FLAGS += \