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