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