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