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 dbussystemservicedir=@dbussystemservicedir@
49 pamconfdir=@pamconfdir@
50 pkgconfigdatadir=$(datadir)/pkgconfig
51 pkgconfiglibdir=$(libdir)/pkgconfig
52 polkitpolicydir=$(datadir)/polkit-1/actions
53 polkitrulesdir=$(datadir)/polkit-1/rules.d
54 polkitpkladir=$(localstatedir)/lib/polkit-1/localauthority/10-vendor.d
55 bashcompletiondir=@bashcompletiondir@
56 zshcompletiondir=@zshcompletiondir@
58 CGROUP_CONTROLLER=@cgroup_controller@
59 PKTTYAGENT=$(bindir)/pkttyagent
61 # Our own, non-special dirs
62 pkgsysconfdir=$(sysconfdir)/elogind
63 pkgincludedir=$(includedir)/elogind/systemd
64 udevrulesdir=@udevrulesdir@
65 udevbindir=@udevbindir@
66 udevlibexecdir=$(udevbindir)
67 udevhomedir=$(udevlibexecdir)
68 factory_pamdir = $(datadir)/factory/etc/pam.d
70 # And these are the special ones for /
72 rootprefix=@rootprefix@
73 rootbindir=$(rootprefix)/bin
74 rootlibdir=@rootlibdir@
75 rootlibexecdir=@rootlibexecdir@
76 systemshutdowndir=$(rootlibexecdir)/system-shutdown
77 systemsleepdir=$(rootlibexecdir)/system-sleep
82 UNINSTALL_EXEC_HOOKS =
83 DISTCLEAN_LOCAL_HOOKS =
90 polkitpolicy_in_files =
95 nodist_udevrules_DATA =
96 dist_pkgsysconf_DATA =
97 nodist_pkgsysconf_DATA =
98 dist_dbuspolicy_DATA =
99 dist_dbussystemservice_DATA =
102 dist_rootlibexec_DATA =
103 rootlib_LTLIBRARIES =
108 noinst_PROGRAMS = $(manual_tests) $(tests) $(unsafe_tests)
110 if ENABLE_UNSAFE_TESTS
119 if ENABLE_BASH_COMPLETION
120 dist_bashcompletion_DATA = $(dist_bashcompletion_data)
122 if ENABLE_ZSH_COMPLETION
123 dist_zshcompletion_DATA = $(dist_zshcompletion_data)
126 in_files = $(filter %.in,$(EXTRA_DIST))
127 in_in_files = $(filter %.in.in, $(in_files))
128 m4_files = $(filter %.m4,$(EXTRA_DIST) $(in_files:.m4.in=.m4))
130 CLEANFILES = $(BUILT_SOURCES) \
131 $(pkgconfiglib_DATA) \
132 $(in_files:.in=) $(in_in_files:.in.in=) \
135 .PHONY: $(INSTALL_EXEC_HOOKS) $(UNINSTALL_EXEC_HOOKS) \
136 $(DISTCLEAN_LOCAL_HOOKS) $(CLEAN_LOCAL_HOOKS)
139 -include $(top_builddir)/config.h \
140 -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\" \
141 -DSYSTEMD_CGROUP_CONTROLLER=\"_$(CGROUP_CONTROLLER)\" \
142 -DSYSTEMD_CGROUP_CONTROLLER_LEGACY=\"name=$(CGROUP_CONTROLLER)\" \
143 -DSYSTEMD_CGROUP_CONTROLLER_HYBRID=\"name=$(CGROUP_CONTROLLER)\" \
144 -DSYSTEMD_CGROUP_AGENT_PATH=\"$(rootlibexecdir)/elogind-cgroups-agent\" \
145 -DSYSTEMD_BINARY_PATH=\"$(rootlibexecdir)/elogind\" \
146 -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\" \
147 -DPOLKIT_AGENT_BINARY_PATH=\"$(PKTTYAGENT)\" \
148 -DSYSTEM_SLEEP_PATH=\"$(systemsleepdir)\" \
149 -DSYSTEM_SHUTDOWN_PATH=\"$(systemshutdowndir)\" \
151 -DREBOOT=\"$(REBOOT)\" \
152 -DKEXEC=\"$(KEXEC)\" \
153 -DLIBDIR=\"$(libdir)\" \
154 -DROOTLIBDIR=\"$(rootlibdir)\" \
155 -DROOTLIBEXECDIR=\"$(rootlibexecdir)\" \
156 -DTEST_DIR=\"$(abs_top_srcdir)/test\" \
157 -I $(top_srcdir)/src \
158 -I $(top_builddir)/src/basic \
159 -I $(top_srcdir)/src/basic \
160 -I $(top_srcdir)/src/core \
161 -I $(top_srcdir)/src/shared \
162 -I $(top_builddir)/src/shared \
163 -I $(top_srcdir)/src/login \
164 -I $(top_srcdir)/src/systemd \
165 -I $(top_srcdir)/src/libelogind/sd-bus \
166 -I $(top_srcdir)/src/libelogind/sd-event \
167 -I $(top_srcdir)/src/libelogind/sd-login \
168 -I $(top_srcdir)/src/libelogind/sd-id128 \
169 -I $(top_srcdir)/src/update-utmp \
170 -I $(top_srcdir)/src/sleep \
171 -DABS_SRC_DIR=\"$(abs_top_srcdir)\" \
172 -DABS_BUILD_DIR=\"$(abs_top_builddir)\" \
175 AM_CFLAGS = $(OUR_CFLAGS)
176 AM_LDFLAGS = $(OUR_LDFLAGS)
178 # ------------------------------------------------------------------------------
179 install-touch-usr-hook:
180 touch -c $(DESTDIR)/$(prefix)
182 INSTALL_EXEC_HOOKS += \
183 install-touch-usr-hook
186 # ------------------------------------------------------------------------------
187 AM_V_M4 = $(AM_V_M4_$(V))
188 AM_V_M4_ = $(AM_V_M4_$(AM_DEFAULT_VERBOSITY))
189 AM_V_M4_0 = @echo " M4 " $@;
191 AM_V_XSLT = $(AM_V_XSLT_$(V))
192 AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
193 AM_V_XSLT_0 = @echo " XSLT " $@;
195 AM_V_GPERF = $(AM_V_GPERF_$(V))
196 AM_V_GPERF_ = $(AM_V_GPERF_$(AM_DEFAULT_VERBOSITY))
197 AM_V_GPERF_0 = @echo " GPERF " $@;
199 AM_V_LN = $(AM_V_LN_$(V))
200 AM_V_LN_ = $(AM_V_LN_$(AM_DEFAULT_VERBOSITY))
201 AM_V_LN_0 = @echo " LN " $@;
203 AM_V_RM = $(AM_V_RM_$(V))
204 AM_V_RM_ = $(AM_V_RM_$(AM_DEFAULT_VERBOSITY))
205 AM_V_RM_0 = @echo " RM " $@;
207 # ------------------------------------------------------------------------------
209 rootlibexec_PROGRAMS =
217 @INTLTOOL_POLICY_RULE@
219 # ------------------------------------------------------------------------------
224 include Makefile-man.am
226 .PHONY: man update-man-list
227 man: $(MANPAGES) $(MANPAGES_ALIAS) $(HTML_FILES) $(HTML_ALIAS)
230 ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
232 ${XML_FILES:.xml=.html}
234 ${patsubst %.1,%.html,${patsubst %.3,%.html,${patsubst %.5,%.html,${patsubst %.7,%.html,${patsubst %.8,%.html,$(MANPAGES_ALIAS)}}}}}
254 $(AM_V_at)$(MKDIR_P) $(dir $@)
255 $(AM_V_LN)$(LN_S) -f ../../man $@
257 man/index.html: man/elogind.index.html
258 $(AM_V_LN)$(LN_S) -f elogind.index.html $@
270 XML_GLOB := $(wildcard $(top_srcdir)/man/*.xml)
271 DIRECTIVE_FILE := man/elogind.directives.xml
272 INDEX_XML_FILE := man/elogind.index.xml
273 NON_INDEX_XML_FILES := $(DIRECTIVE_FILE) $(filter-out $(INDEX_XML_FILE) $(DIRECTIVE_FILE),$(XML_FILES))
274 ALL_XML_FILES := $(INDEX_XML_FILE) $(DIRECTIVE_FILE) $(filter-out $(INDEX_XML_FILE) $(DIRECTIVE_FILE),$(XML_GLOB))
275 SOURCE_XML_FILES := ${patsubst %,$(top_srcdir)/%,$(filter-out $(DIRECTIVE_FILE),$(NON_INDEX_XML_FILES))}
277 # This target should only be run manually. It recreates Makefile-man.am
278 # file in the source directory based on all man/*.xml files. Run it after
279 # adding, removing, or changing the conditional in a man page.
280 update-man-list: $(top_srcdir)/tools/make-man-rules.py $(ALL_XML_FILES) man/custom-entities.ent
281 $(AM_V_GEN)$(PYTHON) $< $(ALL_XML_FILES) > $(top_srcdir)/Makefile-man.tmp
282 $(AM_V_at)mv $(top_srcdir)/Makefile-man.tmp $(top_srcdir)/Makefile-man.am
283 @echo "Makefile-man.am has been regenerated"
285 $(INDEX_XML_FILE): $(top_srcdir)/tools/make-man-index.py $(NON_INDEX_XML_FILES)
286 $(AM_V_at)$(MKDIR_P) $(dir $@)
287 $(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^)
289 $(DIRECTIVE_FILE): $(top_srcdir)/tools/make-directive-index.py man/custom-entities.ent $(SOURCE_XML_FILES)
290 $(AM_V_at)$(MKDIR_P) $(dir $@)
291 $(AM_V_GEN)$(PYTHON) $< $@ $(SOURCE_XML_FILES)
298 $(filter-out $(DIRECTIVE_FILE) $(INDEX_XML_FILE),$(XML_FILES)) \
299 tools/make-man-index.py \
300 tools/make-man-rules.py \
301 tools/make-directive-index.py \
302 tools/xml_helper.py \
303 man/glib-event-glue.c
305 # ------------------------------------------------------------------------------
306 noinst_LTLIBRARIES += \
309 libbasic_la_SOURCES = \
310 src/basic/missing.h \
311 src/basic/capability-util.c \
312 src/basic/capability-util.h \
313 src/basic/conf-files.c \
314 src/basic/conf-files.h \
315 src/basic/stdio-util.h \
316 src/basic/hostname-util.h \
317 src/basic/hostname-util.c \
318 src/basic/unit-name.c \
319 src/basic/unit-name.h \
320 src/basic/unaligned.h \
323 src/basic/io-util.c \
324 src/basic/io-util.h \
325 src/basic/string-util.c \
326 src/basic/string-util.h \
327 src/basic/parse-util.c \
328 src/basic/parse-util.h \
329 src/basic/fd-util.c \
330 src/basic/fd-util.h \
331 src/basic/user-util.c \
332 src/basic/user-util.h \
333 src/basic/dirent-util.c \
334 src/basic/dirent-util.h \
335 src/basic/xattr-util.c \
336 src/basic/xattr-util.h \
337 src/basic/proc-cmdline.c \
338 src/basic/proc-cmdline.h \
339 src/basic/fs-util.c \
340 src/basic/fs-util.h \
341 src/basic/syslog-util.c \
342 src/basic/syslog-util.h \
343 src/basic/stat-util.c \
344 src/basic/stat-util.h \
345 src/basic/mount-util.c \
346 src/basic/mount-util.h \
347 src/basic/hexdecoct.c \
348 src/basic/hexdecoct.h \
349 src/basic/extract-word.c \
350 src/basic/extract-word.h \
353 src/basic/path-util.c \
354 src/basic/path-util.h \
355 src/basic/parse-printf-format.c \
356 src/basic/parse-printf-format.h \
357 src/basic/time-util.c \
358 src/basic/time-util.h \
359 src/basic/locale-util.c \
360 src/basic/locale-util.h \
361 src/basic/umask-util.h \
362 src/basic/signal-util.c \
363 src/basic/signal-util.h \
364 src/basic/string-table.c \
365 src/basic/string-table.h \
366 src/basic/mempool.c \
367 src/basic/mempool.h \
368 src/basic/hashmap.c \
369 src/basic/hashmap.h \
370 src/basic/hash-funcs.c \
371 src/basic/hash-funcs.h \
372 src/basic/siphash24.c \
373 src/basic/siphash24.h \
378 src/basic/env-util.c \
379 src/basic/env-util.h \
382 src/basic/bus-label.c \
383 src/basic/bus-label.h \
384 src/basic/exec-util.c \
385 src/basic/exec-util.h \
388 src/basic/smack-util.c \
389 src/basic/smack-util.h \
392 src/basic/gunicode.c \
393 src/basic/gunicode.h \
394 src/basic/socket-util.c \
395 src/basic/socket-util.h \
400 src/basic/cgroup-util.c \
401 src/basic/cgroup-util.h \
402 src/basic/errno-list.c \
403 src/basic/errno-list.h \
404 src/basic/terminal-util.c \
405 src/basic/terminal-util.h \
406 src/basic/login-util.h \
407 src/basic/login-util.c \
408 src/basic/audit-util.c \
409 src/basic/audit-util.h \
410 src/basic/memfd-util.c \
411 src/basic/memfd-util.h \
412 src/basic/process-util.c \
413 src/basic/process-util.h \
414 src/basic/random-util.c \
415 src/basic/random-util.h \
420 src/basic/selinux-util.c \
421 src/basic/selinux-util.h \
422 src/basic/mkdir-label.c \
423 src/basic/fileio-label.c \
424 src/basic/fileio-label.h \
429 src/basic/alloc-util.h \
430 src/basic/alloc-util.c \
431 src/basic/format-util.h \
435 nodist_libbasic_la_SOURCES = \
436 src/basic/errno-from-name.h \
437 src/basic/errno-to-name.h
439 libbasic_la_CFLAGS = \
445 libbasic_la_LDFLAGS = \
448 libbasic_la_LIBADD = \
454 # -----------------------------------------------------------------------------
455 noinst_LTLIBRARIES += \
458 libshared_la_SOURCES = \
459 src/shared/udev-util.h \
460 src/shared/udev-util.c \
461 src/shared/bus-util.c \
462 src/shared/bus-util.h \
463 src/shared/clean-ipc.c \
464 src/shared/clean-ipc.h \
465 src/shared/conf-parser.c \
466 src/shared/conf-parser.h \
467 src/shared/musl_missing.h \
468 src/shared/musl_missing.c \
471 src/shared/sleep-config.c \
472 src/shared/sleep-config.h \
473 src/shared/spawn-polkit-agent.c \
474 src/shared/spawn-polkit-agent.h \
477 src/shared/nsflags.h \
481 libshared_la_SOURCES += \
482 src/shared/acl-util.c \
483 src/shared/acl-util.h
486 libshared_la_CFLAGS = \
490 libshared_la_LIBADD = \
491 libelogind-internal.la \
496 noinst_LTLIBRARIES += \
499 libelogind_shared_la_SOURCES = \
500 $(libbasic_la_SOURCES) \
501 $(libshared_la_SOURCES) \
502 $(libelogind_internal_la_SOURCES)
504 libelogind_shared_la_CFLAGS = \
506 $(libbasic_la_CFLAGS) \
507 $(libshared_la_CFLAGS) \
508 $(libelogind_internal_la_CFLAGS) \
509 $(libelogind_journal_internal_la_CFLAGS) \
510 $(libudev_internal_la_CFLAGS) \
515 # We can't use libshared_la_LIBADD here because it would
516 # pull in libelogind*-internal.la
517 libelogind_shared_la_LIBADD = \
518 $(libbasic_la_LIBADD) \
519 $(libelogind_internal_la_LIBADD) \
524 libelogind_shared_la_LDFLAGS = \
526 # -----------------------------------------------------------------------------
527 gperf_txt_sources = \
528 src/basic/errno-list.txt
531 $(gperf_gperf_m4_sources:-gperf.gperf.m4=-gperf.c) \
532 $(gperf_gperf_sources:-gperf.gperf=-gperf.c) \
533 $(gperf_txt_sources:-list.txt=-from-name.h) \
534 $(gperf_txt_sources:-list.txt=-to-name.h)
537 $(gperf_txt_sources:-list.txt=-from-name.gperf)
542 $(gperf_gperf_m4_sources) \
543 $(gperf_gperf_sources)
548 %-from-name.gperf: %-list.txt
549 $(AM_V_at)$(MKDIR_P) $(dir $@)
550 $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct $(notdir $*)_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' <$< >$@
552 %-from-name.h: %-from-name.gperf
553 $(AM_V_at)$(MKDIR_P) $(dir $@)
554 $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_$(notdir $*) -H hash_$(notdir $*)_name -p -C <$< >$@
557 src/basic/errno-list.txt:
558 $(AM_V_at)$(MKDIR_P) $(dir $@)
559 $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include errno.h - </dev/null | $(AWK) '/^#define[ \t]+E[^ _]+[ \t]+/ { print $$2; }' >$@
561 src/basic/errno-to-name.h: src/basic/errno-list.txt
562 $(AM_V_at)$(MKDIR_P) $(dir $@)
563 $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const errno_names[] = { "} !/EDEADLOCK/ && !/EWOULDBLOCK/ && !/ENOTSUP/ { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
565 # ------------------------------------------------------------------------------
594 test-strip-tab-ansi \
611 test/bus-policy/hello.conf \
612 test/bus-policy/methods.conf \
613 test/bus-policy/ownerships.conf \
614 test/bus-policy/signals.conf \
615 test/bus-policy/check-own-rules.conf \
616 test/bus-policy/many-rules.conf \
617 test/bus-policy/test.conf
621 src/test/test-helper.h
623 test_utf8_SOURCES = \
629 test_locale_util_SOURCES = \
630 src/test/test-locale-util.c
632 test_locale_util_LDADD = \
635 test_copy_SOURCES = \
638 # Link statically to ensure file is large
642 test_random_util_SOURCES = \
643 src/test/test-random-util.c
645 test_random_util_LDADD = \
648 test_util_SOURCES = \
654 test_exec_util_SOURCES = \
655 src/test/test-exec-util.c
657 test_exec_util_LDADD = \
660 test_hexdecoct_SOURCES = \
661 src/test/test-hexdecoct.c
663 test_hexdecoct_LDADD = \
666 test_alloc_util_SOURCES = \
667 src/test/test-alloc-util.c
669 test_alloc_util_LDADD = \
672 test_io_util_SOURCES = \
673 src/test/test-io-util.c
675 test_io_util_LDADD = \
678 test_fs_util_SOURCES = \
679 src/test/test-fs-util.c
681 test_fs_util_LDADD = \
684 test_proc_cmdline_SOURCES = \
685 src/test/test-proc-cmdline.c
687 test_proc_cmdline_LDADD = \
690 test_fd_util_SOURCES = \
691 src/test/test-fd-util.c
693 test_fd_util_LDADD = \
696 test_stat_util_SOURCES = \
697 src/test/test-stat-util.c
699 test_stat_util_LDADD = \
702 test_escape_SOURCES = \
703 src/test/test-escape.c
705 test_escape_LDADD = \
708 test_string_util_SOURCES = \
709 src/test/test-string-util.c
711 test_string_util_LDADD = \
714 test_extract_word_SOURCES = \
715 src/test/test-extract-word.c
717 test_extract_word_LDADD = \
720 test_parse_util_SOURCES = \
721 src/test/test-parse-util.c
723 test_parse_util_LDADD = \
726 test_user_util_SOURCES = \
727 src/test/test-user-util.c
729 test_user_util_LDADD = \
732 test_process_util_SOURCES = \
733 src/test/test-process-util.c
735 test_process_util_LDADD = \
738 test_verbs_SOURCES = \
739 src/test/test-verbs.c
744 test_signal_util_SOURCES = \
745 src/test/test-signal-util.c
747 test_signal_util_LDADD = \
750 test_selinux_SOURCES = \
751 src/test/test-selinux.c
753 test_selinux_LDADD = \
756 test_sizeof_SOURCES = \
757 src/test/test-sizeof.c
760 src/test/test-hashmap-ordered.c
762 src/test/test-hashmap-ordered.c: src/test/test-hashmap-plain.c
763 $(AM_V_at)$(MKDIR_P) $(dir $@)
764 $(AM_V_GEN)$(AWK) 'BEGIN { print "/* GENERATED FILE */\n#define ORDERED" } \
765 { if (!match($$0, "^#include")) \
766 gsub(/hashmap/, "ordered_hashmap"); \
767 gsub(/HASHMAP/, "ORDERED_HASHMAP"); \
768 gsub(/Hashmap/, "OrderedHashmap"); \
771 nodist_test_hashmap_SOURCES = \
772 src/test/test-hashmap-ordered.c
774 test_hashmap_SOURCES = \
775 src/test/test-hashmap.c \
776 src/test/test-hashmap-plain.c
778 test_hashmap_LDADD = \
787 test_list_SOURCES = \
793 test_unaligned_LDADD = \
796 test_unaligned_SOURCES = \
797 src/test/test-unaligned.c
799 test_prioq_SOURCES = \
800 src/test/test-prioq.c
811 test_ipcrm_SOURCES = \
812 src/test/test-ipcrm.c
817 test_ellipsize_SOURCES = \
818 src/test/test-ellipsize.c
820 test_ellipsize_LDADD = \
823 test_strip_tab_ansi_SOURCES = \
824 src/test/test-strip-tab-ansi.c
826 test_strip_tab_ansi_LDADD = \
829 test_cgroup_SOURCES = \
830 src/test/test-cgroup.c
832 test_cgroup_LDADD = \
835 test_path_util_SOURCES = \
836 src/test/test-path-util.c
838 test_path_util_LDADD = \
841 test_siphash24_SOURCES = \
842 src/test/test-siphash24.c
844 test_siphash24_LDADD = \
847 test_conf_files_SOURCES = \
848 src/test/test-conf-files.c
850 test_conf_files_LDADD = \
853 test_conf_parser_SOURCES = \
854 src/test/test-conf-parser.c
856 test_conf_parser_LDADD = \
859 # ------------------------------------------------------------------------------
860 ## .PHONY so it always rebuilds it
861 .PHONY: coverage lcov-run lcov-report coverage-sync
863 # run lcov from scratch, always
868 coverage_dir = coverage
869 coverage_opts = --base-directory $(srcdir) --directory $(builddir) --rc 'geninfo_adjust_src_path=$(abspath $(srcdir))=>$(abspath $(builddir))'
872 # reset run coverage tests
874 @rm -rf $(coverage_dir)
875 lcov $(coverage_opts) --zerocounters
878 # generate report based on current coverage data
880 $(MKDIR_P) $(coverage_dir)
881 lcov $(coverage_opts) --compat-libtool --capture --no-external \
882 | sed 's|$(abspath $(builddir))|$(abspath $(srcdir))|' > $(coverage_dir)/.lcov.info
883 lcov --remove $(coverage_dir)/.lcov.info --output-file $(coverage_dir)/.lcov-clean.info 'test-*'
884 genhtml -t "systemd test coverage" -o $(coverage_dir) $(coverage_dir)/.lcov-clean.info
885 @echo "Coverage report generated in $(abs_builddir)/$(coverage_dir)/index.html"
887 # lcov doesn't work properly with vpath builds, make sure that bad
888 # output is not uploaded by mistake.
889 coverage-sync: coverage
890 test "$(builddir)" = "$(srcdir)"
891 rsync -rlv --delete --omit-dir-times coverage/ $(www_target)/coverage
894 lcov-run lcov-report:
895 echo "Need to reconfigure with --enable-coverage"
898 # ------------------------------------------------------------------------------
901 dist_factory_pam_DATA = \
902 factory/etc/pam.d/system-auth \
903 factory/etc/pam.d/other
906 # ------------------------------------------------------------------------------
907 rootlibexec_PROGRAMS += \
908 elogind-cgroups-agent
910 elogind_cgroups_agent_SOURCES = \
911 src/cgroups-agent/cgroups-agent.c
913 elogind_cgroups_agent_LDADD = \
916 # ------------------------------------------------------------------------------
917 libelogind_internal_la_SOURCES = \
918 src/systemd/sd-bus.h \
919 src/systemd/sd-bus-protocol.h \
920 src/systemd/sd-bus-vtable.h \
921 src/systemd/sd-event.h \
922 src/systemd/sd-login.h \
923 src/systemd/sd-id128.h \
924 src/systemd/sd-daemon.h \
925 src/libelogind/libelogind.sym \
926 src/libelogind/sd-bus/sd-bus.c \
927 src/libelogind/sd-bus/bus-control.c \
928 src/libelogind/sd-bus/bus-control.h \
929 src/libelogind/sd-bus/bus-error.c \
930 src/libelogind/sd-bus/bus-error.h \
931 src/libelogind/sd-bus/bus-common-errors.h \
932 src/libelogind/sd-bus/bus-common-errors.c \
933 src/libelogind/sd-bus/bus-internal.c \
934 src/libelogind/sd-bus/bus-internal.h \
935 src/libelogind/sd-bus/bus-socket.c \
936 src/libelogind/sd-bus/bus-socket.h \
937 src/libelogind/sd-bus/bus-kernel.c \
938 src/libelogind/sd-bus/bus-kernel.h \
939 src/libelogind/sd-bus/bus-container.c \
940 src/libelogind/sd-bus/bus-container.h \
941 src/libelogind/sd-bus/bus-message.c \
942 src/libelogind/sd-bus/bus-message.h \
943 src/libelogind/sd-bus/bus-creds.c \
944 src/libelogind/sd-bus/bus-creds.h \
945 src/libelogind/sd-bus/bus-signature.c \
946 src/libelogind/sd-bus/bus-signature.h \
947 src/libelogind/sd-bus/bus-type.c \
948 src/libelogind/sd-bus/bus-type.h \
949 src/libelogind/sd-bus/bus-match.c \
950 src/libelogind/sd-bus/bus-match.h \
951 src/libelogind/sd-bus/bus-bloom.c \
952 src/libelogind/sd-bus/bus-bloom.h \
953 src/libelogind/sd-bus/bus-introspect.c \
954 src/libelogind/sd-bus/bus-introspect.h \
955 src/libelogind/sd-bus/bus-objects.c \
956 src/libelogind/sd-bus/bus-objects.h \
957 src/libelogind/sd-bus/bus-gvariant.c \
958 src/libelogind/sd-bus/bus-gvariant.h \
959 src/libelogind/sd-bus/bus-convenience.c \
960 src/libelogind/sd-bus/bus-track.c \
961 src/libelogind/sd-bus/bus-track.h \
962 src/libelogind/sd-bus/bus-slot.c \
963 src/libelogind/sd-bus/bus-slot.h \
964 src/libelogind/sd-bus/bus-protocol.h \
965 src/libelogind/sd-event/sd-event.c \
966 src/libelogind/sd-id128/sd-id128.c \
967 src/libelogind/sd-id128/id128-util.h \
968 src/libelogind/sd-id128/id128-util.c \
969 src/libelogind/sd-daemon/sd-daemon.c \
970 src/libelogind/sd-login/sd-login.c
972 noinst_LTLIBRARIES += \
973 libelogind-internal.la
976 src/libelogind/libelogind.pc.in \
977 src/libelogind/sd-bus/GVARIANT-SERIALIZATION
979 libelogind_la_SOURCES =
981 libelogind_la_LDFLAGS = \
983 -version-info $(LIBELOGIND_CURRENT):$(LIBELOGIND_REVISION):$(LIBELOGIND_AGE) \
984 -Wl,--version-script=$(top_srcdir)/src/libelogind/libelogind.sym
986 libelogind_la_LIBADD = \
987 libelogind-internal.la \
990 pkgconfiglib_DATA += \
991 src/libelogind/libelogind.pc
993 pkginclude_HEADERS += \
994 src/systemd/sd-bus.h \
995 src/systemd/sd-bus-protocol.h \
996 src/systemd/sd-bus-vtable.h \
997 src/systemd/_sd-common.h \
998 src/systemd/sd-daemon.h \
999 src/systemd/sd-event.h \
1000 src/systemd/sd-id128.h \
1001 src/systemd/sd-login.h \
1002 src/systemd/sd-messages.h
1004 header-install-hook:
1005 $(MKDIR_P) $(DESTDIR)/$(pkgincludedir)
1006 cd $(DESTDIR)/$(includedir)/elogind && \
1007 for hdr in $(notdir $(pkginclude_HEADERS)) ; do \
1009 $(LN_S) systemd/$$hdr $$hdr ; \
1012 header-uninstall-hook:
1013 m -f $(DESTDIR)/$(includedir)/elogind/*.h
1015 INSTALL_EXEC_HOOKS += header-install-hook
1016 UNINSTALL_EXEC_HOOKS += header-uninstall-hook
1018 rootlib_LTLIBRARIES += \
1022 test-bus-signature \
1025 test-bus-introspect \
1030 test_bus_signature_SOURCES = \
1031 src/libelogind/sd-bus/test-bus-signature.c
1033 test_bus_signature_LDADD = \
1034 libelogind-shared.la
1036 test_bus_server_SOURCES = \
1037 src/libelogind/sd-bus/test-bus-server.c
1039 test_bus_server_LDADD = \
1040 libelogind-shared.la
1042 test_bus_vtable_SOURCES = \
1043 src/libelogind/sd-bus/test-bus-vtable.c
1045 test_bus_vtable_LDADD = \
1046 libelogind-shared.la
1048 test_bus_error_SOURCES = \
1049 src/libelogind/sd-bus/test-bus-error.c
1051 # Link statically because this test uses BUS_ERROR_MAP_ELF_REGISTER
1052 test_bus_error_LDADD = \
1055 test_bus_match_SOURCES = \
1056 src/libelogind/sd-bus/test-bus-match.c
1058 test_bus_match_LDADD = \
1059 libelogind-shared.la
1061 test_bus_introspect_SOURCES = \
1062 src/libelogind/sd-bus/test-bus-introspect.c
1064 test_bus_introspect_LDADD = \
1065 libelogind-shared.la
1067 test_event_SOURCES = \
1068 src/libelogind/sd-event/test-event.c
1070 test_event_LDADD = \
1071 libelogind-shared.la
1073 # ------------------------------------------------------------------------------
1074 test_id128_SOURCES = \
1075 src/test/test-id128.c
1077 test_id128_LDADD = \
1078 libelogind-shared.la
1083 # ------------------------------------------------------------------------------
1084 test_hash_SOURCES = \
1085 src/test/test-hash.c
1088 libelogind-shared.la
1093 # ------------------------------------------------------------------------------
1095 src/login/logind.c \
1098 nodist_elogind_SOURCES = \
1099 src/login/logind-gperf.c
1104 libelogind_core_la_SOURCES = \
1107 src/core/mount-setup.h \
1108 src/core/mount-setup.c \
1109 src/login/elogind.c \
1110 src/login/elogind.h \
1111 src/login/elogind-dbus.c \
1112 src/login/elogind-dbus.h \
1113 src/login/logind-core.c \
1114 src/login/logind-device.c \
1115 src/login/logind-device.h \
1116 src/login/logind-button.c \
1117 src/login/logind-button.h \
1118 src/login/logind-action.c \
1119 src/login/logind-action.h \
1120 src/login/logind-seat.c \
1121 src/login/logind-seat.h \
1122 src/login/logind-session.c \
1123 src/login/logind-session.h \
1124 src/login/logind-session-device.c \
1125 src/login/logind-session-device.h \
1126 src/login/logind-user.c \
1127 src/login/logind-user.h \
1128 src/login/logind-inhibit.c \
1129 src/login/logind-inhibit.h \
1130 src/login/logind-dbus.c \
1131 src/login/logind-session-dbus.c \
1132 src/login/logind-seat-dbus.c \
1133 src/login/logind-user-dbus.c \
1134 src/login/logind-utmp.c \
1135 src/login/logind-acl.h \
1140 libelogind_core_la_SOURCES += \
1141 src/shared/utmp-wtmp.c \
1142 src/update-utmp/update-utmp.c
1145 libelogind_core_la_LIBADD = \
1146 libelogind-shared.la
1149 libelogind_core_la_SOURCES += \
1150 src/login/logind-acl.c
1153 noinst_LTLIBRARIES += \
1156 rootlibexec_PROGRAMS += \
1159 loginctl_SOURCES = \
1160 src/login/eloginctl.c \
1161 src/login/eloginctl.h \
1162 src/login/loginctl.c \
1163 src/login/sysfs-show.h \
1164 src/login/sysfs-show.c
1167 libelogind-shared.la
1169 rootbin_PROGRAMS += \
1172 dist_bashcompletion_data = \
1173 shell-completion/bash/loginctl
1175 dist_zshcompletion_data = \
1176 shell-completion/zsh/_loginctl \
1177 shell-completion/zsh/_elogind-inhibit
1179 elogind_inhibit_SOURCES = \
1182 elogind_inhibit_LDADD = \
1183 libelogind-shared.la
1185 rootbin_PROGRAMS += \
1188 test_login_SOURCES = \
1189 src/libelogind/sd-login/test-login.c
1191 test_login_LDADD = \
1192 libelogind-shared.la
1194 test_login_shared_SOURCES = \
1195 src/login/test-login-shared.c
1197 test_login_shared_LDADD = \
1198 libelogind-shared.la
1200 test_inhibit_SOURCES = \
1201 src/login/test-inhibit.c
1203 test_inhibit_LDADD = \
1204 libelogind-shared.la
1206 test_login_tables_SOURCES = \
1207 src/login/test-login-tables.c
1209 test_login_tables_LDADD = \
1221 pam_elogind_la_SOURCES = \
1222 src/login/pam_elogind.sym \
1223 src/login/pam_elogind.c
1225 pam_elogind_la_CFLAGS = \
1229 pam_elogind_la_LDFLAGS = \
1235 -Wl,--version-script=$(top_srcdir)/src/login/pam_elogind.sym
1237 pam_elogind_la_LIBADD = \
1241 pamlib_LTLIBRARIES = \
1244 if ENABLE_PAM_CONFIG
1245 dist_pamconf_DATA = \
1246 src/login/elogind-user
1250 src/login/elogind-user.m4
1253 dist_dbussystemservice_DATA += \
1254 src/login/org.freedesktop.login1.service
1256 dist_dbuspolicy_DATA += \
1257 src/login/org.freedesktop.login1.conf
1259 nodist_pkgsysconf_DATA += \
1260 src/login/logind.conf
1262 polkitpolicy_files += \
1263 src/login/org.freedesktop.login1.policy
1265 dist_udevrules_DATA += \
1266 src/login/70-uaccess.rules \
1267 src/login/70-power-switch.rules
1269 nodist_udevrules_DATA += \
1270 src/login/71-seat.rules \
1271 src/login/73-seat-late.rules
1273 polkitpolicy_in_files += \
1274 src/login/org.freedesktop.login1.policy.in
1276 gperf_gperf_sources = \
1277 src/login/logind-gperf.gperf
1280 src/login/71-seat.rules.in \
1281 src/login/73-seat-late.rules.in \
1282 src/login/logind.conf.in \
1283 src/login/org.freedesktop.login1.service.in
1285 # ------------------------------------------------------------------------------
1287 '|rootlibdir=$(rootlibdir)|' \
1288 '|rootlibexecdir=$(rootlibexecdir)|' \
1289 '|rootbindir=$(rootbindir)|' \
1290 '|bindir=$(bindir)|' \
1291 '|pkgsysconfdir=$(pkgsysconfdir)|' \
1292 '|pkgdatadir=$(pkgdatadir)|' \
1293 '|udevrulesdir=$(udevrulesdir)|' \
1294 '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
1295 '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
1296 '|PACKAGE_URL=$(PACKAGE_URL)|' \
1297 '|prefix=$(prefix)|' \
1298 '|exec_prefix=$(exec_prefix)|' \
1299 '|libdir=$(libdir)|' \
1300 '|includedir=$(includedir)|' \
1301 '|rootprefix=$(rootprefix)|' \
1302 '|udevlibexecdir=$(udevlibexecdir)|' \
1304 '|MKDIR_P=$(MKDIR_P)|' \
1305 '|KILL_USER_PROCESSES=$(KILL_USER_PROCESSES)|' \
1306 '|systemuidmax=$(SYSTEM_UID_MAX)|' \
1307 '|systemgidmax=$(SYSTEM_GID_MAX)|'
1310 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1311 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
1318 sysctl.d/%: sysctl.d/%.in
1324 shell-completion/%: shell-completion/%.in
1333 %.login1.service: %.login1.service.in
1338 $(AM_V_GEN)chmod +x $@
1340 src/%.c: src/%.gperf
1341 $(AM_V_at)$(MKDIR_P) $(dir $@)
1342 $(AM_V_GPERF)$(GPERF) < $< > $@
1345 $(AM_V_at)$(MKDIR_P) $(dir $@)
1346 $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
1348 sysusers.d/%: sysusers.d/%.m4
1349 $(AM_V_at)$(MKDIR_P) $(dir $@)
1350 $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
1352 tmpfiles.d/%: tmpfiles.d/%.m4
1353 $(AM_V_at)$(MKDIR_P) $(dir $@)
1354 $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
1358 $(AM_V_at)$(MKDIR_P) $(dir $@)
1359 $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_SYSTEM=1 < $< > $@
1361 units/user/%: units/user/%.m4
1362 $(AM_V_at)$(MKDIR_P) $(dir $@)
1363 $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_USER=1 < $< > $@
1366 nodist_polkitpolicy_DATA = \
1367 $(polkitpolicy_files)
1368 polkitrules_DATA = $(polkitrules_files)
1369 if ENABLE_POLKIT_PKLA
1370 polkitpkla_DATA = $(polkitpkla_files)
1375 $(polkitpolicy_in_files)
1377 # ------------------------------------------------------------------------------
1379 man/custom-entities.ent: configure.ac
1380 $(AM_V_GEN)$(MKDIR_P) $(dir $@)
1381 $(AM_V_GEN)(echo '<?xml version="1.0" encoding="utf-8" ?>' && \
1382 printf '$(subst '|,<!ENTITY ,$(subst =, ",$(subst |',">\n,$(substitutions))))') \
1386 man/custom-entities.ent
1391 --stringparam man.output.quietly 1 \
1392 --stringparam funcsynopsis.style ansi \
1393 --stringparam man.authors.section.enabled 0 \
1394 --stringparam man.copyright.section.enabled 0 \
1395 --stringparam elogind.version $(PACKAGE_VERSION) \
1396 --path '$(builddir)/man:$(srcdir)/man'
1398 XSLTPROC_PROCESS_MAN = \
1399 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-man.xsl $<
1401 XSLTPROC_PROCESS_HTML = \
1402 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
1404 man/%.1: man/%.xml man/custom-man.xsl man/custom-entities.ent
1405 $(XSLTPROC_PROCESS_MAN)
1407 man/%.3: man/%.xml man/custom-man.xsl man/custom-entities.ent
1408 $(XSLTPROC_PROCESS_MAN)
1410 man/%.5: man/%.xml man/custom-man.xsl man/custom-entities.ent
1411 $(XSLTPROC_PROCESS_MAN)
1413 man/%.7: man/%.xml man/custom-man.xsl man/custom-entities.ent
1414 $(XSLTPROC_PROCESS_MAN)
1416 man/%.8: man/%.xml man/custom-man.xsl man/custom-entities.ent
1417 $(XSLTPROC_PROCESS_MAN)
1419 man/%.html: man/%.xml man/custom-html.xsl man/custom-entities.ent
1420 $(XSLTPROC_PROCESS_HTML)
1423 $(AM_V_LN)$(LN_S) -f $(notdir $<) $@
1429 man/custom-html.xsl \
1432 install-exec-hook: $(INSTALL_EXEC_HOOKS)
1434 uninstall-hook: $(UNINSTALL_EXEC_HOOKS)
1436 distclean-local: $(DISTCLEAN_LOCAL_HOOKS)
1438 clean-local: $(CLEAN_LOCAL_HOOKS)
1439 rm -rf $(abs_srcdir)/install-tree
1440 rm -f $(abs_srcdir)/hwdb/usb.ids $(abs_srcdir)/hwdb/pci.ids $(abs_srcdir)/hwdb/oui.txt \
1441 $(abs_srcdir)/hwdb/iab.txt
1443 DISTCHECK_CONFIGURE_FLAGS = \
1444 --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
1445 --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
1446 --with-bashcompletiondir=$$dc_install_base/$(bashcompletiondir) \
1447 --with-zshcompletiondir=$$dc_install_base/$(zshcompletiondir) \
1448 --with-pamlibdir=$$dc_install_base/$(pamlibdir) \
1449 --with-pamconfdir=$$dc_install_base/$(pamconfdir) \
1450 --with-rootprefix=$$dc_install_base
1453 DISTCHECK_CONFIGURE_FLAGS += \
1456 DISTCHECK_CONFIGURE_FLAGS += \
1460 .PHONY: dist-check-help
1461 dist-check-help: $(rootbin_PROGRAMS)
1462 for i in $(abspath $^); do \
1463 if $$i --help | grep -v 'default:' | grep -E -q '.{80}.' ; then \
1464 echo "$(basename $$i) --help output is too wide:"; \
1465 $$i --help | awk 'length > 80' | grep -E --color=yes '.{80}'; \
1469 include_compilers = "$(CC)" "$(CC) -ansi" "$(CC) -std=iso9899:1990"
1470 public_headers = $(filter-out src/systemd/_sd-common.h, $(pkginclude_HEADERS) $(include_HEADERS))
1471 .PHONY: dist-check-includes
1472 dist-check-includes: $(public_headers)
1474 for i in $(abspath $^); do \
1475 for cc in $(include_compilers); do \
1476 echo "$$cc -o/dev/null -c -x c -include "$$i" - </dev/null"; \
1477 $$cc -o/dev/null -c -x c -include "$$i" - </dev/null || res=1; \
1485 git tag -s "v$(PACKAGE_VERSION)" -m "elogind $(PACKAGE_VERSION)"
1489 $(AM_V_at)git archive --format=tar --prefix=elogind-$(PACKAGE_VERSION)-raw/ HEAD | \
1490 (cd /var/tmp/ && tar xf -)
1491 $(AM_V_GEN)(cd /var/tmp && \
1492 rm -rf elogind-$(PACKAGE_VERSION) && \
1493 $(MKDIR_P) elogind-$(PACKAGE_VERSION) && \
1494 for f in `find elogind-$(PACKAGE_VERSION)-raw/ -type f | \
1495 cut -d '/' -f 2-` ; do \
1496 $(MKDIR_P) elogind-$(PACKAGE_VERSION)/`dirname $$f` ; \
1497 $(AWK) 'BEGIN { i=0;e=0 } \
1498 /^#if\s+0.*elogind.*$$/ { i=1;next } \
1500 { if ( i==1 ) e=1; else print }{next} \
1502 /^#endif\s*\/\/\s*0\s*$$/ { \
1503 { if ( i==1 ) { i=0;e=0 } else print }{next} \
1505 /^\s*\/\/\/.*elogind.*$$/{ next } \
1506 /^\s*\/\/\s*#include.+$$/{ next } \
1507 { if ( (i==0) || (e==1) ) print }' \
1508 elogind-$(PACKAGE_VERSION)-raw/$$f \
1509 > elogind-$(PACKAGE_VERSION)/$$f ; \
1510 chmod `stat -c '%a' elogind-$(PACKAGE_VERSION)-raw/$$f` \
1511 elogind-$(PACKAGE_VERSION)/$$f ; \
1513 for l in `find elogind-$(PACKAGE_VERSION)-raw/ -type l | \
1514 cut -d '/' -f 2-` ; do \
1515 $(MKDIR_P) elogind-$(PACKAGE_VERSION)/`dirname $$l` ; \
1516 cp -P elogind-$(PACKAGE_VERSION)-raw/$$l \
1517 elogind-$(PACKAGE_VERSION)/$$l ; \
1519 tar czf elogind-$(PACKAGE_VERSION).tar.gz elogind-$(PACKAGE_VERSION) ; \
1520 rm -rf elogind-$(PACKAGE_VERSION) elogind-$(PACKAGE_VERSION)-raw) ; \
1521 $(AM_V_at)mv /var/tmp/elogind-$(PACKAGE_VERSION).tar.gz ./
1523 .PHONY: install-tree
1525 rm -rf $(abs_srcdir)/install-tree
1526 $(MAKE) install DESTDIR=$(abs_srcdir)/install-tree
1527 tree $(abs_srcdir)/install-tree
1529 # Let's run all tests of the test suite, but under valgrind. Let's
1530 # exclude perl/python/shell scripts we have in there
1531 .PHONY: valgrind-tests
1532 valgrind-tests: $(TESTS)
1533 $(AM_V_GEN)for f in $(filter-out %.pl %.py, $^); do \
1534 if $(LIBTOOL) --mode=execute file $$f | grep -q shell; then \
1535 echo -e "$${x}Skipping non-binary $$f"; else \
1536 echo -e "$${x}Running $$f"; \
1537 $(AM_TESTS_ENVIRONMENT) $(LIBTOOL) --mode=execute valgrind -q --leak-check=full --max-stackframe=5242880 --error-exitcode=55 $(builddir)/$$f ; fi; \
1542 $(AM_V_GEN)$(NM) -g --defined-only $(builddir)/.libs/$(<:.la=.so) 2>&1 /dev/null | grep " T " | cut -d" " -f3 > $@
1544 exported: $(addprefix exported-, $(rootlib_LTLIBRARIES))
1545 $(AM_V_GEN)cat $^ > $@
1547 .PHONY: check-api-docs
1548 check-api-docs: exported man
1549 $(AM_V_GEN)for symbol in `cat exported` ; do \
1550 if test -f $(builddir)/man/$$symbol.html ; then \
1551 echo " Symbol $$symbol() is documented." ; \
1553 echo "‣ Symbol $$symbol() lacks documentation." ; \
1557 OBJECT_VARIABLES:=$(filter %_OBJECTS,$(.VARIABLES))
1558 ALL_OBJECTS:=$(foreach v,$(OBJECT_VARIABLES),$($(v)))
1560 undefined defined: $(ALL_OBJECTS)
1561 $(AM_V_GEN)for f in $(ALL_OBJECTS) ; do \
1562 $(NM) -g --$@-only `echo $(builddir)/"$$f" | sed -e 's,\([^/]*\).lo$$,.libs/\1.o,'` ; \
1563 done | cut -c 20- | cut -d @ -f 1 | sort -u > $@
1569 .PHONY: check-api-unused
1570 check-api-unused: defined undefined exported
1571 ( cat exported undefined ) | sort -u | diff -u - defined | grep ^+ | grep -v ^+++ | cut -c2-
1573 .PHONY: check-includes
1574 check-includes: $(top_srcdir)/tools/check-includes.pl
1575 $(AM_V_GEN) find * -name '*.[hcS]' -type f -print | sort -u \
1576 | xargs $(top_srcdir)/tools/check-includes.pl
1579 $(top_srcdir)/tools/check-includes.pl
1581 # Stupid test that everything purported to be exported really is
1582 define generate-sym-test
1583 $(AM_V_at)$(MKDIR_P) $(dir $@)
1584 $(AM_V_at)printf '#include <stdio.h>\n' > $@
1585 $(AM_V_at)printf '#include "%s"\n' $(notdir $(filter %.h, $^)) >> $@
1586 $(AM_V_at)printf 'void* functions[] = {\n' >> $@
1587 $(AM_V_GEN)sed -r -n 's/^ +([a-zA-Z0-9_]+);/\1,/p' $< >> $@
1588 $(AM_V_at)printf '};\nint main(void) {\n' >> $@
1589 $(AM_V_at)printf 'unsigned i; for (i=0;i<sizeof(functions)/sizeof(void*);i++) printf("%%p\\n", functions[i]);\n' >> $@
1590 $(AM_V_at)printf 'return 0; }\n' >> $@
1593 test-libelogind-sym.c: \
1594 $(top_builddir)/src/libelogind/libelogind.sym \
1595 src/systemd/sd-daemon.h \
1596 src/systemd/sd-login.h \
1597 src/systemd/sd-bus.h \
1598 src/systemd/sd-event.h
1599 $(generate-sym-test)
1601 test_libelogind_sym_SOURCES = \
1602 test-libelogind-sym.c
1603 test_libelogind_sym_LDADD = \
1607 $(test_libelogind_sym_SOURCES)
1612 .PHONY: install-tests
1613 install-tests: $(tests) $(TEST_DATA_FILES)
1614 for f in $(tests); do \
1615 if [ -x $(top_builddir)/.libs/$$f ]; then \
1616 install -D -m 755 $(top_builddir)/.libs/$$f $(DESTDIR)/$(testsdir)/$$f; \
1618 install -D -m 755 $(top_builddir)/$$f $(DESTDIR)/$(testsdir)/$$f; \
1621 for f in $(TEST_DATA_FILES); do \
1622 install -D -m 644 $(top_srcdir)/$$f $(DESTDIR)/$(testsdir)/testdata/$${f#test/}; \
1625 .PHONY: cccc cppcheck
1627 cccc --outdir=$(top_builddir)/cccc \
1628 `find $(top_srcdir)/src/ -name '*.h' -or -name '*.c'`
1631 cppcheck --enable=all -q \
1632 -I $(top_srcdir)/src \
1633 -I $(top_builddir)/src/basic \
1634 -I $(top_srcdir)/src/basic \
1635 -I $(top_srcdir)/src/core \
1636 -I $(top_srcdir)/src/shared \
1637 -I $(top_builddir)/src/shared \
1638 -I $(top_srcdir)/src/login \
1639 -I $(top_srcdir)/src/systemd \
1640 -I $(top_srcdir)/src/libelogind/sd-bus \
1641 -I $(top_srcdir)/src/libelogind/sd-event \
1642 -I $(top_srcdir)/src/libelogind/sd-login \
1643 -I $(top_srcdir)/src/libelogind/sd-id128 \
1644 -I $(top_srcdir)/src/update-utmp \
1645 -I $(top_srcdir)/src/sleep \
1649 # Used to extract compile flags for YCM.
1654 @git shortlog -s `git describe --abbrev=0`.. | cut -c8- | sed 's/ / /g' | awk '{ print $$0 "," }' | sort -u
1657 tools/gdb-sd_dump_hashmaps.py
1660 gpg --verbose --no-options --no-default-keyring --no-auto-key-locate --batch --trust-model=always --keyring=$(srcdir)/src/import/import-pubring.gpg --list-keys
1663 gpg --verbose --no-options --no-default-keyring --no-auto-key-locate --batch --trust-model=always --keyring=$(srcdir)/src/import/import-pubring.gpg --import -