chiark / gitweb /
Remove src/hwdb
[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=6
42 LIBELOGIND_REVISION=0
43 LIBELOGIND_AGE=6
44
45 # Dirs of external packages
46 dbuspolicydir=@dbuspolicydir@
47 dbussessionservicedir=@dbussessionservicedir@
48 dbussystemservicedir=@dbussystemservicedir@
49 pamlibdir=@pamlibdir@
50 pamconfdir=@pamconfdir@
51 pkgconfiglibdir=$(libdir)/pkgconfig
52 polkitpolicydir=$(datadir)/polkit-1/actions
53 bashcompletiondir=@bashcompletiondir@
54 zshcompletiondir=@zshcompletiondir@
55 varlogdir=$(localstatedir)/log
56 elogindstatedir=$(localstatedir)/lib/elogind
57 catalogstatedir=$(elogindstatedir)/catalog
58 xinitrcdir=$(sysconfdir)/X11/xinit/xinitrc.d
59
60 # Our own, non-special dirs
61 pkgsysconfdir=$(sysconfdir)/elogind
62 userunitdir=$(prefix)/lib/elogind/user
63 userpresetdir=$(prefix)/lib/elogind/user-preset
64 tmpfilesdir=$(prefix)/lib/tmpfiles.d
65 sysusersdir=$(prefix)/lib/sysusers.d
66 sysctldir=$(prefix)/lib/sysctl.d
67 binfmtdir=$(prefix)/lib/binfmt.d
68 modulesloaddir=$(prefix)/lib/modules-load.d
69 networkdir=$(rootprefix)/lib/elogind/network
70 pkgincludedir=$(includedir)/elogind
71 systemgeneratordir=$(rootlibexecdir)/system-generators
72 usergeneratordir=$(prefix)/lib/elogind/user-generators
73 systemshutdowndir=$(rootlibexecdir)/system-shutdown
74 systemsleepdir=$(rootlibexecdir)/system-sleep
75 systemunitdir=$(rootprefix)/lib/elogind/system
76 systempresetdir=$(rootprefix)/lib/elogind/system-preset
77 udevrulesdir=$(rootprefix)/lib/udev/rules.d
78 catalogdir=$(prefix)/lib/elogind/catalog
79 kernelinstalldir = $(prefix)/lib/kernel/install.d
80 factory_etcdir = $(prefix)/share/factory/etc
81 factory_pamdir = $(prefix)/share/factory/etc/pam.d
82 bootlibdir = $(prefix)/lib/elogind/boot/efi
83
84 # And these are the special ones for /
85 rootprefix=@rootprefix@
86 rootbindir=$(rootprefix)/bin
87 rootlibexecdir=$(rootprefix)/lib/elogind
88
89 EXTRA_DIST =
90 BUILT_SOURCES =
91 INSTALL_EXEC_HOOKS =
92 UNINSTALL_EXEC_HOOKS =
93 INSTALL_DATA_HOOKS =
94 UNINSTALL_DATA_HOOKS =
95 DISTCLEAN_LOCAL_HOOKS =
96 CLEAN_LOCAL_HOOKS =
97 pkginclude_HEADERS =
98 noinst_LTLIBRARIES =
99 lib_LTLIBRARIES =
100 include_HEADERS =
101 noinst_DATA =
102 pkgconfiglib_DATA =
103 polkitpolicy_in_in_files =
104 polkitpolicy_in_files =
105 polkitpolicy_files =
106 dist_pkgsysconf_DATA =
107 nodist_pkgsysconf_DATA =
108 dist_pkgdata_DATA =
109 dist_dbuspolicy_DATA =
110 dist_dbussystemservice_DATA =
111 dist_systemunit_DATA_busnames =
112 dist_sysusers_DATA =
113 check_PROGRAMS =
114 check_DATA =
115 tests=
116 manual_tests =
117 TEST_EXTENSIONS = .py
118 PY_LOG_COMPILER = $(PYTHON)
119 if ENABLE_TESTS
120 noinst_PROGRAMS = $(manual_tests) $(tests)
121 TESTS = $(tests)
122 else
123 noinst_PROGRAMS =
124 TESTS =
125 endif
126
127 in_files = $(filter %.in,$(EXTRA_DIST))
128 in_in_files = $(filter %.in.in, $(in_files))
129 m4_files = $(filter %.m4,$(EXTRA_DIST) $(in_files:.m4.in=.m4))
130
131 CLEANFILES = $(BUILT_SOURCES) \
132         $(pkgconfiglib_DATA) \
133         $(in_files:.in=) $(in_in_files:.in.in=) \
134         $(m4_files:.m4=)
135
136 .PHONY: $(INSTALL_EXEC_HOOKS) $(UNINSTALL_EXEC_HOOKS) \
137         $(INSTALL_DATA_HOOKS) $(UNINSTALL_DATA_HOOKS) \
138         $(DISTCLEAN_LOCAL_HOOKS) $(CLEAN_LOCAL_HOOKS)
139
140 # FIXME a different pkttyagent path...
141
142 AM_CPPFLAGS = \
143         -include $(top_builddir)/config.h \
144         -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\" \
145         -DPOLKIT_AGENT_BINARY_PATH=\"$(bindir)/pkttyagent\" \
146         -DSYSTEM_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/system\" \
147         -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" \
148         -DSYSTEM_SYSVINIT_PATH=\"$(SYSTEM_SYSVINIT_PATH)\" \
149         -DSYSTEM_SYSVRCND_PATH=\"$(SYSTEM_SYSVRCND_PATH)\" \
150         -DUSER_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/user\" \
151         -DUSER_DATA_UNIT_PATH=\"$(userunitdir)\" \
152         -DCERTIFICATE_ROOT=\"$(CERTIFICATEROOT)\" \
153         -DCATALOG_DATABASE=\"$(catalogstatedir)/database\" \
154         -DROOTPREFIX=\"$(rootprefix)\" \
155         -DRANDOM_SEED_DIR=\"$(localstatedir)/lib/elogind/\" \
156         -DRANDOM_SEED=\"$(localstatedir)/lib/elogind/random-seed\" \
157         -DSYSTEM_GENERATOR_PATH=\"$(systemgeneratordir)\" \
158         -DUSER_GENERATOR_PATH=\"$(usergeneratordir)\" \
159         -DSYSTEM_SHUTDOWN_PATH=\"$(systemshutdowndir)\" \
160         -DSYSTEM_SLEEP_PATH=\"$(systemsleepdir)\" \
161         -DELOGIND_KBD_MODEL_MAP=\"$(pkgdatadir)/kbd-model-map\" \
162         -DELOGIND_LANGUAGE_FALLBACK_MAP=\"$(pkgdatadir)/language-fallback-map\" \
163         -DX_SERVER=\"$(bindir)/X\" \
164         -DPOLKIT_AGENT_BINARY_PATH=\"$(bindir)/pkttyagent\" \
165         -DQUOTACHECK=\"$(QUOTACHECK)\" \
166         -DKEXEC=\"$(KEXEC)\" \
167         -DLIBDIR=\"$(libdir)\" \
168         -DROOTLIBDIR=\"$(rootlibdir)\" \
169         -DROOTLIBEXECDIR=\"$(rootlibexecdir)\" \
170         -DTEST_DIR=\"$(abs_top_srcdir)/test\" \
171         -I $(top_srcdir)/src \
172         -I $(top_builddir)/src/shared \
173         -I $(top_srcdir)/src/shared \
174         -I $(top_srcdir)/src/login \
175         -I $(top_srcdir)/src/systemd \
176         -I $(top_srcdir)/src/libelogind/sd-bus \
177         -I $(top_srcdir)/src/libelogind/sd-event \
178         -I $(top_srcdir)/src/libelogind/sd-device \
179         $(UDEV_CFLAGS) \
180         $(OUR_CPPFLAGS)
181
182 AM_CFLAGS = $(OUR_CFLAGS)
183 AM_LDFLAGS = $(OUR_LDFLAGS)
184
185 # ------------------------------------------------------------------------------
186 define move-to-rootlibdir
187         if test "$(libdir)" != "$(rootlibdir)"; then \
188                 $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
189                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/$$libname) && \
190                 rm -f $(DESTDIR)$(libdir)/$$libname && \
191                 $(LN_S) --relative -f $(DESTDIR)$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/$$libname && \
192                 mv $(DESTDIR)$(libdir)/$$libname.* $(DESTDIR)$(rootlibdir); \
193         fi
194 endef
195
196 INSTALL_DIRS =
197
198 SHUTDOWN_TARGET_WANTS =
199 LOCAL_FS_TARGET_WANTS =
200 MULTI_USER_TARGET_WANTS =
201 GRAPHICAL_TARGET_WANTS =
202 RESCUE_TARGET_WANTS =
203 SYSINIT_TARGET_WANTS =
204 SOCKETS_TARGET_WANTS =
205 BUSNAMES_TARGET_WANTS =
206 TIMERS_TARGET_WANTS =
207 USER_SOCKETS_TARGET_WANTS =
208 USER_DEFAULT_TARGET_WANTS =
209 USER_BUSNAMES_TARGET_WANTS =
210
211 SYSTEM_UNIT_ALIASES =
212 USER_UNIT_ALIASES =
213 GENERAL_ALIASES =
214
215 install-target-wants-hook:
216         what="$(SHUTDOWN_TARGET_WANTS)" && wants=shutdown.target && dir=$(systemunitdir) && $(add-wants)
217         what="$(LOCAL_FS_TARGET_WANTS)" && wants=local-fs.target && dir=$(systemunitdir) && $(add-wants)
218         what="$(MULTI_USER_TARGET_WANTS)" && wants=multi-user.target && dir=$(systemunitdir) && $(add-wants)
219         what="$(GRAPHICAL_TARGET_WANTS)" && wants=graphical.target && dir=$(systemunitdir) && $(add-wants)
220         what="$(RESCUE_TARGET_WANTS)" && wants=rescue.target && dir=$(systemunitdir) && $(add-wants)
221         what="$(SYSINIT_TARGET_WANTS)" && wants=sysinit.target && dir=$(systemunitdir) && $(add-wants)
222         what="$(SOCKETS_TARGET_WANTS)" && wants=sockets.target && dir=$(systemunitdir) && $(add-wants)
223         what="$(TIMERS_TARGET_WANTS)" && wants=timers.target && dir=$(systemunitdir) && $(add-wants)
224         what="$(SLICES_TARGET_WANTS)" && wants=slices.target && dir=$(systemunitdir) && $(add-wants)
225         what="$(USER_SOCKETS_TARGET_WANTS)" && wants=sockets.target && dir=$(userunitdir) && $(add-wants)
226         what="$(USER_DEFAULT_TARGET_WANTS)" && wants=default.target && dir=$(userunitdir) && $(add-wants)
227
228 install-busnames-target-wants-hook:
229         what="$(BUSNAMES_TARGET_WANTS)" && wants=busnames.target && dir=$(systemunitdir) && $(add-wants)
230         what="$(USER_BUSNAMES_TARGET_WANTS)" && wants=busnames.target && dir=$(userunitdir) && $(add-wants)
231
232 define add-wants
233         [ -z "$$what" ] || ( \
234           dir=$(DESTDIR)$$dir/$$wants.wants && \
235           $(MKDIR_P) -m 0755 $$dir && \
236           cd $$dir && \
237           rm -f $$what && \
238           for i in $$what; do $(LN_S) ../$$i . || exit $$? ; done )
239 endef
240
241 install-directories-hook:
242         $(MKDIR_P) $(addprefix $(DESTDIR),$(INSTALL_DIRS))
243
244 install-aliases-hook:
245         set -- $(SYSTEM_UNIT_ALIASES) && \
246                 dir=$(systemunitdir) && $(install-aliases)
247         set -- $(USER_UNIT_ALIASES) && \
248                 dir=$(userunitdir) && $(install-relative-aliases)
249         set -- $(GENERAL_ALIASES) && \
250                 dir= && $(install-relative-aliases)
251
252 define install-aliases
253         while [ -n "$$1" ]; do \
254                 $(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \
255                 rm -f $(DESTDIR)$$dir/$$2 && \
256                 $(LN_S) $$1 $(DESTDIR)$$dir/$$2 && \
257                 shift 2 || exit $$?; \
258         done
259 endef
260
261 define install-relative-aliases
262         while [ -n "$$1" ]; do \
263                 $(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \
264                 rm -f $(DESTDIR)$$dir/$$2 && \
265                 $(LN_S) --relative $(DESTDIR)$$1 $(DESTDIR)$$dir/$$2 && \
266                 shift 2 || exit $$?; \
267         done
268 endef
269
270 install-touch-usr-hook:
271         touch -c $(DESTDIR)/$(prefix)
272
273 INSTALL_EXEC_HOOKS += \
274         install-target-wants-hook \
275         install-directories-hook \
276         install-aliases-hook \
277         install-touch-usr-hook
278
279 if ENABLE_KDBUS
280 INSTALL_EXEC_HOOKS += \
281         install-busnames-target-wants-hook
282 endif
283
284 # ------------------------------------------------------------------------------
285 AM_V_M4 = $(AM_V_M4_$(V))
286 AM_V_M4_ = $(AM_V_M4_$(AM_DEFAULT_VERBOSITY))
287 AM_V_M4_0 = @echo "  M4      " $@;
288
289 AM_V_XSLT = $(AM_V_XSLT_$(V))
290 AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
291 AM_V_XSLT_0 = @echo "  XSLT    " $@;
292
293 AM_V_GPERF = $(AM_V_GPERF_$(V))
294 AM_V_GPERF_ = $(AM_V_GPERF_$(AM_DEFAULT_VERBOSITY))
295 AM_V_GPERF_0 = @echo "  GPERF   " $@;
296
297 AM_V_LN = $(AM_V_LN_$(V))
298 AM_V_LN_ = $(AM_V_LN_$(AM_DEFAULT_VERBOSITY))
299 AM_V_LN_0 = @echo "  LN      " $@;
300
301 AM_V_RM = $(AM_V_RM_$(V))
302 AM_V_RM_ = $(AM_V_RM_$(AM_DEFAULT_VERBOSITY))
303 AM_V_RM_0 = @echo "  RM      " $@;
304
305 # ------------------------------------------------------------------------------
306 rootbin_PROGRAMS =
307 bin_PROGRAMS =
308 rootlibexec_PROGRAMS =
309 systemgenerator_PROGRAMS =
310 dist_bashcompletion_DATA =
311 dist_zshcompletion_DATA =
312
313 dist_doc_DATA = \
314         README \
315         NEWS \
316         LICENSE.LGPL2.1 \
317         LICENSE.GPL2 \
318         LICENSE.MIT \
319         src/libelogind/sd-bus/PORTING-DBUS1 \
320         src/libelogind/sd-bus/DIFFERENCES \
321         src/libelogind/sd-bus/GVARIANT-SERIALIZATION
322
323 @INTLTOOL_POLICY_RULE@
324
325 # ------------------------------------------------------------------------------
326
327 MANPAGES =
328 MANPAGES_ALIAS =
329
330 include Makefile-man.am
331
332 .PHONY: man update-man-list
333 man: $(MANPAGES) $(MANPAGES_ALIAS) $(HTML_FILES) $(HTML_ALIAS)
334
335 XML_FILES = \
336         ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
337 HTML_FILES = \
338         ${XML_FILES:.xml=.html}
339 HTML_ALIAS = \
340         ${patsubst %.1,%.html,${patsubst %.3,%.html,${patsubst %.5,%.html,${patsubst %.7,%.html,${patsubst %.8,%.html,$(MANPAGES_ALIAS)}}}}}
341
342 if ENABLE_MANPAGES
343 man_MANS = \
344         $(MANPAGES) \
345         $(MANPAGES_ALIAS)
346
347 noinst_DATA += \
348         $(HTML_FILES) \
349         $(HTML_ALIAS)
350
351 CLEANFILES += \
352         $(man_MANS) \
353         $(HTML_FILES) \
354         $(HTML_ALIAS)
355
356 docs/html/man:
357         $(AM_V_at)$(MKDIR_P) $(dir $@)
358         $(AM_V_LN)$(LN_S) -f ../../man $@
359
360 noinst_DATA += \
361         docs/html/man
362
363 CLEANFILES += \
364         docs/html/man
365
366 endif
367
368 EXTRA_DIST += \
369         $(XML_FILES) \
370         $(HTML_FILES) \
371         $(HTML_ALIAS) \
372         $(man_MANS) \
373         tools/make-man-index.py \
374         tools/make-directive-index.py \
375         tools/xml_helper.py
376
377 # ------------------------------------------------------------------------------
378 noinst_LTLIBRARIES += \
379         libelogind-shared.la
380
381 libelogind_shared_la_SOURCES = \
382         src/shared/capability.c \
383         src/shared/capability.h \
384         src/shared/linux/auto_dev-ioctl.h \
385         src/shared/ioprio.h \
386         src/shared/missing.h \
387         src/shared/initreq.h \
388         src/shared/securebits.h \
389         src/shared/special.h \
390         src/shared/list.h \
391         src/shared/unaligned.h \
392         src/shared/macro.h \
393         src/shared/def.h \
394         src/shared/sparse-endian.h \
395         src/shared/refcnt.h \
396         src/shared/udev-util.h \
397         src/shared/device-nodes.c \
398         src/shared/device-nodes.h \
399         src/shared/util.c \
400         src/shared/util.h \
401         src/shared/virt.c \
402         src/shared/virt.h \
403         src/shared/architecture.c \
404         src/shared/architecture.h \
405         src/shared/efivars.c \
406         src/shared/efivars.h \
407         src/shared/fstab-util.c \
408         src/shared/fstab-util.h \
409         src/shared/path-util.c \
410         src/shared/path-util.h \
411         src/shared/time-util.c \
412         src/shared/time-util.h \
413         src/shared/locale-util.c \
414         src/shared/locale-util.h \
415         src/shared/mempool.c \
416         src/shared/mempool.h \
417         src/shared/hashmap.c \
418         src/shared/hashmap.h \
419         src/shared/siphash24.c \
420         src/shared/siphash24.h \
421         src/shared/set.h \
422         src/shared/fdset.c \
423         src/shared/fdset.h \
424         src/shared/prioq.c \
425         src/shared/prioq.h \
426         src/shared/sleep-config.c \
427         src/shared/sleep-config.h \
428         src/shared/strv.c \
429         src/shared/strv.h \
430         src/shared/env-util.c \
431         src/shared/env-util.h \
432         src/shared/strbuf.c \
433         src/shared/strbuf.h \
434         src/shared/strxcpyx.c \
435         src/shared/strxcpyx.h \
436         src/shared/conf-parser.c \
437         src/shared/conf-parser.h \
438         src/shared/log.c \
439         src/shared/log.h \
440         src/shared/ratelimit.h \
441         src/shared/ratelimit.c \
442         src/shared/exit-status.c \
443         src/shared/exit-status.h \
444         src/shared/utf8.c \
445         src/shared/utf8.h \
446         src/shared/gunicode.c \
447         src/shared/gunicode.h \
448         src/shared/pager.c \
449         src/shared/pager.h \
450         src/shared/socket-util.c \
451         src/shared/socket-util.h \
452         src/shared/in-addr-util.c \
453         src/shared/in-addr-util.h \
454         src/shared/ether-addr-util.h \
455         src/shared/conf-files.c \
456         src/shared/conf-files.h \
457         src/shared/cgroup-util.c \
458         src/shared/cgroup-util.h \
459         src/shared/cgroup-show.c \
460         src/shared/cgroup-show.h \
461         src/shared/unit-name.c \
462         src/shared/unit-name.h \
463         src/shared/watchdog.c \
464         src/shared/watchdog.h \
465         src/shared/replace-var.c \
466         src/shared/replace-var.h \
467         src/shared/spawn-polkit-agent.c \
468         src/shared/spawn-polkit-agent.h \
469         src/shared/clock-util.c \
470         src/shared/clock-util.h \
471         src/shared/calendarspec.c \
472         src/shared/calendarspec.h \
473         src/shared/fileio.c \
474         src/shared/fileio.h \
475         src/shared/output-mode.h \
476         src/shared/MurmurHash2.c \
477         src/shared/MurmurHash2.h \
478         src/shared/acpi-fpdt.h \
479         src/shared/acpi-fpdt.c \
480         src/shared/boot-timestamps.h \
481         src/shared/boot-timestamps.c \
482         src/shared/mkdir.c \
483         src/shared/mkdir.h \
484         src/shared/smack-util.c \
485         src/shared/smack-util.h \
486         src/shared/apparmor-util.c \
487         src/shared/apparmor-util.h \
488         src/shared/ima-util.c \
489         src/shared/ima-util.h \
490         src/shared/ptyfwd.c \
491         src/shared/ptyfwd.h \
492         src/shared/errno-list.c \
493         src/shared/errno-list.h \
494         src/shared/af-list.c \
495         src/shared/af-list.h \
496         src/shared/arphrd-list.c \
497         src/shared/arphrd-list.h \
498         src/shared/cap-list.c \
499         src/shared/cap-list.h \
500         src/shared/audit.c \
501         src/shared/audit.h \
502         src/shared/xml.c \
503         src/shared/xml.h \
504         src/shared/json.c \
505         src/shared/json.h \
506         src/shared/selinux-util.c \
507         src/shared/selinux-util.h \
508         src/shared/label.c \
509         src/shared/label.h \
510         src/shared/socket-label.c \
511         src/shared/mkdir-label.c \
512         src/shared/fileio-label.h \
513         src/shared/fileio-label.c \
514         src/shared/bus-label.c \
515         src/shared/bus-label.h \
516         src/shared/gpt.h \
517         src/shared/clean-ipc.h \
518         src/shared/clean-ipc.c \
519         src/shared/login-shared.c \
520         src/shared/login-shared.h \
521         src/shared/ring.c \
522         src/shared/ring.h \
523         src/shared/barrier.c \
524         src/shared/barrier.h \
525         src/shared/pty.c \
526         src/shared/pty.h \
527         src/shared/async.c \
528         src/shared/async.h \
529         src/shared/base-filesystem.c \
530         src/shared/base-filesystem.h \
531         src/shared/memfd-util.c \
532         src/shared/memfd-util.h \
533         src/shared/uid-range.c \
534         src/shared/uid-range.h \
535         src/shared/nss-util.h \
536         src/shared/verbs.c \
537         src/shared/verbs.h \
538         src/shared/sigbus.c \
539         src/shared/sigbus.h \
540         src/shared/build.h \
541         src/shared/import-util.c \
542         src/shared/import-util.h \
543         src/shared/sysctl-util.c \
544         src/shared/sysctl-util.h
545
546 nodist_libelogind_shared_la_SOURCES = \
547         src/shared/errno-from-name.h \
548         src/shared/errno-to-name.h \
549         src/shared/af-from-name.h \
550         src/shared/af-to-name.h \
551         src/shared/arphrd-from-name.h \
552         src/shared/arphrd-to-name.h \
553         src/shared/cap-from-name.h \
554         src/shared/cap-to-name.h
555
556 libelogind_shared_la_CFLAGS = \
557         $(AM_CFLAGS) \
558         $(CAP_CFLAGS) \
559         $(SECCOMP_CFLAGS) \
560         -pthread
561
562 libelogind_shared_la_LIBADD = \
563         $(CAP_LIBS) \
564         -lm
565
566 # ------------------------------------------------------------------------------
567 if HAVE_ACL
568 noinst_LTLIBRARIES += \
569         libelogind-acl.la
570
571 libelogind_acl_la_SOURCES = \
572         src/shared/acl-util.c \
573         src/shared/acl-util.h
574
575 libelogind_acl_la_CFLAGS = \
576         $(AM_CFLAGS) \
577         $(ACL_CFLAGS)
578
579 libelogind_acl_la_LIBADD = \
580         $(ACL_LIBS)
581 endif
582
583 gperf_txt_sources = \
584         src/shared/errno-list.txt \
585         src/shared/af-list.txt \
586         src/shared/arphrd-list.txt \
587         src/shared/cap-list.txt
588
589 BUILT_SOURCES += \
590         $(gperf_gperf_sources:-gperf.gperf=-gperf.c) \
591         $(gperf_txt_sources:-list.txt=-from-name.h) \
592         $(gperf_txt_sources:-list.txt=-to-name.h)
593
594 CLEANFILES += \
595         $(gperf_txt_sources:-list.txt=-from-name.gperf)
596 DISTCLEANFILES = \
597         $(gperf_txt_sources)
598
599 EXTRA_DIST += \
600         $(gperf_gperf_m4_sources) \
601         $(gperf_gperf_sources) \
602         $(gperf_txt_sources:-list.txt=-from-name.gperf)
603
604 CLEANFILES += \
605         $(gperf_txt_sources)
606
607 %-from-name.gperf: %-list.txt
608         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct $(notdir $*)_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' <$< >$@
609
610 %-from-name.h: %-from-name.gperf
611         $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_$(notdir $*) -H hash_$(notdir $*)_name -p -C <$< >$@
612
613
614 src/shared/errno-list.txt:
615         $(AM_V_at)$(MKDIR_P) $(dir $@)
616         $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include errno.h - </dev/null | $(AWK) '/^#define[ \t]+E[^ _]+[ \t]+/ { print $$2; }' >$@
617
618 src/shared/errno-to-name.h: src/shared/errno-list.txt
619         $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const errno_names[] = { "} !/EDEADLOCK/ && !/EWOULDBLOCK/ && !/ENOTSUP/ { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
620
621
622 src/shared/af-list.txt:
623         $(AM_V_at)$(MKDIR_P) $(dir $@)
624         $(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; }' >$@
625
626 src/shared/af-to-name.h: src/shared/af-list.txt
627         $(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 "};"}' <$< >$@
628
629
630 src/shared/arphrd-list.txt:
631         $(AM_V_at)$(MKDIR_P) $(dir $@)
632         $(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_//' >$@
633
634 src/shared/arphrd-to-name.h: src/shared/arphrd-list.txt
635         $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const arphrd_names[] = { "} !/CISCO/ { printf "[ARPHRD_%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
636
637 src/shared/arphrd-from-name.gperf: src/shared/arphrd-list.txt
638         $(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 }' <$< >$@
639
640
641 src/shared/cap-list.txt:
642         $(AM_V_at)$(MKDIR_P) $(dir $@)
643         $(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 >$@
644
645 src/shared/cap-to-name.h: src/shared/cap-list.txt
646         $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const capability_names[] = { "} { printf "[%s] = \"%s\",\n", $$1, tolower($$1) } END{print "};"}' <$< >$@
647
648 src/shared/cap-from-name.gperf: src/shared/cap-list.txt
649         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct capability_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' <$< >$@
650
651 src/shared/cap-from-name.h: src/shared/cap-from-name.gperf
652         $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_capability -H hash_capability_name -p -C <$< >$@
653
654 # ------------------------------------------------------------------------------
655 dist_factory_etc_DATA = \
656         factory/etc/nsswitch.conf
657
658 if HAVE_PAM
659 dist_factory_pam_DATA = \
660         factory/etc/pam.d/system-auth \
661         factory/etc/pam.d/other
662 endif
663
664 # ------------------------------------------------------------------------------
665 noinst_LTLIBRARIES += \
666         libelogind-internal.la
667
668 libelogind_internal_la_SOURCES = \
669         src/systemd/sd-bus.h \
670         src/systemd/sd-bus-protocol.h \
671         src/systemd/sd-bus-vtable.h \
672         src/systemd/sd-utf8.h \
673         src/systemd/sd-event.h \
674         src/systemd/sd-rtnl.h \
675         src/systemd/sd-resolve.h \
676         src/systemd/sd-login.h \
677         src/systemd/sd-id128.h \
678         src/systemd/sd-daemon.h \
679         src/systemd/sd-path.h \
680         src/systemd/sd-network.h \
681         src/systemd/sd-device.h \
682         src/libelogind/sd-bus/sd-bus.c \
683         src/libelogind/sd-bus/bus-control.c \
684         src/libelogind/sd-bus/bus-control.h \
685         src/libelogind/sd-bus/bus-error.c \
686         src/libelogind/sd-bus/bus-error.h \
687         src/libelogind/sd-bus/bus-common-errors.h \
688         src/libelogind/sd-bus/bus-common-errors.c \
689         src/libelogind/sd-bus/bus-internal.c \
690         src/libelogind/sd-bus/bus-internal.h \
691         src/libelogind/sd-bus/bus-socket.c \
692         src/libelogind/sd-bus/bus-socket.h \
693         src/libelogind/sd-bus/bus-kernel.c \
694         src/libelogind/sd-bus/bus-kernel.h \
695         src/libelogind/sd-bus/bus-container.c \
696         src/libelogind/sd-bus/bus-container.h \
697         src/libelogind/sd-bus/bus-message.c \
698         src/libelogind/sd-bus/bus-message.h \
699         src/libelogind/sd-bus/bus-creds.c \
700         src/libelogind/sd-bus/bus-creds.h \
701         src/libelogind/sd-bus/bus-signature.c \
702         src/libelogind/sd-bus/bus-signature.h \
703         src/libelogind/sd-bus/bus-type.c \
704         src/libelogind/sd-bus/bus-type.h \
705         src/libelogind/sd-bus/bus-match.c \
706         src/libelogind/sd-bus/bus-match.h \
707         src/libelogind/sd-bus/bus-bloom.c \
708         src/libelogind/sd-bus/bus-bloom.h \
709         src/libelogind/sd-bus/bus-introspect.c \
710         src/libelogind/sd-bus/bus-introspect.h \
711         src/libelogind/sd-bus/bus-objects.c \
712         src/libelogind/sd-bus/bus-objects.h \
713         src/libelogind/sd-bus/bus-gvariant.c \
714         src/libelogind/sd-bus/bus-gvariant.h \
715         src/libelogind/sd-bus/bus-convenience.c \
716         src/libelogind/sd-bus/bus-track.c \
717         src/libelogind/sd-bus/bus-track.h \
718         src/libelogind/sd-bus/bus-util.c \
719         src/libelogind/sd-bus/bus-util.h \
720         src/libelogind/sd-bus/bus-slot.c \
721         src/libelogind/sd-bus/bus-slot.h \
722         src/libelogind/sd-bus/bus-protocol.h \
723         src/libelogind/sd-bus/kdbus.h \
724         src/libelogind/sd-utf8/sd-utf8.c \
725         src/libelogind/sd-event/sd-event.c \
726         src/libelogind/sd-event/event-util.h \
727         src/libelogind/sd-rtnl/sd-rtnl.c \
728         src/libelogind/sd-rtnl/rtnl-internal.h \
729         src/libelogind/sd-rtnl/rtnl-message.c \
730         src/libelogind/sd-rtnl/rtnl-types.h \
731         src/libelogind/sd-rtnl/rtnl-types.c \
732         src/libelogind/sd-rtnl/rtnl-util.h \
733         src/libelogind/sd-rtnl/rtnl-util.c \
734         src/libelogind/sd-rtnl/local-addresses.h \
735         src/libelogind/sd-rtnl/local-addresses.c \
736         src/libelogind/sd-id128/sd-id128.c \
737         src/libelogind/sd-daemon/sd-daemon.c \
738         src/libelogind/sd-login/sd-login.c \
739         src/libelogind/sd-path/sd-path.c \
740         src/libelogind/sd-network/sd-network.c \
741         src/libelogind/sd-network/network-util.h \
742         src/libelogind/sd-network/network-util.c \
743         src/libelogind/sd-device/device-internal.h \
744         src/libelogind/sd-device/device-util.h \
745         src/libelogind/sd-device/sd-device.c \
746         src/libelogind/sd-device/device-private.c \
747         src/libelogind/sd-device/device-private.h
748
749 nodist_libelogind_internal_la_SOURCES = \
750         src/libelogind/libelogind.sym
751
752 libelogind_internal_la_CFLAGS = \
753         $(AM_CFLAGS) \
754         -pthread
755
756 BUILT_SOURCES += \
757        src/libelogind/libelogind.sym
758
759
760 libelogind_internal_la_LIBADD = \
761         $(RT_LIBS) \
762         libelogind-shared.la
763
764 libelogind_internal_la_LDFLAGS = \
765         $(AM_LDFLAGS) \
766         -version-info $(LIBELOGIND_CURRENT):$(LIBELOGIND_REVISION):$(LIBELOGIND_AGE) \
767         -Wl,--version-script=$(top_builddir)/src/libelogind/libelogind.sym
768
769 libelogind-install-hook:
770         libname=libelogind.so && $(move-to-rootlibdir)
771
772 libelogind-uninstall-hook:
773         rm -f $(DESTDIR)$(rootlibdir)/libelogind.so*
774
775 INSTALL_EXEC_HOOKS += libelogind-install-hook
776 UNINSTALL_EXEC_HOOKS += libelogind-uninstall-hook
777
778 pkgconfiglib_DATA += \
779         src/libelogind/libsystemd.pc
780
781 pkginclude_HEADERS += \
782         src/systemd/sd-login.h
783
784 # ------------------------------------------------------------------------------
785 elogind_SOURCES = \
786         src/login/logind.c \
787         src/login/logind.h
788
789 nodist_elogind_SOURCES = \
790         src/login/logind-gperf.c
791
792 elogind_LDADD = \
793         libelogind-core.la
794
795 libelogind_core_la_SOURCES = \
796         src/login/logind-core.c \
797         src/login/logind-device.c \
798         src/login/logind-device.h \
799         src/login/logind-button.c \
800         src/login/logind-button.h \
801         src/login/logind-action.c \
802         src/login/logind-action.h \
803         src/login/logind-seat.c \
804         src/login/logind-seat.h \
805         src/login/logind-session.c \
806         src/login/logind-session.h \
807         src/login/logind-session-device.c \
808         src/login/logind-session-device.h \
809         src/login/logind-user.c \
810         src/login/logind-user.h \
811         src/login/logind-inhibit.c \
812         src/login/logind-inhibit.h \
813         src/login/logind-dbus.c \
814         src/login/logind-session-dbus.c \
815         src/login/logind-seat-dbus.c \
816         src/login/logind-user-dbus.c \
817         src/login/logind-acl.h
818
819 libelogind_core_la_LIBADD = \
820         $(UDEV_LIBS) \
821         libelogind-internal.la
822
823 if HAVE_ACL
824 libelogind_core_la_SOURCES += \
825         src/login/logind-acl.c
826
827 libelogind_core_la_LIBADD += \
828         libelogind-acl.la
829 endif
830
831 noinst_LTLIBRARIES += \
832         libelogind-core.la
833
834 rootlibexec_PROGRAMS += \
835         elogind
836
837 loginctl_SOURCES = \
838         src/login/loginctl.c \
839         src/login/sysfs-show.h \
840         src/login/sysfs-show.c
841
842 loginctl_LDADD = \
843         $(UDEV_LIBS) \
844         libelogind-internal.la \
845         libelogind-shared.la
846
847 rootbin_PROGRAMS += \
848         loginctl
849
850 dist_bashcompletion_DATA += \
851         shell-completion/bash/loginctl
852
853 dist_zshcompletion_DATA += \
854         shell-completion/zsh/_loginctl \
855         shell-completion/zsh/_systemd-inhibit
856
857 systemd_inhibit_SOURCES = \
858         src/login/inhibit.c
859
860 systemd_inhibit_LDADD = \
861         libelogind-internal.la \
862         libelogind-shared.la
863
864 rootbin_PROGRAMS += \
865         systemd-inhibit
866
867 test_login_SOURCES = \
868         src/libelogind/sd-login/test-login.c
869
870 test_login_LDADD = \
871         libelogind-internal.la \
872         libelogind-shared.la
873
874 test_login_shared_SOURCES = \
875         src/login/test-login-shared.c
876
877 test_login_shared_LDADD = \
878         libelogind-internal.la \
879         libelogind-shared.la
880
881 test_inhibit_SOURCES = \
882         src/login/test-inhibit.c
883
884 test_inhibit_LDADD = \
885         libelogind-internal.la \
886         libelogind-shared.la
887
888 test_login_tables_SOURCES = \
889         src/login/test-login-tables.c
890
891 test_login_tables_LDADD = \
892         libelogind-core.la
893
894 manual_tests += \
895         test-login \
896         test-inhibit
897
898 tests += \
899         test-login-tables \
900         test-login-shared
901
902 if HAVE_PAM
903 pam_elogind_la_SOURCES = \
904         src/login/pam_elogind.sym \
905         src/login/pam_elogind.c
906
907 pam_elogind_la_CFLAGS = \
908         $(AM_CFLAGS) \
909         $(PAM_CFLAGS) \
910         -fvisibility=hidden
911
912 pam_elogind_la_LDFLAGS = \
913         $(AM_LDFLAGS) \
914         -module \
915         -export-dynamic \
916         -avoid-version \
917         -shared \
918         -Wl,--version-script=$(top_srcdir)/src/login/pam_elogind.sym
919
920 pam_elogind_la_LIBADD = \
921         libelogind-internal.la \
922         $(PAM_LIBS)
923
924 pamlib_LTLIBRARIES = \
925         pam_elogind.la
926
927 dist_pamconf_DATA = \
928         src/login/elogind-user
929
930 endif
931
932 dist_dbussystemservice_DATA += \
933         src/login/org.freedesktop.login1.service
934
935 dist_dbuspolicy_DATA += \
936         src/login/org.freedesktop.login1.conf
937
938 dist_pkgsysconf_DATA += \
939         src/login/logind.conf
940
941 polkitpolicy_files += \
942         src/login/org.freedesktop.login1.policy
943
944 INSTALL_DIRS += \
945         $(elogindstatedir)
946
947 SYSTEM_UNIT_ALIASES += \
948         elogind.service dbus-org.freedesktop.login1.service
949
950 dist_udevrules_DATA = \
951         src/login/70-uaccess.rules \
952         src/login/70-power-switch.rules
953
954 nodist_udevrules_DATA = \
955         src/login/71-seat.rules \
956         src/login/73-seat-late.rules
957
958 polkitpolicy_in_files += \
959         src/login/org.freedesktop.login1.policy.in
960
961 gperf_gperf_sources = \
962         src/login/logind-gperf.gperf
963
964 EXTRA_DIST += \
965         src/login/71-seat.rules.in \
966         src/login/73-seat-late.rules.in
967
968 # ------------------------------------------------------------------------------
969 substitutions = \
970        '|rootlibexecdir=$(rootlibexecdir)|' \
971        '|rootbindir=$(rootbindir)|' \
972        '|bindir=$(bindir)|' \
973        '|pkgsysconfdir=$(pkgsysconfdir)|' \
974        '|SYSTEM_CONFIG_UNIT_PATH=$(pkgsysconfdir)/system|' \
975        '|USER_CONFIG_UNIT_PATH=$(pkgsysconfdir)/user|' \
976        '|pkgdatadir=$(pkgdatadir)|' \
977        '|systemunitdir=$(systemunitdir)|' \
978        '|userunitdir=$(userunitdir)|' \
979        '|systempresetdir=$(systempresetdir)|' \
980        '|userpresetdir=$(userpresetdir)|' \
981        '|udevrulesdir=$(udevrulesdir)|' \
982        '|catalogdir=$(catalogdir)|' \
983        '|tmpfilesdir=$(tmpfilesdir)|' \
984        '|sysusersdir=$(sysusersdir)|' \
985        '|sysctldir=$(sysctldir)|' \
986        '|systemgeneratordir=$(systemgeneratordir)|' \
987        '|usergeneratordir=$(usergeneratordir)|' \
988        '|CERTIFICATEROOT=$(CERTIFICATEROOT)|' \
989        '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
990        '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
991        '|PACKAGE_URL=$(PACKAGE_URL)|' \
992        '|RANDOM_SEED_DIR=$(localstatedir)/lib/elogind/|' \
993        '|RANDOM_SEED=$(localstatedir)/lib/elogind/random-seed|' \
994        '|prefix=$(prefix)|' \
995        '|exec_prefix=$(exec_prefix)|' \
996        '|libdir=$(libdir)|' \
997        '|includedir=$(includedir)|' \
998        '|VERSION=$(VERSION)|' \
999        '|rootprefix=$(rootprefix)|' \
1000        '|udevlibexecdir=$(udevlibexecdir)|' \
1001        '|SUSHELL=$(SUSHELL)|' \
1002        '|SULOGIN=$(SULOGIN)|' \
1003        '|DEBUGTTY=$(DEBUGTTY)|' \
1004        '|KILL=$(KILL)|' \
1005        '|KMOD=$(KMOD)|' \
1006        '|MKDIR_P=$(MKDIR_P)|' \
1007        '|QUOTAON=$(QUOTAON)|' \
1008        '|QUOTACHECK=$(QUOTACHECK)|' \
1009        '|SYSTEM_SYSVINIT_PATH=$(sysvinitdir)|' \
1010        '|VARLOGDIR=$(varlogdir)|' \
1011        '|RC_LOCAL_SCRIPT_PATH_START=$(RC_LOCAL_SCRIPT_PATH_START)|' \
1012        '|RC_LOCAL_SCRIPT_PATH_STOP=$(RC_LOCAL_SCRIPT_PATH_STOP)|' \
1013        '|PYTHON=$(PYTHON)|' \
1014        '|PYTHON_BINARY=$(PYTHON_BINARY)|' \
1015        '|NTP_SERVERS=$(NTP_SERVERS)|' \
1016        '|DNS_SERVERS=$(DNS_SERVERS)|' \
1017        '|systemuidmax=$(SYSTEM_UID_MAX)|' \
1018        '|systemgidmax=$(SYSTEM_GID_MAX)|' \
1019        '|TTY_GID=$(TTY_GID)|' \
1020        '|systemsleepdir=$(systemsleepdir)|' \
1021        '|systemshutdowndir=$(systemshutdowndir)|' \
1022        '|binfmtdir=$(binfmtdir)|' \
1023        '|modulesloaddir=$(modulesloaddir)|'
1024
1025 SED_PROCESS = \
1026         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1027         $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
1028                 < $< > $@
1029
1030 units/%: units/%.in
1031         $(SED_PROCESS)
1032
1033 man/%: man/%.in
1034         $(SED_PROCESS)
1035
1036 sysctl.d/%: sysctl.d/%.in
1037         $(SED_PROCESS)
1038
1039 %.pc: %.pc.in
1040         $(SED_PROCESS)
1041
1042 %.conf: %.conf.in
1043         $(SED_PROCESS)
1044
1045 src/%.policy.in: src/%.policy.in.in
1046         $(SED_PROCESS)
1047
1048 shell-completion/%: shell-completion/%.in
1049         $(SED_PROCESS)
1050
1051 %.rules: %.rules.in
1052         $(SED_PROCESS)
1053
1054 %.conf: %.conf.in
1055         $(SED_PROCESS)
1056
1057 %.sh: %.sh.in
1058         $(SED_PROCESS)
1059         $(AM_V_GEN)chmod +x $@
1060
1061 src/%.c: src/%.gperf
1062         $(AM_V_at)$(MKDIR_P) $(dir $@)
1063         $(AM_V_GPERF)$(GPERF) < $< > $@
1064
1065 src/%: src/%.m4
1066         $(AM_V_at)$(MKDIR_P) $(dir $@)
1067         $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
1068
1069 sysusers.d/%: sysusers.d/%.m4
1070         $(AM_V_at)$(MKDIR_P) $(dir $@)
1071         $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
1072
1073 tmpfiles.d/%: tmpfiles.d/%.m4
1074         $(AM_V_at)$(MKDIR_P) $(dir $@)
1075         $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
1076
1077
1078 units/%: units/%.m4
1079         $(AM_V_at)$(MKDIR_P) $(dir $@)
1080         $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_SYSTEM=1 < $< > $@
1081
1082 units/user/%: units/user/%.m4
1083         $(AM_V_at)$(MKDIR_P) $(dir $@)
1084         $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_USER=1 < $< > $@
1085
1086 if ENABLE_POLKIT
1087 nodist_polkitpolicy_DATA = \
1088         $(polkitpolicy_files) \
1089         $(polkitpolicy_in_in_files:.policy.in.in=.policy)
1090 endif
1091
1092 EXTRA_DIST += \
1093         $(polkitpolicy_in_files) \
1094         $(polkitpolicy_in_in_files)
1095
1096 # ------------------------------------------------------------------------------
1097 if ENABLE_MANPAGES
1098 man/custom-entities.ent: configure.ac
1099         $(AM_V_GEN)$(MKDIR_P) $(dir $@)
1100         $(AM_V_GEN)(echo '<?xml version="1.0" encoding="utf-8" ?>' && \
1101          printf '$(subst '|,<!ENTITY ,$(subst =, ",$(subst |',">\n,$(substitutions))))') \
1102          > $@ # '
1103
1104 DISTCLEANFILES += \
1105         man/custom-entities.ent
1106
1107 XSLTPROC_FLAGS = \
1108         --nonet \
1109         --xinclude \
1110         --stringparam man.output.quietly 1 \
1111         --stringparam funcsynopsis.style ansi \
1112         --stringparam man.authors.section.enabled 0 \
1113         --stringparam man.copyright.section.enabled 0 \
1114         --stringparam elogind.version $(VERSION) \
1115         --path '$(builddir)/man:$(srcdir)/man'
1116
1117 XSLTPROC_PROCESS_MAN = \
1118         $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-man.xsl $<
1119
1120 XSLTPROC_PROCESS_HTML = \
1121         $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
1122
1123 man/%.1: man/%.xml man/custom-man.xsl man/custom-entities.ent
1124         $(XSLTPROC_PROCESS_MAN)
1125
1126 man/%.3: man/%.xml man/custom-man.xsl man/custom-entities.ent
1127         $(XSLTPROC_PROCESS_MAN)
1128
1129 man/%.5: man/%.xml man/custom-man.xsl man/custom-entities.ent
1130         $(XSLTPROC_PROCESS_MAN)
1131
1132 man/%.7: man/%.xml man/custom-man.xsl man/custom-entities.ent
1133         $(XSLTPROC_PROCESS_MAN)
1134
1135 man/%.8: man/%.xml man/custom-man.xsl man/custom-entities.ent
1136         $(XSLTPROC_PROCESS_MAN)
1137
1138 man/%.html: man/%.xml man/custom-html.xsl man/custom-entities.ent
1139         $(XSLTPROC_PROCESS_HTML)
1140
1141 define html-alias
1142         $(AM_V_LN)$(LN_S) -f $(notdir $<) $@
1143 endef
1144
1145 endif
1146
1147 EXTRA_DIST += \
1148         man/custom-html.xsl \
1149         man/custom-man.xsl
1150
1151 install-exec-hook: $(INSTALL_EXEC_HOOKS)
1152
1153 uninstall-hook: $(UNINSTALL_DATA_HOOKS) $(UNINSTALL_EXEC_HOOKS)
1154
1155 install-data-hook: $(INSTALL_DATA_HOOKS)
1156
1157 distclean-local: $(DISTCLEAN_LOCAL_HOOKS)
1158
1159 clean-local: $(CLEAN_LOCAL_HOOKS)
1160         rm -rf $(abs_srcdir)/install-tree
1161
1162 DISTCHECK_CONFIGURE_FLAGS = \
1163         --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
1164         --with-dbussessionservicedir=$$dc_install_base/$(dbussessionservicedir) \
1165         --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
1166         --with-bashcompletiondir=$$dc_install_base/$(bashcompletiondir) \
1167         --with-zshcompletiondir=$$dc_install_base/$(zshcompletiondir) \
1168         --with-pamlibdir=$$dc_install_base/$(pamlibdir) \
1169         --with-pamconfdir=$$dc_install_base/$(pamconfdir) \
1170         --with-rootprefix=$$dc_install_base \
1171         --disable-split-usr \
1172         --enable-kdbus
1173
1174 DISTCHECK_CONFIGURE_FLAGS += \
1175         --with-sysvinit-path= \
1176         --with-sysvrcnd-path=
1177
1178 if ENABLE_GTK_DOC
1179 DISTCHECK_CONFIGURE_FLAGS += \
1180         --enable-gtk-doc
1181 endif
1182
1183 #
1184 # Require python when making dist
1185 #
1186 .PHONY: dist-check-help
1187
1188 dist-check-help: $(rootbin_PROGRAMS) $(bin_PROGRAMS)
1189         for i in $(abspath $^); do                                             \
1190             if $$i  --help | grep -v 'default:' | grep -E -q '.{80}.' ; then   \
1191                 echo "$(basename $$i) --help output is too wide:";             \
1192                 $$i  --help | awk 'length > 80' | grep -E --color=yes '.{80}'; \
1193                 exit 1;                                                        \
1194             fi; done
1195
1196 dist: dist-check-python