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