chiark / gitweb /
namespace: unify limit behavior on non-directory paths
[elogind.git] / Makefile.am
1 #  -*- Mode: makefile; indent-tabs-mode: t -*-
2 #
3 #  This file is part of elogind.
4 #
5 #  Copyright 2010-2012 Lennart Poettering
6 #  Copyright 2010-2012 Kay Sievers
7 #  Copyright 2013 Zbigniew Jędrzejewski-Szmek
8 #  Copyright 2013 David Strauss
9 #
10 #  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.
14 #
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.
19 #
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/>.
22
23 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
24 AM_MAKEFLAGS = --no-print-directory
25 AUTOMAKE_OPTIONS = color-tests parallel-tests
26
27 GCC_COLORS ?= 'ooh, shiny!'
28 export GCC_COLORS
29
30 SUBDIRS = . po
31
32 # remove targets if the command fails
33 .DELETE_ON_ERROR:
34
35 # keep intermediate files
36 .SECONDARY:
37
38 # Keep the test-suite.log
39 .PRECIOUS: $(TEST_SUITE_LOG) Makefile
40
41 LIBELOGIND_CURRENT=15
42 LIBELOGIND_REVISION=0
43 LIBELOGIND_AGE=15
44
45 # Dirs of external packages
46 dbuspolicydir=@dbuspolicydir@
47 dbussystemservicedir=@dbussystemservicedir@
48 pamlibdir=@pamlibdir@
49 pamconfdir=@pamconfdir@
50 pkgconfigdatadir=$(datadir)/pkgconfig
51 pkgconfiglibdir=$(libdir)/pkgconfig
52 polkitpolicydir=$(datadir)/polkit-1/actions
53 bashcompletiondir=@bashcompletiondir@
54 zshcompletiondir=@zshcompletiondir@
55
56 CGROUP_CONTROLLER=@cgroup_controller@
57 PKTTYAGENT=$(bindir)/pkttyagent
58
59 # Our own, non-special dirs
60 pkgsysconfdir=$(sysconfdir)/elogind
61 pkgincludedir=$(includedir)/elogind/systemd
62 udevrulesdir=@udevrulesdir@
63 udevbindir=@udevbindir@
64 udevlibexecdir=$(udevbindir)
65 udevhomedir=$(udevlibexecdir)
66 systemshutdowndir=$(rootlibexecdir)/system-shutdown
67 systemsleepdir=$(rootlibexecdir)/system-sleep
68 factory_pamdir = $(datadir)/factory/etc/pam.d
69
70 # And these are the special ones for /
71 rootprefix=@rootprefix@
72 rootbindir=$(rootprefix)/bin
73 rootlibexecdir=$(rootprefix)/lib/elogind
74
75 EXTRA_DIST =
76 BUILT_SOURCES =
77 INSTALL_EXEC_HOOKS =
78 UNINSTALL_EXEC_HOOKS =
79 INSTALL_DATA_HOOKS =
80 UNINSTALL_DATA_HOOKS =
81 DISTCLEAN_LOCAL_HOOKS =
82 CLEAN_LOCAL_HOOKS =
83 pkginclude_HEADERS =
84 noinst_LTLIBRARIES =
85 lib_LTLIBRARIES =
86 noinst_DATA =
87 pkgconfiglib_DATA =
88 polkitpolicy_in_files =
89 polkitpolicy_files =
90 dist_udevrules_DATA =
91 nodist_udevrules_DATA =
92 dist_pkgsysconf_DATA =
93 nodist_pkgsysconf_DATA =
94 dist_dbuspolicy_DATA =
95 dist_dbussystemservice_DATA =
96 check_PROGRAMS =
97 check_DATA =
98 tests=
99 manual_tests =
100 if ENABLE_TESTS
101 noinst_PROGRAMS = $(manual_tests) $(tests)
102 TESTS = $(tests)
103 else
104 noinst_PROGRAMS =
105 TESTS =
106 endif
107
108 if ENABLE_BASH_COMPLETION
109 dist_bashcompletion_DATA = $(dist_bashcompletion_data)
110 endif
111 if ENABLE_ZSH_COMPLETION
112 dist_zshcompletion_DATA = $(dist_zshcompletion_data)
113 endif
114
115 in_files = $(filter %.in,$(EXTRA_DIST))
116 in_in_files = $(filter %.in.in, $(in_files))
117 m4_files = $(filter %.m4,$(EXTRA_DIST) $(in_files:.m4.in=.m4))
118
119 CLEANFILES = $(BUILT_SOURCES) \
120         $(pkgconfiglib_DATA) \
121         $(in_files:.in=) $(in_in_files:.in.in=) \
122         $(m4_files:.m4=)
123
124 .PHONY: $(INSTALL_EXEC_HOOKS) $(UNINSTALL_EXEC_HOOKS) \
125         $(INSTALL_DATA_HOOKS) $(UNINSTALL_DATA_HOOKS) \
126         $(DISTCLEAN_LOCAL_HOOKS) $(CLEAN_LOCAL_HOOKS)
127
128 AM_CPPFLAGS = \
129         -include $(top_builddir)/config.h \
130         -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\" \
131         -DSYSTEMD_CGROUP_CONTROLLER=\"$(CGROUP_CONTROLLER)\" \
132         -DSYSTEMD_CGROUP_AGENT_PATH=\"$(rootlibexecdir)/elogind-cgroups-agent\" \
133         -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\" \
134         -DPOLKIT_AGENT_BINARY_PATH=\"$(PKTTYAGENT)\" \
135         -DSYSTEM_SLEEP_PATH=\"$(systemsleepdir)\" \
136         -DSYSTEM_SHUTDOWN_PATH=\"$(systemshutdowndir)\" \
137         -DHALT=\"$(HALT)\" \
138         -DREBOOT=\"$(REBOOT)\" \
139         -DKEXEC=\"$(KEXEC)\" \
140         -DLIBDIR=\"$(libdir)\" \
141         -DROOTLIBDIR=\"$(rootlibdir)\" \
142         -DROOTLIBEXECDIR=\"$(rootlibexecdir)\" \
143         -DTEST_DIR=\"$(abs_top_srcdir)/test\" \
144         -I $(top_srcdir)/src \
145         -I $(top_builddir)/src/basic \
146         -I $(top_srcdir)/src/basic \
147         -I $(top_srcdir)/src/core \
148         -I $(top_srcdir)/src/shared \
149         -I $(top_builddir)/src/shared \
150         -I $(top_srcdir)/src/login \
151         -I $(top_srcdir)/src/systemd \
152         -I $(top_srcdir)/src/libelogind/sd-bus \
153         -I $(top_srcdir)/src/libelogind/sd-event \
154         -I $(top_srcdir)/src/libelogind/sd-login \
155         -I $(top_srcdir)/src/update-utmp \
156         $(OUR_CPPFLAGS)
157
158 AM_CFLAGS = $(OUR_CFLAGS)
159 AM_LDFLAGS = $(OUR_LDFLAGS)
160
161 # ------------------------------------------------------------------------------
162 define move-to-rootlibdir
163         if test "$(libdir)" != "$(rootlibdir)"; then \
164                 $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
165                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/$$libname) && \
166                 rm -f $(DESTDIR)$(libdir)/$$libname && \
167                 $(LN_S) --relative -f $(DESTDIR)$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/$$libname && \
168                 mv $(DESTDIR)$(libdir)/$$libname.* $(DESTDIR)$(rootlibdir); \
169         fi
170 endef
171
172 install-touch-usr-hook:
173         touch -c $(DESTDIR)/$(prefix)
174
175 INSTALL_EXEC_HOOKS += \
176         install-touch-usr-hook
177
178
179 # ------------------------------------------------------------------------------
180 AM_V_M4 = $(AM_V_M4_$(V))
181 AM_V_M4_ = $(AM_V_M4_$(AM_DEFAULT_VERBOSITY))
182 AM_V_M4_0 = @echo "  M4      " $@;
183
184 AM_V_XSLT = $(AM_V_XSLT_$(V))
185 AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
186 AM_V_XSLT_0 = @echo "  XSLT    " $@;
187
188 AM_V_GPERF = $(AM_V_GPERF_$(V))
189 AM_V_GPERF_ = $(AM_V_GPERF_$(AM_DEFAULT_VERBOSITY))
190 AM_V_GPERF_0 = @echo "  GPERF   " $@;
191
192 AM_V_LN = $(AM_V_LN_$(V))
193 AM_V_LN_ = $(AM_V_LN_$(AM_DEFAULT_VERBOSITY))
194 AM_V_LN_0 = @echo "  LN      " $@;
195
196 AM_V_RM = $(AM_V_RM_$(V))
197 AM_V_RM_ = $(AM_V_RM_$(AM_DEFAULT_VERBOSITY))
198 AM_V_RM_0 = @echo "  RM      " $@;
199
200 # ------------------------------------------------------------------------------
201 rootbin_PROGRAMS =
202 pkglibexec_PROGRAMS =
203
204 dist_doc_DATA = \
205         README \
206         NEWS \
207         LICENSE.LGPL2.1 \
208         LICENSE.GPL2
209
210 @INTLTOOL_POLICY_RULE@
211
212 # ------------------------------------------------------------------------------
213
214 MANPAGES =
215 MANPAGES_ALIAS =
216
217 include Makefile-man.am
218
219 .PHONY: man update-man-list
220 man: $(MANPAGES) $(MANPAGES_ALIAS) $(HTML_FILES) $(HTML_ALIAS)
221
222 XML_FILES = \
223         ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
224 HTML_FILES = \
225         ${XML_FILES:.xml=.html}
226 HTML_ALIAS = \
227         ${patsubst %.1,%.html,${patsubst %.3,%.html,${patsubst %.5,%.html,${patsubst %.7,%.html,${patsubst %.8,%.html,$(MANPAGES_ALIAS)}}}}}
228
229 if ENABLE_MANPAGES
230 man_MANS = \
231         $(MANPAGES) \
232         $(MANPAGES_ALIAS)
233
234 noinst_DATA += \
235         $(HTML_FILES) \
236         $(HTML_ALIAS) \
237         docs/html/man
238 endif
239
240 CLEANFILES += \
241         $(man_MANS) \
242         $(HTML_FILES) \
243         $(HTML_ALIAS) \
244         docs/html/man
245
246 docs/html/man:
247         $(AM_V_at)$(MKDIR_P) $(dir $@)
248         $(AM_V_LN)$(LN_S) -f ../../man $@
249
250 man/index.html: man/elogind.index.html
251         $(AM_V_LN)$(LN_S) -f elogind.index.html $@
252
253 if HAVE_PYTHON
254 noinst_DATA += \
255        man/index.html
256 endif
257
258 CLEANFILES += \
259        man/index.html
260
261 XML_GLOB            := $(wildcard $(top_srcdir)/man/*.xml)
262 DIRECTIVE_FILE      := man/elogind.directives.xml
263 INDEX_XML_FILE      := man/elogind.index.xml
264 NON_INDEX_XML_FILES := $(DIRECTIVE_FILE) $(filter-out $(INDEX_XML_FILE) $(DIRECTIVE_FILE),$(XML_FILES))
265 ALL_XML_FILES       := $(INDEX_XML_FILE) $(DIRECTIVE_FILE) $(filter-out $(INDEX_XML_FILE) $(DIRECTIVE_FILE),$(XML_GLOB))
266 SOURCE_XML_FILES    := ${patsubst %,$(top_srcdir)/%,$(filter-out $(DIRECTIVE_FILE),$(NON_INDEX_XML_FILES))}
267
268 # This target should only be run manually. It recreates Makefile-man.am
269 # file in the source directory based on all man/*.xml files. Run it after
270 # adding, removing, or changing the conditional in a man page.
271 update-man-list: $(top_srcdir)/tools/make-man-rules.py $(ALL_XML_FILES) man/custom-entities.ent
272         $(AM_V_GEN)$(PYTHON) $< $(ALL_XML_FILES) > $(top_srcdir)/Makefile-man.tmp
273         $(AM_V_at)mv $(top_srcdir)/Makefile-man.tmp $(top_srcdir)/Makefile-man.am
274         @echo "Makefile-man.am has been regenerated"
275
276 $(INDEX_XML_FILE): $(top_srcdir)/tools/make-man-index.py $(NON_INDEX_XML_FILES)
277         $(AM_V_at)$(MKDIR_P) $(dir $@)
278         $(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^)
279
280 $(DIRECTIVE_FILE): $(top_srcdir)/tools/make-directive-index.py man/custom-entities.ent $(SOURCE_XML_FILES)
281         $(AM_V_at)$(MKDIR_P) $(dir $@)
282         $(AM_V_GEN)$(PYTHON) $< $@ $(SOURCE_XML_FILES)
283
284 CLEANFILES += \
285        $(INDEX_XML_FILE) \
286        $(DIRECTIVE_FILE)
287
288 EXTRA_DIST += \
289         $(filter-out $(DIRECTIVE_FILE) $(INDEX_XML_FILE),$(XML_FILES)) \
290         tools/make-man-index.py \
291         tools/make-man-rules.py \
292         tools/make-directive-index.py \
293         tools/xml_helper.py \
294         man/glib-event-glue.c
295
296 # ------------------------------------------------------------------------------
297 noinst_LTLIBRARIES += \
298         libbasic.la
299
300 libbasic_la_SOURCES = \
301         src/basic/missing.h \
302         src/basic/capability-util.c \
303         src/basic/capability-util.h \
304         src/basic/conf-files.c \
305         src/basic/conf-files.h \
306         src/basic/stdio-util.h \
307         src/basic/hostname-util.h \
308         src/basic/hostname-util.c \
309         src/basic/unit-name.c \
310         src/basic/unit-name.h \
311         src/basic/unaligned.h \
312         src/basic/util.c \
313         src/basic/util.h \
314         src/basic/io-util.c \
315         src/basic/io-util.h \
316         src/basic/string-util.c \
317         src/basic/string-util.h \
318         src/basic/parse-util.c \
319         src/basic/parse-util.h \
320         src/basic/fd-util.c \
321         src/basic/fd-util.h \
322         src/basic/user-util.c \
323         src/basic/user-util.h \
324         src/basic/dirent-util.c \
325         src/basic/dirent-util.h \
326         src/basic/xattr-util.c \
327         src/basic/xattr-util.h \
328         src/basic/proc-cmdline.c \
329         src/basic/proc-cmdline.h \
330         src/basic/fs-util.c \
331         src/basic/fs-util.h \
332         src/basic/syslog-util.c \
333         src/basic/syslog-util.h \
334         src/basic/stat-util.c \
335         src/basic/stat-util.h \
336         src/basic/mount-util.c \
337         src/basic/mount-util.h \
338         src/basic/hexdecoct.c \
339         src/basic/hexdecoct.h \
340         src/basic/extract-word.c \
341         src/basic/extract-word.h \
342         src/basic/escape.c \
343         src/basic/escape.h \
344         src/basic/path-util.c \
345         src/basic/path-util.h \
346         src/basic/parse-printf-format.c \
347         src/basic/parse-printf-format.h \
348         src/basic/time-util.c \
349         src/basic/time-util.h \
350         src/basic/locale-util.c \
351         src/basic/locale-util.h \
352         src/basic/umask-util.h \
353         src/basic/signal-util.c \
354         src/basic/signal-util.h \
355         src/basic/string-table.c \
356         src/basic/string-table.h \
357         src/basic/mempool.c \
358         src/basic/mempool.h \
359         src/basic/hashmap.c \
360         src/basic/hashmap.h \
361         src/basic/hash-funcs.c \
362         src/basic/hash-funcs.h \
363         src/basic/siphash24.c \
364         src/basic/siphash24.h \
365         src/basic/prioq.c \
366         src/basic/prioq.h \
367         src/basic/strv.c \
368         src/basic/strv.h \
369         src/basic/log.c \
370         src/basic/log.h \
371         src/basic/bus-label.c \
372         src/basic/bus-label.h \
373         src/basic/virt.c \
374         src/basic/virt.h \
375         src/basic/smack-util.c \
376         src/basic/smack-util.h \
377         src/basic/utf8.c \
378         src/basic/utf8.h \
379         src/basic/gunicode.c \
380         src/basic/gunicode.h \
381         src/basic/socket-util.c \
382         src/basic/socket-util.h \
383         src/basic/fileio.c \
384         src/basic/fileio.h \
385         src/basic/mkdir.c \
386         src/basic/mkdir.h \
387         src/basic/cgroup-util.c \
388         src/basic/cgroup-util.h \
389         src/basic/errno-list.c \
390         src/basic/errno-list.h \
391         src/basic/terminal-util.c \
392         src/basic/terminal-util.h \
393         src/basic/login-util.h \
394         src/basic/login-util.c \
395         src/basic/audit-util.c \
396         src/basic/audit-util.h \
397         src/basic/memfd-util.c \
398         src/basic/memfd-util.h \
399         src/basic/process-util.c \
400         src/basic/process-util.h \
401         src/basic/random-util.c \
402         src/basic/random-util.h \
403         src/basic/verbs.c \
404         src/basic/verbs.h \
405         src/basic/label.c \
406         src/basic/label.h \
407         src/basic/selinux-util.c \
408         src/basic/selinux-util.h \
409         src/basic/mkdir-label.c \
410         src/basic/fileio-label.c \
411         src/basic/fileio-label.h \
412         src/basic/rm-rf.c \
413         src/basic/rm-rf.h \
414         src/basic/copy.c \
415         src/basic/copy.h \
416         src/basic/alloc-util.h \
417         src/basic/alloc-util.c
418
419 nodist_libbasic_la_SOURCES = \
420         src/basic/errno-from-name.h \
421         src/basic/errno-to-name.h
422
423 libbasic_la_CFLAGS = \
424         $(AM_CFLAGS) \
425         $(SELINUX_CFLAGS) \
426         $(CAP_CFLAGS) \
427         -pthread
428
429 libbasic_la_LDFLAGS = \
430         $(CAP_LDFLAGS)
431
432 libbasic_la_LIBADD = \
433         $(SELINUX_LIBS) \
434         $(CAP_LIBS) \
435         -ldl \
436         -lm
437
438 # -----------------------------------------------------------------------------
439 noinst_LTLIBRARIES += \
440         libshared.la
441
442 libshared_la_SOURCES = \
443         src/shared/bus-util.c \
444         src/shared/bus-util.h \
445         src/shared/clean-ipc.c \
446         src/shared/clean-ipc.h \
447         src/shared/conf-parser.c \
448         src/shared/conf-parser.h \
449         src/shared/musl_missing.h \
450         src/shared/musl_missing.c \
451         src/shared/pager.c \
452         src/shared/pager.h \
453         src/shared/spawn-polkit-agent.c \
454         src/shared/spawn-polkit-agent.h
455
456 if HAVE_UTMP
457 libshared_la_SOURCES += \
458         src/shared/utmp-wtmp.c \
459         src/update-utmp/update-utmp.c
460 endif
461
462 if HAVE_ACL
463 libshared_la_SOURCES += \
464         src/shared/acl-util.c \
465         src/shared/acl-util.h
466 endif
467
468 libshared_la_CFLAGS = \
469         $(AM_CFLAGS) \
470         $(ACL_CFLAGS)
471
472 libshared_la_LIBADD = \
473         libelogind-internal.la \
474         $(UDEV_LIBS) \
475         $(ACL_LIBS)
476
477 gperf_txt_sources = \
478         src/basic/errno-list.txt
479
480 BUILT_SOURCES += \
481         $(gperf_gperf_m4_sources:-gperf.gperf.m4=-gperf.c) \
482         $(gperf_gperf_sources:-gperf.gperf=-gperf.c) \
483         $(gperf_txt_sources:-list.txt=-from-name.h) \
484         $(gperf_txt_sources:-list.txt=-to-name.h)
485
486 CLEANFILES += \
487         $(gperf_txt_sources:-list.txt=-from-name.gperf)
488 DISTCLEANFILES = \
489         $(gperf_txt_sources)
490
491 EXTRA_DIST += \
492         $(gperf_gperf_m4_sources) \
493         $(gperf_gperf_sources)
494
495 CLEANFILES += \
496         $(gperf_txt_sources)
497
498 %-from-name.gperf: %-list.txt
499         $(AM_V_at)$(MKDIR_P) $(dir $@)
500         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct $(notdir $*)_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' <$< >$@
501
502 %-from-name.h: %-from-name.gperf
503         $(AM_V_at)$(MKDIR_P) $(dir $@)
504         $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_$(notdir $*) -H hash_$(notdir $*)_name -p -C <$< >$@
505
506
507 src/basic/errno-list.txt:
508         $(AM_V_at)$(MKDIR_P) $(dir $@)
509         $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include errno.h - </dev/null | $(AWK) '/^#define[ \t]+E[^ _]+[ \t]+/ { print $$2; }' >$@
510
511 src/basic/errno-to-name.h: src/basic/errno-list.txt
512         $(AM_V_at)$(MKDIR_P) $(dir $@)
513         $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const errno_names[] = { "} !/EDEADLOCK/ && !/EWOULDBLOCK/ && !/ENOTSUP/ { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
514
515
516 # ------------------------------------------------------------------------------
517
518 if HAVE_PAM
519 dist_factory_pam_DATA = \
520         factory/etc/pam.d/system-auth \
521         factory/etc/pam.d/other
522 endif
523
524 # ------------------------------------------------------------------------------
525 pkglibexec_PROGRAMS += \
526        elogind-cgroups-agent
527
528 elogind_cgroups_agent_SOURCES = \
529        src/cgroups-agent/cgroups-agent.c
530
531 elogind_cgroups_agent_LDADD = \
532        libshared.la
533
534 # ------------------------------------------------------------------------------
535 libelogind_internal_la_SOURCES = \
536         src/systemd/sd-bus.h \
537         src/systemd/sd-bus-protocol.h \
538         src/systemd/sd-bus-vtable.h \
539         src/systemd/sd-event.h \
540         src/systemd/sd-login.h \
541         src/systemd/sd-id128.h \
542         src/systemd/sd-daemon.h \
543         src/libelogind/libelogind.sym \
544         src/libelogind/sd-bus/sd-bus.c \
545         src/libelogind/sd-bus/bus-control.c \
546         src/libelogind/sd-bus/bus-control.h \
547         src/libelogind/sd-bus/bus-error.c \
548         src/libelogind/sd-bus/bus-error.h \
549         src/libelogind/sd-bus/bus-common-errors.h \
550         src/libelogind/sd-bus/bus-common-errors.c \
551         src/libelogind/sd-bus/bus-internal.c \
552         src/libelogind/sd-bus/bus-internal.h \
553         src/libelogind/sd-bus/bus-socket.c \
554         src/libelogind/sd-bus/bus-socket.h \
555         src/libelogind/sd-bus/bus-kernel.c \
556         src/libelogind/sd-bus/bus-kernel.h \
557         src/libelogind/sd-bus/bus-container.c \
558         src/libelogind/sd-bus/bus-container.h \
559         src/libelogind/sd-bus/bus-message.c \
560         src/libelogind/sd-bus/bus-message.h \
561         src/libelogind/sd-bus/bus-creds.c \
562         src/libelogind/sd-bus/bus-creds.h \
563         src/libelogind/sd-bus/bus-signature.c \
564         src/libelogind/sd-bus/bus-signature.h \
565         src/libelogind/sd-bus/bus-type.c \
566         src/libelogind/sd-bus/bus-type.h \
567         src/libelogind/sd-bus/bus-match.c \
568         src/libelogind/sd-bus/bus-match.h \
569         src/libelogind/sd-bus/bus-bloom.c \
570         src/libelogind/sd-bus/bus-bloom.h \
571         src/libelogind/sd-bus/bus-introspect.c \
572         src/libelogind/sd-bus/bus-introspect.h \
573         src/libelogind/sd-bus/bus-objects.c \
574         src/libelogind/sd-bus/bus-objects.h \
575         src/libelogind/sd-bus/bus-gvariant.c \
576         src/libelogind/sd-bus/bus-gvariant.h \
577         src/libelogind/sd-bus/bus-convenience.c \
578         src/libelogind/sd-bus/bus-track.c \
579         src/libelogind/sd-bus/bus-track.h \
580         src/libelogind/sd-bus/bus-slot.c \
581         src/libelogind/sd-bus/bus-slot.h \
582         src/libelogind/sd-bus/bus-protocol.h \
583         src/libelogind/sd-event/sd-event.c \
584         src/libelogind/sd-id128/sd-id128.c \
585         src/libelogind/sd-daemon/sd-daemon.c \
586         src/libelogind/sd-login/sd-login.c
587
588 libelogind_internal_la_LIBADD = \
589         libbasic.la \
590         -lresolv
591
592 noinst_LTLIBRARIES += \
593         libelogind-internal.la
594
595 EXTRA_DIST += \
596         src/libelogind/libelogind.pc.in \
597         src/libelogind/sd-bus/DIFFERENCES \
598         src/libelogind/sd-bus/GVARIANT-SERIALIZATION
599
600 libelogind_la_SOURCES = \
601         $(libelogind_internal_la_SOURCES)
602
603 nodist_libelogind_la_SOURCES = \
604         $(nodist_libelogind_internal_la_SOURCES)
605
606 libelogind_la_CFLAGS = \
607         $(libelogind_internal_la_CFLAGS)
608
609 libelogind_la_LDFLAGS = \
610         $(AM_LDFLAGS) \
611         -version-info $(LIBELOGIND_CURRENT):$(LIBELOGIND_REVISION):$(LIBELOGIND_AGE) \
612         -Wl,--version-script=$(top_srcdir)/src/libelogind/libelogind.sym
613
614 libelogind_la_LIBADD = \
615         $(libelogind_internal_la_LIBADD)
616
617 libelogind-install-hook:
618         libname=libelogind.so && $(move-to-rootlibdir)
619
620 libelogind-uninstall-hook:
621         rm -f $(DESTDIR)$(rootlibdir)/libelogind.so*
622
623 INSTALL_EXEC_HOOKS += libelogind-install-hook
624 UNINSTALL_EXEC_HOOKS += libelogind-uninstall-hook
625
626 pkgconfiglib_DATA += \
627         src/libelogind/libelogind.pc
628
629 pkginclude_HEADERS += \
630         src/systemd/sd-login.h \
631         src/systemd/sd-messages.h \
632         src/systemd/sd-id128.h \
633         src/systemd/_sd-common.h
634
635 header-install-hook:
636         $(MKDIR_P) $(DESTDIR)/$(pkgincludedir)
637         cd $(DESTDIR)/$(includedir)/elogind && \
638                 for hdr in $(notdir $(pkginclude_HEADERS)) ; do \
639                         rm -f $$hdr ; \
640                         $(LN_S) systemd/$$hdr $$hdr ; \
641                 done
642
643 header-uninstall-hook:
644         m -f $(DESTDIR)/$(includedir)/elogind/*.h
645
646 INSTALL_EXEC_HOOKS += header-install-hook
647 UNINSTALL_EXEC_HOOKS += header-uninstall-hook
648
649 lib_LTLIBRARIES += \
650         libelogind.la
651
652 # ------------------------------------------------------------------------------
653 elogind_SOURCES = \
654         src/login/logind.c \
655         src/login/logind.h
656
657 nodist_elogind_SOURCES = \
658         src/login/logind-gperf.c
659
660 elogind_LDADD = \
661         libelogind-core.la
662
663 libelogind_core_la_SOURCES = \
664         src/login/logind-core.c \
665         src/login/logind-device.c \
666         src/login/logind-device.h \
667         src/login/logind-button.c \
668         src/login/logind-button.h \
669         src/login/logind-action.c \
670         src/login/logind-action.h \
671         src/login/logind-seat.c \
672         src/login/logind-seat.h \
673         src/login/logind-session.c \
674         src/login/logind-session.h \
675         src/login/logind-session-device.c \
676         src/login/logind-session-device.h \
677         src/login/logind-sleep.c \
678         src/login/logind-sleep.h \
679         src/login/logind-user.c \
680         src/login/logind-user.h \
681         src/login/logind-inhibit.c \
682         src/login/logind-inhibit.h \
683         src/login/logind-dbus.c \
684         src/login/logind-session-dbus.c \
685         src/login/logind-seat-dbus.c \
686         src/login/logind-user-dbus.c \
687         src/login/logind-utmp.c \
688         src/login/logind-acl.h \
689         src/core/cgroup.h \
690         src/core/cgroup.c \
691         src/core/mount-setup.h \
692         src/core/mount-setup.c
693
694 libelogind_core_la_LIBADD = \
695         libshared.la
696
697 if HAVE_ACL
698 libelogind_core_la_SOURCES += \
699         src/login/logind-acl.c
700 endif
701
702 noinst_LTLIBRARIES += \
703         libelogind-core.la
704
705 pkglibexec_PROGRAMS += \
706         elogind
707
708 loginctl_SOURCES = \
709         src/login/loginctl.c \
710         src/login/sysfs-show.h \
711         src/login/sysfs-show.c
712
713 loginctl_LDADD = \
714         libshared.la
715
716 rootbin_PROGRAMS += \
717         loginctl
718
719 dist_bashcompletion_data = \
720         shell-completion/bash/loginctl
721
722 dist_zshcompletion_data = \
723         shell-completion/zsh/_loginctl \
724         shell-completion/zsh/_elogind-inhibit
725
726 elogind_inhibit_SOURCES = \
727         src/login/inhibit.c
728
729 elogind_inhibit_LDADD = \
730         libshared.la
731
732 rootbin_PROGRAMS += \
733         elogind-inhibit
734
735 test_login_SOURCES = \
736         src/libelogind/sd-login/test-login.c
737
738 test_login_LDADD = \
739         libshared.la
740
741 test_login_shared_SOURCES = \
742         src/login/test-login-shared.c
743
744 test_login_shared_LDADD = \
745         libshared.la
746
747 test_inhibit_SOURCES = \
748         src/login/test-inhibit.c
749
750 test_inhibit_LDADD = \
751         libshared.la
752
753 test_login_tables_SOURCES = \
754         src/login/test-login-tables.c
755
756 test_login_tables_LDADD = \
757         libelogind-core.la
758
759 manual_tests += \
760         test-login \
761         test-inhibit
762
763 tests += \
764         test-login-tables \
765         test-login-shared
766
767 if HAVE_PAM
768 pam_elogind_la_SOURCES = \
769         src/login/pam_elogind.sym \
770         src/login/pam_elogind.c
771
772 pam_elogind_la_CFLAGS = \
773         $(AM_CFLAGS) \
774         $(PAM_CFLAGS)
775
776 pam_elogind_la_LDFLAGS = \
777         $(AM_LDFLAGS) \
778         -module \
779         -export-dynamic \
780         -avoid-version \
781         -shared \
782         -Wl,--version-script=$(top_srcdir)/src/login/pam_elogind.sym
783
784 pam_elogind_la_LIBADD = \
785         libshared.la \
786         $(PAM_LIBS)
787
788 pamlib_LTLIBRARIES = \
789         pam_elogind.la
790
791 dist_pamconf_DATA = \
792         src/login/elogind-user
793
794 EXTRA_DIST += \
795         src/login/elogind-user.m4
796 endif
797
798 dist_dbussystemservice_DATA += \
799         src/login/org.freedesktop.login1.service
800
801 dist_dbuspolicy_DATA += \
802         src/login/org.freedesktop.login1.conf
803
804 nodist_pkgsysconf_DATA += \
805         src/login/logind.conf
806
807 polkitpolicy_files += \
808         src/login/org.freedesktop.login1.policy
809
810 dist_udevrules_DATA += \
811         src/login/70-uaccess.rules \
812         src/login/70-power-switch.rules
813
814 nodist_udevrules_DATA += \
815         src/login/71-seat.rules \
816         src/login/73-seat-late.rules
817
818 polkitpolicy_in_files += \
819         src/login/org.freedesktop.login1.policy.in
820
821 gperf_gperf_sources = \
822         src/login/logind-gperf.gperf
823
824 EXTRA_DIST += \
825         src/login/71-seat.rules.in \
826         src/login/73-seat-late.rules.in \
827         src/login/logind.conf.in
828
829 # ------------------------------------------------------------------------------
830 substitutions = \
831        '|rootlibexecdir=$(rootlibexecdir)|' \
832        '|rootbindir=$(rootbindir)|' \
833        '|bindir=$(bindir)|' \
834        '|pkgsysconfdir=$(pkgsysconfdir)|' \
835        '|pkgdatadir=$(pkgdatadir)|' \
836        '|udevrulesdir=$(udevrulesdir)|' \
837        '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
838        '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
839        '|PACKAGE_URL=$(PACKAGE_URL)|' \
840        '|prefix=$(prefix)|' \
841        '|exec_prefix=$(exec_prefix)|' \
842        '|libdir=$(libdir)|' \
843        '|includedir=$(includedir)|' \
844        '|VERSION=$(VERSION)|' \
845        '|rootprefix=$(rootprefix)|' \
846        '|udevlibexecdir=$(udevlibexecdir)|' \
847        '|KILL=$(KILL)|' \
848        '|MKDIR_P=$(MKDIR_P)|' \
849        '|KILL_USER_PROCESSES=$(KILL_USER_PROCESSES)|' \
850        '|systemuidmax=$(SYSTEM_UID_MAX)|' \
851        '|systemgidmax=$(SYSTEM_GID_MAX)|' \
852        '|TTY_GID=$(TTY_GID)|'
853
854 SED_PROCESS = \
855         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
856         $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
857                 < $< > $@
858
859 man/%: man/%.in
860         $(SED_PROCESS)
861
862 sysctl.d/%: sysctl.d/%.in
863         $(SED_PROCESS)
864
865 %.pc: %.pc.in
866         $(SED_PROCESS)
867
868 shell-completion/%: shell-completion/%.in
869         $(SED_PROCESS)
870
871 %.rules: %.rules.in
872         $(SED_PROCESS)
873
874 %.conf: %.conf.in
875         $(SED_PROCESS)
876
877 %.sh: %.sh.in
878         $(SED_PROCESS)
879         $(AM_V_GEN)chmod +x $@
880
881 src/%.c: src/%.gperf
882         $(AM_V_at)$(MKDIR_P) $(dir $@)
883         $(AM_V_GPERF)$(GPERF) < $< > $@
884
885 src/%: src/%.m4
886         $(AM_V_at)$(MKDIR_P) $(dir $@)
887         $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
888
889 sysusers.d/%: sysusers.d/%.m4
890         $(AM_V_at)$(MKDIR_P) $(dir $@)
891         $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
892
893 tmpfiles.d/%: tmpfiles.d/%.m4
894         $(AM_V_at)$(MKDIR_P) $(dir $@)
895         $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
896
897
898 units/%: units/%.m4
899         $(AM_V_at)$(MKDIR_P) $(dir $@)
900         $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_SYSTEM=1 < $< > $@
901
902 units/user/%: units/user/%.m4
903         $(AM_V_at)$(MKDIR_P) $(dir $@)
904         $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_USER=1 < $< > $@
905
906 if ENABLE_POLKIT
907 nodist_polkitpolicy_DATA = \
908         $(polkitpolicy_files)
909 endif
910
911 EXTRA_DIST += \
912         $(polkitpolicy_in_files)
913
914 # ------------------------------------------------------------------------------
915 if ENABLE_MANPAGES
916 man/custom-entities.ent: configure.ac
917         $(AM_V_GEN)$(MKDIR_P) $(dir $@)
918         $(AM_V_GEN)(echo '<?xml version="1.0" encoding="utf-8" ?>' && \
919          printf '$(subst '|,<!ENTITY ,$(subst =, ",$(subst |',">\n,$(substitutions))))') \
920          > $@ # '
921
922 CLEANFILES += \
923         man/custom-entities.ent
924
925 XSLTPROC_FLAGS = \
926         --nonet \
927         --xinclude \
928         --stringparam man.output.quietly 1 \
929         --stringparam funcsynopsis.style ansi \
930         --stringparam man.authors.section.enabled 0 \
931         --stringparam man.copyright.section.enabled 0 \
932         --stringparam elogind.version $(VERSION) \
933         --path '$(builddir)/man:$(srcdir)/man'
934
935 XSLTPROC_PROCESS_MAN = \
936         $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-man.xsl $<
937
938 XSLTPROC_PROCESS_HTML = \
939         $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
940
941 man/%.1: man/%.xml man/custom-man.xsl man/custom-entities.ent
942         $(XSLTPROC_PROCESS_MAN)
943
944 man/%.3: man/%.xml man/custom-man.xsl man/custom-entities.ent
945         $(XSLTPROC_PROCESS_MAN)
946
947 man/%.5: man/%.xml man/custom-man.xsl man/custom-entities.ent
948         $(XSLTPROC_PROCESS_MAN)
949
950 man/%.7: man/%.xml man/custom-man.xsl man/custom-entities.ent
951         $(XSLTPROC_PROCESS_MAN)
952
953 man/%.8: man/%.xml man/custom-man.xsl man/custom-entities.ent
954         $(XSLTPROC_PROCESS_MAN)
955
956 man/%.html: man/%.xml man/custom-html.xsl man/custom-entities.ent
957         $(XSLTPROC_PROCESS_HTML)
958
959 define html-alias
960         $(AM_V_LN)$(LN_S) -f $(notdir $<) $@
961 endef
962
963 endif
964
965 EXTRA_DIST += \
966         man/custom-html.xsl \
967         man/custom-man.xsl
968
969 install-exec-hook: $(INSTALL_EXEC_HOOKS)
970
971 uninstall-hook: $(UNINSTALL_DATA_HOOKS) $(UNINSTALL_EXEC_HOOKS)
972
973 install-data-hook: $(INSTALL_DATA_HOOKS)
974
975 distclean-local: $(DISTCLEAN_LOCAL_HOOKS)
976
977 clean-local: $(CLEAN_LOCAL_HOOKS)
978         rm -rf $(abs_srcdir)/install-tree
979         rm -f $(abs_srcdir)/hwdb/usb.ids $(abs_srcdir)/hwdb/pci.ids $(abs_srcdir)/hwdb/oui.txt \
980               $(abs_srcdir)/hwdb/iab.txt
981
982 DISTCHECK_CONFIGURE_FLAGS = \
983         --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
984         --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
985         --with-bashcompletiondir=$$dc_install_base/$(bashcompletiondir) \
986         --with-zshcompletiondir=$$dc_install_base/$(zshcompletiondir) \
987         --with-pamlibdir=$$dc_install_base/$(pamlibdir) \
988         --with-pamconfdir=$$dc_install_base/$(pamconfdir) \
989         --with-rootprefix=$$dc_install_base
990
991 if ENABLE_SPLIT_USR
992 DISTCHECK_CONFIGURE_FLAGS += \
993         --enable-split-usr
994 else
995 DISTCHECK_CONFIGURE_FLAGS += \
996         --disable-split-usr
997 endif
998
999 .PHONY: dist-check-help
1000 dist-check-help: $(rootbin_PROGRAMS)
1001         for i in $(abspath $^); do                                             \
1002             if $$i  --help | grep -v 'default:' | grep -E -q '.{80}.' ; then   \
1003                 echo "$(basename $$i) --help output is too wide:";             \
1004                 $$i  --help | awk 'length > 80' | grep -E --color=yes '.{80}'; \
1005                 exit 1;                                                        \
1006             fi; done
1007
1008 include_compilers = "$(CC)" "$(CC) -ansi" "$(CC) -std=iso9899:1990"
1009 public_headers = $(filter-out src/systemd/_sd-common.h, $(pkginclude_HEADERS) $(include_HEADERS))
1010 .PHONY: dist-check-includes
1011 dist-check-includes: $(public_headers)
1012         @res=0;                                                                 \
1013         for i in $(abspath $^); do                                              \
1014             for cc in $(include_compilers); do                                  \
1015                 echo "$$cc -o/dev/null -c -x c -include "$$i" - </dev/null";    \
1016                 $$cc -o/dev/null -c -x c -include "$$i" - </dev/null || res=1;  \
1017             done;                                                               \
1018         done; exit $$res
1019
1020 dist:
1021
1022 .PHONY: git-tag
1023 git-tag:
1024         git tag -s "v$(VERSION)" -m "elogind $(VERSION)"
1025
1026 .PHONY: git-tar
1027 git-tar:
1028         $(AM_V_at)git archive --format=tar --prefix=elogind-$(VERSION)-raw/ HEAD | \
1029                 (cd /var/tmp/ && tar xf -)
1030         $(AM_V_GEN)(cd /var/tmp && rm -rf elogind-$(VERSION) && $(MKDIR_P) elogind-$(VERSION) && \
1031          for f in `find elogind-$(VERSION)-raw/ -type f | cut -d '/' -f 2-` ; do \
1032                 $(MKDIR_P) elogind-$(VERSION)/`dirname $$f` ;            \
1033                 $(AWK) 'BEGIN                    { i=0;e=0      }        \
1034                         /^#if\s+0.*elogind.*$$/  { i=1;next     }        \
1035                         /^#else\s*$$/            {                       \
1036                             { if ( i==1 ) e=1; else print }{next}        \
1037                         }                                                \
1038                         /^#endif\s*\/\/\s*0\s*$$/ {                      \
1039                             { if ( i==1 ) { i=0;e=0 } else print }{next} \
1040                         }                                                \
1041                         /^\s*\/\/\/.*elogind.*$$/{ next         }        \
1042                         /^\s*\/\/\s*#include.+$$/{ next         }        \
1043                         { if ( (i==0) || (e==1) ) print         }'       \
1044                           elogind-$(VERSION)-raw/$$f                     \
1045                         > elogind-$(VERSION)/$$f ;                       \
1046                         chmod `stat -c '%a' elogind-$(VERSION)-raw/$$f`  \
1047                                             elogind-$(VERSION)/$$f ;     \
1048          done ; \
1049          for l in `find elogind-$(VERSION)-raw/ -type l | cut -d '/' -f 2-` ; do \
1050                 $(MKDIR_P) elogind-$(VERSION)/`dirname $$l` ; \
1051                 cp -P elogind-$(VERSION)-raw/$$l elogind-$(VERSION)/$$l ; \
1052          done ; \
1053          tar czf elogind-$(VERSION).tar.gz elogind-$(VERSION) ; \
1054          rm -rf elogind-$(VERSION) elogind-$(VERSION)-raw) ; \
1055         $(AM_V_at)mv /var/tmp/elogind-$(VERSION).tar.gz ./
1056
1057 .PHONY: install-tree
1058 install-tree: all
1059         rm -rf $(abs_srcdir)/install-tree
1060         $(MAKE) install DESTDIR=$(abs_srcdir)/install-tree
1061         tree $(abs_srcdir)/install-tree
1062
1063 # Let's run all tests of the test suite, but under valgrind. Let's
1064 # exclude the one perl script we have in there
1065 .PHONY: valgrind-tests
1066 valgrind-tests: $(TESTS)
1067         $(AM_V_GEN)for f in $(filter-out %.pl, $^); do \
1068                 if file $$f | grep -q shell; then \
1069                 echo -e "$${x}Skipping non-binary $$f"; else \
1070                 echo -e "$${x}Running $$f"; \
1071                 libtool --mode=execute valgrind -q --leak-check=full --max-stackframe=5242880 --error-exitcode=55 $(builddir)/$$f ; fi; \
1072                 x="\n\n"; \
1073         done
1074
1075 exported-%: %
1076         $(AM_V_GEN)$(NM) -g --defined-only $(builddir)/.libs/$(<:.la=.so) 2>&1 /dev/null | grep " T " | cut -d" " -f3 > $@
1077
1078 exported: $(addprefix exported-, $(lib_LTLIBRARIES))
1079         $(AM_V_GEN)cat $^ > $@
1080
1081 .PHONY: check-api-docs
1082 check-api-docs: exported man
1083         $(AM_V_GEN)for symbol in `cat exported` ; do \
1084                 if test -f $(builddir)/man/$$symbol.html ; then \
1085                         echo "  Symbol $$symbol() is documented." ; \
1086                 else \
1087                         echo "‣ Symbol $$symbol() lacks documentation." ; \
1088                 fi ; \
1089         done
1090
1091 OBJECT_VARIABLES:=$(filter %_OBJECTS,$(.VARIABLES))
1092 ALL_OBJECTS:=$(foreach v,$(OBJECT_VARIABLES),$($(v)))
1093
1094 undefined defined: $(ALL_OBJECTS)
1095         $(AM_V_GEN)for f in $(ALL_OBJECTS) ; do \
1096                 $(NM) -g --$@-only `echo $(builddir)/"$$f" | sed -e 's,\([^/]*\).lo$$,.libs/\1.o,'` ; \
1097         done | cut -c 20- | cut -d @ -f 1 | sort -u > $@
1098
1099 CLEANFILES += \
1100         defined \
1101         undefined
1102
1103 .PHONY: check-api-unused
1104 check-api-unused: defined undefined exported
1105         ( cat exported undefined ) | sort -u  | diff -u - defined | grep ^+ | grep -v ^+++ | cut -c2-
1106
1107 .PHONY: check-includes
1108 check-includes: $(top_srcdir)/tools/check-includes.pl
1109         $(AM_V_GEN) find * -name '*.[hcS]' -type f -print | sort -u \
1110                 | xargs $(top_srcdir)/tools/check-includes.pl
1111
1112 EXTRA_DIST += \
1113         $(top_srcdir)/tools/check-includes.pl
1114
1115 # Stupid test that everything purported to be exported really is
1116 define generate-sym-test
1117         $(AM_V_at)$(MKDIR_P) $(dir $@)
1118         $(AM_V_at)printf '#include <stdio.h>\n' > $@
1119         $(AM_V_at)printf '#include "%s"\n' $(notdir $(filter %.h, $^)) >> $@
1120         $(AM_V_at)printf 'void* functions[] = {\n' >> $@
1121         $(AM_V_GEN)sed -r -n 's/^ +([a-zA-Z0-9_]+);/\1,/p' $< >> $@
1122         $(AM_V_at)printf '};\nint main(void) {\n' >> $@
1123         $(AM_V_at)printf 'unsigned i; for (i=0;i<sizeof(functions)/sizeof(void*);i++) printf("%%p\\n", functions[i]);\n' >> $@
1124         $(AM_V_at)printf 'return 0; }\n' >> $@
1125 endef
1126
1127 test-libelogind-sym.c: \
1128                 $(top_builddir)/src/libelogind/libelogind.sym \
1129                 src/systemd/sd-daemon.h \
1130                 src/systemd/sd-login.h \
1131                 src/systemd/sd-bus.h \
1132                 src/systemd/sd-event.h
1133         $(generate-sym-test)
1134
1135 test_libelogind_sym_SOURCES = \
1136         test-libelogind-sym.c
1137 test_libelogind_sym_LDADD = \
1138         libelogind.la
1139
1140 BUILT_SOURCES += \
1141         $(test_libelogind_sym_SOURCES)
1142
1143 tests += \
1144         test-libelogind-sym
1145
1146 .PHONY: cppcheck
1147 cppcheck:
1148         cppcheck --enable=all -q $(top_srcdir)
1149
1150 # Used to extract compile flags for YCM.
1151 print-%:
1152         @echo $($*)
1153
1154 git-contrib:
1155         @git shortlog -s `git describe --abbrev=0`.. | cut -c8- | awk '{ print $$0 "," }' | sort -u
1156
1157 EXTRA_DIST += \
1158         tools/gdb-sd_dump_hashmaps.py
1159
1160 list-keys:
1161         gpg --verbose --no-options --no-default-keyring --no-auto-key-locate --batch --trust-model=always --keyring=$(srcdir)/src/import/import-pubring.gpg --list-keys
1162
1163 add-key:
1164         gpg --verbose --no-options --no-default-keyring --no-auto-key-locate --batch --trust-model=always --keyring=$(srcdir)/src/import/import-pubring.gpg --import -