chiark / gitweb /
bus: split socket related code into bus-socket.[ch], to prepare for kdbus backend
[elogind.git] / Makefile.am
index 4ff0cff8bbe43dd9a796e83f73f49339bad255c1..f9589748338a9f22a4adb077e8c9d3395557274e 100644 (file)
@@ -31,17 +31,17 @@ SUBDIRS = . po
 # keep intermediate files
 .SECONDARY:
 
-LIBUDEV_CURRENT=3
-LIBUDEV_REVISION=1
-LIBUDEV_AGE=2
+LIBUDEV_CURRENT=4
+LIBUDEV_REVISION=0
+LIBUDEV_AGE=3
 
 LIBGUDEV_CURRENT=1
 LIBGUDEV_REVISION=3
 LIBGUDEV_AGE=1
 
-LIBSYSTEMD_LOGIN_CURRENT=3
-LIBSYSTEMD_LOGIN_REVISION=11
-LIBSYSTEMD_LOGIN_AGE=3
+LIBSYSTEMD_LOGIN_CURRENT=4
+LIBSYSTEMD_LOGIN_REVISION=0
+LIBSYSTEMD_LOGIN_AGE=4
 
 LIBSYSTEMD_DAEMON_CURRENT=0
 LIBSYSTEMD_DAEMON_REVISION=7
@@ -51,9 +51,9 @@ LIBSYSTEMD_ID128_CURRENT=0
 LIBSYSTEMD_ID128_REVISION=17
 LIBSYSTEMD_ID128_AGE=0
 
-LIBSYSTEMD_JOURNAL_CURRENT=7
-LIBSYSTEMD_JOURNAL_REVISION=1
-LIBSYSTEMD_JOURNAL_AGE=7
+LIBSYSTEMD_JOURNAL_CURRENT=8
+LIBSYSTEMD_JOURNAL_REVISION=0
+LIBSYSTEMD_JOURNAL_AGE=8
 
 # Dirs of external packages
 dbuspolicydir=@dbuspolicydir@
@@ -64,7 +64,7 @@ pamlibdir=@pamlibdir@
 pkgconfigdatadir=$(datadir)/pkgconfig
 pkgconfiglibdir=$(libdir)/pkgconfig
 polkitpolicydir=$(datadir)/polkit-1/actions
-bashcompletiondir=$(sysconfdir)/bash_completion.d
+bashcompletiondir=@bashcompletiondir@
 rpmmacrosdir=$(sysconfdir)/rpm
 sysvinitdir=$(SYSTEM_SYSVINIT_PATH)
 sysvrcnddir=$(SYSTEM_SYSVRCND_PATH)
@@ -104,17 +104,18 @@ UNINSTALL_EXEC_HOOKS =
 INSTALL_DATA_HOOKS =
 UNINSTALL_DATA_HOOKS =
 DISTCLEAN_LOCAL_HOOKS =
+CLEAN_LOCAL_HOOKS =
 pkginclude_HEADERS =
 noinst_LTLIBRARIES =
 lib_LTLIBRARIES =
 include_HEADERS =
+noinst_DATA =
 pkgconfiglib_DATA =
 polkitpolicy_in_in_files =
 polkitpolicy_in_files =
 polkitpolicy_files =
 dist_udevrules_DATA =
 nodist_udevrules_DATA =
-dist_man_MANS =
 dist_pkgsysconf_DATA =
 dist_pkgdata_DATA =
 dist_dbuspolicy_DATA =
@@ -176,7 +177,7 @@ define move-to-rootlibdir
                $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
                so_img_name=$$(readlink $(DESTDIR)$(libdir)/$$libname) && \
                so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
-               ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/$$libname && \
+               $(LN_S) -f $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/$$libname && \
                mv $(DESTDIR)$(libdir)/$$libname.* $(DESTDIR)$(rootlibdir); \
        fi
 endef
@@ -260,6 +261,10 @@ AM_V_GPERF = $(AM_V_GPERF_$(V))
 AM_V_GPERF_ = $(AM_V_GPERF_$(AM_DEFAULT_VERBOSITY))
 AM_V_GPERF_0 = @echo "  GPERF   " $@;
 
+AM_V_LN = $(AM_V_LN_$(V))
+AM_V_LN_ = $(AM_V_LN_$(AM_DEFAULT_VERBOSITY))
+AM_V_LN_0 = @echo "  LN      " $@;
+
 # ------------------------------------------------------------------------------
 rootbin_PROGRAMS = \
        systemctl \
@@ -267,8 +272,7 @@ rootbin_PROGRAMS = \
        systemd-ask-password \
        systemd-tty-ask-password-agent \
        systemd-tmpfiles \
-       systemd-machine-id-setup \
-       systemd-analyze
+       systemd-machine-id-setup
 
 bin_PROGRAMS = \
        systemd-cgls \
@@ -276,7 +280,14 @@ bin_PROGRAMS = \
        systemd-stdio-bridge \
        systemd-nspawn \
        systemd-detect-virt \
-       systemd-delta
+       systemd-delta \
+       systemd-analyze
+
+bin_SCRIPTS = \
+       src/kernel-install/kernel-install
+
+EXTRA_DIST += \
+       src/kernel-install/kernel-install
 
 rootlibexec_PROGRAMS = \
        systemd \
@@ -310,13 +321,18 @@ systemd_analyze_LDADD = \
        libsystemd-dbus.la
 
 dist_bashcompletion_DATA = \
-       shell-completion/systemd-bash-completion.sh
+       shell-completion/bash/journalctl \
+       shell-completion/bash/systemctl \
+       shell-completion/bash/udevadm
 
 dist_tmpfiles_DATA = \
        tmpfiles.d/systemd.conf \
        tmpfiles.d/tmp.conf \
        tmpfiles.d/x11.conf
 
+dist_sysctl_DATA = \
+       sysctl.d/50-default.conf
+
 if HAVE_SYSV_COMPAT
 dist_tmpfiles_DATA += \
        tmpfiles.d/legacy.conf
@@ -334,6 +350,9 @@ dist_systemunit_DATA = \
        units/kexec.target \
        units/local-fs.target \
        units/local-fs-pre.target \
+       units/initrd.target \
+       units/initrd-fs.target \
+       units/initrd-root-fs.target \
        units/remote-fs.target \
        units/remote-fs-pre.target \
        units/network.target \
@@ -373,7 +392,8 @@ dist_systemunit_DATA = \
        units/systemd-ask-password-console.path \
        units/systemd-udevd-control.socket \
        units/systemd-udevd-kernel.socket \
-       units/system-update.target
+       units/system-update.target \
+       units/initrd-switch-root.target
 
 nodist_systemunit_DATA = \
        units/getty@.service \
@@ -405,7 +425,11 @@ nodist_systemunit_DATA = \
        units/systemd-udevd.service \
        units/systemd-udev-trigger.service \
        units/systemd-udev-settle.service \
-       units/debug-shell.service
+       units/debug-shell.service \
+       units/initrd-parse-etc.service \
+       units/initrd-cleanup.service \
+       units/initrd-udevadm-cleanup-db.service \
+       units/initrd-switch-root.service
 
 dist_userunit_DATA = \
        units/user/default.target \
@@ -447,8 +471,11 @@ EXTRA_DIST += \
        units/systemd-hybrid-sleep.service.in \
        units/systemd-suspend.service.in \
        units/quotaon.service.in \
-       introspect.awk \
-       man/custom-html.xsl
+       units/initrd-parse-etc.service.in \
+       units/initrd-cleanup.service.in \
+       units/initrd-udevadm-cleanup-db.service.in \
+       units/initrd-switch-root.service.in \
+       introspect.awk
 
 CLEANFILES += \
        units/console-shell.service.m4 \
@@ -487,33 +514,48 @@ include Makefile-man.am
 
 XML_FILES = \
        ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
+HTML_FILES = \
+       ${XML_FILES:.xml=.html}
+HTML_ALIAS = \
+       ${patsubst %.1,%.html,${patsubst %.3,%.html,${patsubst %.5,%.html,${patsubst %.7,%.html,${patsubst %.8,%.html,$(MANPAGES_ALIAS)}}}}}
 
 if ENABLE_MANPAGES
 man_MANS = \
        $(MANPAGES) \
        $(MANPAGES_ALIAS)
 
-noinst_DATA = \
-       ${XML_FILES:.xml=.html}
+noinst_DATA += \
+       $(HTML_FILES) \
+       $(HTML_ALIAS)
 
 CLEANFILES += \
-       $(MANPAGES) \
-       $(MANPAGES_ALIAS) \
-       ${XML_FILES:.xml=.html}
+       $(man_MANS) \
+       $(HTML_FILES) \
+       $(HTML_ALIAS)
+
+docs/html/man:
+       $(AM_V_at)$(MKDIR_P) $(dir $@)
+       $(AM_V_LN)$(LN_S) -f ../../man $@
+
+noinst_DATA += \
+       docs/html/man
+
+CLEANFILES += \
+       docs/html/man
 
 if HAVE_PYTHON
+man/index.html: man/systemd.index.html
+       $(AM_V_LN)$(LN_S) -f systemd.index.html $@
+
 noinst_DATA += \
        man/index.html
 
 CLEANFILES += \
-       man/index.html
-
-man/index.html:
-       $(AM_V_GEN)$(LN_S) systemd.index.html $@
+       man/index.html
 
 NON_INDEX_XML_FILES = $(filter-out man/systemd.index.xml,$(XML_FILES))
 
-XML_GLOB = $(wildcard $(top_srcdir)/man/*.xml $(top_srcdir)/man/*.xml.in)
+XML_GLOB = $(wildcard $(top_srcdir)/man/*.xml $(top_srcdir)/man/*.xml.in $(top_builddir)/man/*.xml)
 update-man-list: make-man-rules.py $(XML_GLOB)
        $(AM_V_GEN)$(PYTHON) $^ > $(top_srcdir)/Makefile-man.tmp
        $(AM_V_at)mv $(top_srcdir)/Makefile-man.tmp $(top_srcdir)/Makefile-man.am
@@ -532,15 +574,19 @@ EXTRA_DIST += \
        man/index.html \
        man/systemd.directives.xml
 
+CLEANFILES += \
+       man/systemd.index.xml \
+       man/systemd.directives.xml
+
 endif
 
 endif
 
 EXTRA_DIST += \
        $(XML_FILES) \
-       ${XML_FILES:.xml=.html} \
-       $(MANPAGES) \
-       $(MANPAGES_ALIAS) \
+       $(HTML_FILES) \
+       $(HTML_ALIAS) \
+       $(dist_MANS) \
        make-man-index.py \
        make-directive-index.py
 
@@ -574,6 +620,8 @@ libsystemd_shared_la_SOURCES = \
        src/shared/set.h \
        src/shared/fdset.c \
        src/shared/fdset.h \
+       src/shared/prioq.c \
+       src/shared/prioq.h \
        src/shared/strv.c \
        src/shared/strv.h \
        src/shared/env-util.c \
@@ -611,8 +659,6 @@ libsystemd_shared_la_SOURCES = \
        src/shared/watchdog.h \
        src/shared/spawn-ask-password-agent.c \
        src/shared/spawn-ask-password-agent.h \
-       src/shared/specifier.c \
-       src/shared/specifier.h \
        src/shared/replace-var.c \
        src/shared/replace-var.h \
        src/shared/spawn-polkit-agent.c \
@@ -656,7 +702,9 @@ libsystemd_units_la_SOURCES = \
        src/shared/install-printf.c \
        src/shared/install-printf.h \
        src/shared/path-lookup.c \
-       src/shared/path-lookup.h
+       src/shared/path-lookup.h \
+       src/shared/specifier.c \
+       src/shared/specifier.h
 
 libsystemd_units_la_CFLAGS = \
        $(AM_CFLAGS) \
@@ -745,7 +793,8 @@ libsystemd_acl_la_CFLAGS = \
        $(ACL_CFLAGS)
 
 libsystemd_acl_la_LIBADD = \
-       $(ACL_LIBS)
+       $(ACL_LIBS) \
+       libsystemd-shared.la
 endif
 
 # ------------------------------------------------------------------------------
@@ -829,6 +878,8 @@ libsystemd_core_la_SOURCES = \
        src/core/selinux-access.h \
        src/core/selinux-setup.c \
        src/core/selinux-setup.h \
+       src/core/smack-setup.c \
+       src/core/smack-setup.h \
        src/core/ima-setup.c \
        src/core/ima-setup.h \
        src/core/locale-setup.h \
@@ -849,6 +900,8 @@ libsystemd_core_la_SOURCES = \
        src/core/tcpwrap.h \
        src/core/cgroup-attr.c \
        src/core/cgroup-attr.h \
+       src/core/cgroup-semantics.c \
+       src/core/cgroup-semantics.h \
        src/core/securebits.h \
        src/core/initreq.h \
        src/core/special.h \
@@ -1025,7 +1078,8 @@ noinst_tests += \
        test-sched-prio \
        test-calendarspec \
        test-strip-tab-ansi \
-       test-cgroup-util
+       test-cgroup-util \
+       test-prioq
 
 EXTRA_DIST += \
        test/sched_idle_bad.service \
@@ -1116,6 +1170,15 @@ test_util_CFLAGS = \
 test_util_LDADD = \
        libsystemd-core.la
 
+test_prioq_SOURCES = \
+       src/test/test-prioq.c
+
+test_prioq_CFLAGS = \
+       $(AM_CFLAGS)
+
+test_prioq_LDADD = \
+       libsystemd-core.la
+
 test_log_SOURCES = \
        src/test/test-log.c
 
@@ -1190,6 +1253,7 @@ test_strv_SOURCES = \
 
 test_strv_LDADD = \
        libsystemd-shared.la \
+       libsystemd-units.la \
        libsystemd-id128-internal.la
 
 test_strxcpyx_SOURCES = \
@@ -1301,12 +1365,10 @@ rootlibexec_PROGRAMS += \
 
 nodist_systemunit_DATA += \
        units/systemd-modules-load.service
+
 SYSINIT_TARGET_WANTS += \
        systemd-modules-load.service
 
-dist_udevrules_DATA += \
-       rules/80-drivers.rules
-
 endif
 
 EXTRA_DIST += \
@@ -1551,7 +1613,7 @@ libsystemd_daemon_la_SOURCES = \
        src/libsystemd-daemon/sd-daemon.c
 
 libsystemd_daemon_internal_la_SOURCES = \
-        $(libsystemd_daemon_la_SOURCES)
+       $(libsystemd_daemon_la_SOURCES)
 
 libsystemd_daemon_la_CFLAGS = \
        $(AM_CFLAGS) \
@@ -1560,7 +1622,6 @@ libsystemd_daemon_la_CFLAGS = \
 
 libsystemd_daemon_la_LDFLAGS = \
        $(AM_LDFLAGS) \
-       -shared \
        -version-info $(LIBSYSTEMD_DAEMON_CURRENT):$(LIBSYSTEMD_DAEMON_REVISION):$(LIBSYSTEMD_DAEMON_AGE) \
        -Wl,--version-script=$(top_srcdir)/src/libsystemd-daemon/libsystemd-daemon.sym
 
@@ -1581,7 +1642,7 @@ lib_LTLIBRARIES += \
        libsystemd-daemon.la
 
 noinst_LTLIBRARIES += \
-        libsystemd-daemon-internal.la
+       libsystemd-daemon-internal.la
 
 pkgconfiglib_DATA += \
        src/libsystemd-daemon/libsystemd-daemon.pc
@@ -1590,10 +1651,88 @@ EXTRA_DIST += \
        src/libsystemd-daemon/libsystemd-daemon.pc.in \
        src/libsystemd-daemon/libsystemd-daemon.sym
 
+# ------------------------------------------------------------------------------
+libsystemd_bus_la_SOURCES = \
+       src/libsystemd-bus/sd-bus.c \
+       src/libsystemd-bus/sd-bus.h \
+       src/libsystemd-bus/sd-bus-protocol.h \
+       src/libsystemd-bus/bus-control.c \
+       src/libsystemd-bus/bus-error.c \
+       src/libsystemd-bus/bus-error.h \
+       src/libsystemd-bus/bus-internal.c \
+       src/libsystemd-bus/bus-internal.h \
+       src/libsystemd-bus/bus-socket.c \
+       src/libsystemd-bus/bus-socket.h \
+       src/libsystemd-bus/bus-message.c \
+       src/libsystemd-bus/bus-message.h \
+       src/libsystemd-bus/bus-signature.c \
+       src/libsystemd-bus/bus-signature.h \
+       src/libsystemd-bus/bus-type.c \
+       src/libsystemd-bus/bus-type.h
+
+libsystemd_bus_la_LIBADD =  \
+       libsystemd-id128-internal.la \
+       libsystemd-shared.la
+
+noinst_LTLIBRARIES += \
+       libsystemd-bus.la
+
+noinst_tests += \
+       test-bus-marshal \
+       test-bus-signature \
+       test-bus-chat
+
+noinst_PROGRAMS += \
+       busctl
+
+test_bus_marshal_SOURCES = \
+       src/libsystemd-bus/test-bus-marshal.c
+
+test_bus_marshal_LDADD = \
+       libsystemd-shared.la \
+       libsystemd-bus.la \
+       $(GLIB_LIBS) \
+       $(DBUS_LIBS)
+
+test_bus_marshal_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(GLIB_CFLAGS) \
+       $(DBUS_CFLAGS)
+
+test_bus_signature_SOURCES = \
+       src/libsystemd-bus/test-bus-signature.c
+
+test_bus_signature_LDADD = \
+       libsystemd-shared.la \
+       libsystemd-bus.la
+
+test_bus_chat_SOURCES = \
+       src/libsystemd-bus/test-bus-chat.c
+
+test_bus_chat_CFLAGS = \
+       $(AM_CFLAGS) \
+       -pthread
+
+test_bus_chat_LDADD = \
+       libsystemd-shared.la \
+       libsystemd-bus.la \
+       libsystemd-id128-internal.la
+
+busctl_SOURCES = \
+       src/libsystemd-bus/busctl.c
+
+busctl_LDADD = \
+       libsystemd-shared.la \
+       libsystemd-bus.la
+
 # ------------------------------------------------------------------------------
 if ENABLE_GTK_DOC
 SUBDIRS += \
        docs/libudev
+
+noinst_DATA += \
+       docs/html/libudev \
+       docs/html/gudev
 endif
 
 include_HEADERS += \
@@ -1636,7 +1775,17 @@ EXTRA_DIST += \
        src/libudev/libudev.sym
 
 CLEANFILES += \
-       src/libudev/libudev.pc
+       src/libudev/libudev.pc \
+       docs/html/libudev \
+       docs/html/gudev
+
+docs/html/libudev:
+       $(AM_V_at)$(MKDIR_P) $(dir $@)
+       $(AM_V_LN)$(LN_S) -f ../libudev/html $@
+
+docs/html/gudev:
+       $(AM_V_at)$(MKDIR_P) $(dir $@)
+       $(AM_V_LN)$(LN_S) -f ../gudev/html $@
 
 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
 libudev-install-hook:
@@ -1686,9 +1835,9 @@ dist_udevrules_DATA += \
        rules/95-udev-late.rules
 
 dist_udevhwdb_DATA = \
-       hwdb/20-pci-vendor-product.hwdb \
+       hwdb/20-pci-vendor-model.hwdb \
        hwdb/20-pci-classes.hwdb \
-       hwdb/20-usb-vendor-product.hwdb \
+       hwdb/20-usb-vendor-model.hwdb \
        hwdb/20-usb-classes.hwdb \
        hwdb/20-bluetooth-vendor-product.hwdb \
        hwdb/20-acpi-vendor.hwdb \
@@ -1727,7 +1876,7 @@ SYSINIT_TARGET_WANTS += \
        systemd-udevd.service \
        systemd-udev-trigger.service
 
-bin_PROGRAMS += \
+rootbin_PROGRAMS += \
        udevadm
 
 rootlibexec_PROGRAMS += \
@@ -1745,7 +1894,6 @@ libudev_core_la_SOURCES = \
        src/udev/udev-ctrl.c \
        src/udev/udev-builtin.c \
        src/udev/udev-builtin-btrfs.c \
-       src/udev/udev-builtin-firmware.c \
        src/udev/udev-builtin-hwdb.c \
        src/udev/udev-builtin-input_id.c \
        src/udev/udev-builtin-net_id.c \
@@ -1769,9 +1917,20 @@ libudev_core_la_CPPFLAGS = \
        $(AM_CPPFLAGS) \
        -DFIRMWARE_PATH="$(FIRMWARE_PATH)"
 
+if ENABLE_FIRMWARE
+libudev_core_la_SOURCES += \
+       src/udev/udev-builtin-firmware.c
+
+dist_udevrules_DATA += \
+       rules/50-firmware.rules
+endif
+
 if HAVE_KMOD
 libudev_core_la_SOURCES += \
        src/udev/udev-builtin-kmod.c
+
+dist_udevrules_DATA += \
+       rules/80-drivers.rules
 endif
 
 if HAVE_BLKID
@@ -1813,7 +1972,7 @@ udevadm_LDADD = \
 # Update hwdb on installation. Do not bother if installing
 # in DESTDIR, since this is likely for packaging purposes.
 hwdb-update-hook:
-       -test -n "$(DESTDIR)" || $(bindir)/udevadm hwdb --update
+       -test -n "$(DESTDIR)" || $(rootbindir)/udevadm hwdb --update
 
 INSTALL_DATA_HOOKS += \
        hwdb-update-hook
@@ -2261,7 +2420,6 @@ libsystemd_id128_la_CFLAGS = \
 
 libsystemd_id128_la_LDFLAGS = \
        $(AM_LDFLAGS) \
-       -shared \
        -version-info $(LIBSYSTEMD_ID128_CURRENT):$(LIBSYSTEMD_ID128_REVISION):$(LIBSYSTEMD_ID128_AGE) \
        -Wl,--version-script=$(top_srcdir)/src/libsystemd-id128/libsystemd-id128.sym
 
@@ -2307,6 +2465,18 @@ EXTRA_DIST += \
        src/libsystemd-id128/libsystemd-id128.pc.in \
        src/libsystemd-id128/libsystemd-id128.sym
 
+# ------------------------------------------------------------------------------
+
+rootlibexec_PROGRAMS += \
+       systemd-activate
+
+systemd_activate_SOURCES = \
+       src/activate/activate.c
+
+systemd_activate_LDADD = \
+       libsystemd-shared.la \
+       libsystemd-daemon.la
+
 # ------------------------------------------------------------------------------
 systemd_journald_SOURCES = \
        src/journal/journald.c \
@@ -2336,6 +2506,11 @@ journalctl_LDADD = \
        libsystemd-id128-internal.la \
        libsystemd-logs.la
 
+if HAVE_ACL
+journalctl_LDADD += \
+       libsystemd-acl.la
+endif
+
 if HAVE_QRENCODE
 journalctl_SOURCES += \
        src/journal/journal-qrcode.c \
@@ -2348,13 +2523,6 @@ journalctl_LDADD += \
        $(QRENCODE_LIBS)
 endif
 
-systemd_coredumpctl_SOURCES = \
-       src/journal/coredumpctl.c
-
-systemd_coredumpctl_LDADD = \
-       libsystemd-shared.la \
-       libsystemd-journal.la
-
 test_journal_SOURCES = \
        src/journal/test-journal.c
 
@@ -2452,7 +2620,6 @@ libsystemd_journal_la_CFLAGS = \
 
 libsystemd_journal_la_LDFLAGS = \
        $(AM_LDFLAGS) \
-       -shared \
        -version-info $(LIBSYSTEMD_JOURNAL_CURRENT):$(LIBSYSTEMD_JOURNAL_REVISION):$(LIBSYSTEMD_JOURNAL_AGE) \
        -Wl,--version-script=$(top_srcdir)/src/journal/libsystemd-journal.sym
 
@@ -2544,9 +2711,16 @@ libsystemd_journal_internal_la_LIBADD += \
        $(GCRYPT_LIBS)
 endif
 
-# move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
+# move lib from $(libdir) to $(rootlibdir) and update devel link, if
+# needed. Also, grant read access to new journal files to members of
+# "adm" and "wheel".
 libsystemd-journal-install-hook:
        libname=libsystemd-journal.so && $(move-to-rootlibdir)
+       -$(MKDIR_P) $(DESTDIR)/var/log/journal
+       -chown 0:0 $(DESTDIR)/var/log/journal
+       -chmod 755 $(DESTDIR)/var/log/journal
+       -setfacl -nm g:adm:rx,d:g:adm:rx $(DESTDIR)/var/log/journal/
+       -setfacl -nm g:wheel:rx,d:g:wheel:rx $(DESTDIR)/var/log/journal/
 
 libsystemd-journal-uninstall-hook:
        rm -f $(DESTDIR)$(rootlibdir)/libsystemd-journal.so*
@@ -2554,6 +2728,8 @@ libsystemd-journal-uninstall-hook:
 INSTALL_EXEC_HOOKS += libsystemd-journal-install-hook
 UNINSTALL_EXEC_HOOKS += libsystemd-journal-uninstall-hook
 
+# ------------------------------------------------------------------------------
+
 # Update catalog on installation. Do not bother if installing
 # in DESTDIR, since this is likely for packaging purposes.
 catalog-update-hook:
@@ -2598,7 +2774,6 @@ rootbin_PROGRAMS += \
        journalctl
 
 bin_PROGRAMS += \
-       systemd-coredumpctl \
        systemd-cat
 
 dist_systemunit_DATA += \
@@ -2690,15 +2865,28 @@ endif
 rootlibexec_PROGRAMS += \
        systemd-coredump
 
+systemd_coredumpctl_SOURCES = \
+       src/journal/coredumpctl.c
+
+systemd_coredumpctl_LDADD = \
+       libsystemd-shared.la \
+       libsystemd-journal.la
+
+bin_PROGRAMS += \
+       systemd-coredumpctl
+
+dist_bashcompletion_DATA += \
+       shell-completion/bash/systemd-coredumpctl
+
 sysctl_DATA = \
-       sysctl.d/coredump.conf
+       sysctl.d/50-coredump.conf
 
 CLEANFILES += \
-       sysctl.d/coredump.conf
+       sysctl.d/50-coredump.conf
 endif
 
 EXTRA_DIST += \
-       sysctl.d/coredump.conf.in
+       sysctl.d/50-coredump.conf.in
 
 # ------------------------------------------------------------------------------
 if ENABLE_BINFMT
@@ -2795,8 +2983,10 @@ if ENABLE_BOOTCHART
 systemd_bootchart_SOURCES = \
        src/bootchart/bootchart.c \
        src/bootchart/bootchart.h \
-       src/bootchart/log.c \
-       src/bootchart/svg.c
+       src/bootchart/store.c \
+       src/bootchart/store.h \
+       src/bootchart/svg.c \
+       src/bootchart/svg.h
 
 systemd_bootchart_LDADD = \
        libsystemd-shared.la
@@ -2948,6 +3138,9 @@ hostnamectl_LDADD = \
 bin_PROGRAMS += \
        hostnamectl
 
+dist_bashcompletion_DATA += \
+       shell-completion/bash/hostnamectl
+
 endif
 
 polkitpolicy_in_files += \
@@ -3021,6 +3214,9 @@ localectl_LDADD = \
 bin_PROGRAMS += \
        localectl
 
+dist_bashcompletion_DATA += \
+       shell-completion/bash/localectl
+
 endif
 
 polkitpolicy_in_files += \
@@ -3087,6 +3283,9 @@ timedatectl_LDADD = \
 
 bin_PROGRAMS += \
        timedatectl
+
+dist_bashcompletion_DATA += \
+       shell-completion/bash/timedatectl
 endif
 
 polkitpolicy_in_files += \
@@ -3209,6 +3408,9 @@ loginctl_LDADD = \
 rootbin_PROGRAMS += \
        loginctl
 
+dist_bashcompletion_DATA += \
+       shell-completion/bash/loginctl
+
 systemd_inhibit_SOURCES = \
        src/login/inhibit.c
 
@@ -3254,12 +3456,12 @@ libsystemd_login_la_CFLAGS = \
 
 libsystemd_login_la_LDFLAGS = \
        $(AM_LDFLAGS) \
-       -shared \
        -version-info $(LIBSYSTEMD_LOGIN_CURRENT):$(LIBSYSTEMD_LOGIN_REVISION):$(LIBSYSTEMD_LOGIN_AGE) \
        -Wl,--version-script=$(top_srcdir)/src/login/libsystemd-login.sym
 
 libsystemd_login_la_LIBADD = \
-       libsystemd-shared.la
+       libsystemd-shared.la \
+       libsystemd-daemon-internal.la
 
 libsystemd_login_internal_la_SOURCES = \
        $(libsystemd_login_la_SOURCES)
@@ -3382,6 +3584,7 @@ if HAVE_PYTHON_DEVEL
 pkgpyexec_LTLIBRARIES = \
        _journal.la \
        id128.la \
+       _daemon.la \
        _reader.la
 
 _journal_la_SOURCES = \
@@ -3389,7 +3592,7 @@ _journal_la_SOURCES = \
 
 _journal_la_CFLAGS = \
        $(AM_CFLAGS) \
-        -fvisibility=default \
+       -fvisibility=default \
        $(PYTHON_CFLAGS)
 
 _journal_la_LDFLAGS = \
@@ -3404,11 +3607,13 @@ _journal_la_LIBADD = \
 
 id128_la_SOURCES = \
        src/python-systemd/id128.c \
-       src/python-systemd/id128-constants.h
+       src/python-systemd/id128-constants.h \
+       src/python-systemd/pyutil.c \
+       src/python-systemd/pyutil.h
 
 id128_la_CFLAGS = \
        $(AM_CFLAGS) \
-        -fvisibility=default \
+       -fvisibility=default \
        $(PYTHON_CFLAGS) \
        -I$(top_builddir)/src/python-systemd
 
@@ -3422,12 +3627,35 @@ id128_la_LIBADD = \
        $(PYTHON_LIBS) \
        libsystemd-id128.la
 
+_daemon_la_SOURCES = \
+       src/python-systemd/_daemon.c \
+       src/python-systemd/pyutil.c \
+       src/python-systemd/pyutil.h
+
+_daemon_la_CFLAGS = \
+       $(AM_CFLAGS) \
+       -fvisibility=default \
+       $(PYTHON_CFLAGS) \
+       -I$(top_builddir)/src/python-systemd
+
+_daemon_la_LDFLAGS = \
+       $(AM_LDFLAGS) \
+       -shared \
+       -module \
+       -avoid-version
+
+_daemon_la_LIBADD = \
+       $(PYTHON_LIBS) \
+       libsystemd-daemon.la
+
 _reader_la_SOURCES = \
-       src/python-systemd/_reader.c
+       src/python-systemd/_reader.c \
+       src/python-systemd/pyutil.c \
+       src/python-systemd/pyutil.h
 
 _reader_la_CFLAGS = \
        $(AM_CFLAGS) \
-        -fvisibility=default \
+       -fvisibility=default \
        $(PYTHON_CFLAGS)
 
 _reader_la_LDFLAGS = \
@@ -3439,33 +3667,41 @@ _reader_la_LDFLAGS = \
 _reader_la_LIBADD = \
        $(PYTHON_LIBS) \
        libsystemd-journal.la \
-       libsystemd-id128.la
+       libsystemd-id128.la \
+       libsystemd-shared.la
 
 dist_pkgpyexec_PYTHON = \
        src/python-systemd/journal.py \
+       src/python-systemd/daemon.py \
        src/python-systemd/__init__.py
 
 src/python-systemd/id128-constants.h: src/systemd/sd-messages.h Makefile
        $(AM_V_at)$(MKDIR_P) $(dir $@)
-       $(AM_V_GEN)$(SED) -n -r 's/,//g; s/#define (SD_MESSAGE_[A-Z0-9_]+)\s.*/add_id(m, "\1", \1);/p' <$< >$@
+       $(AM_V_GEN)$(SED) -n -r 's/,//g; s/#define (SD_MESSAGE_[A-Z0-9_]+)\s.*/add_id(m, "\1", \1) JOINER/p' <$< >$@
 
 BUILT_SOURCES += \
        src/python-systemd/id128-constants.h
-endif
 
 PAPER = $(shell cat /etc/papersize 2>/dev/null || echo a4)
-SPHINXOPTS = -D latex_paper_size=$(PAPER)
+SPHINXOPTS = -D latex_paper_size=$(PAPER) -D version=$(VERSION) -D release=$(VERSION)
 sphinx-%:
        $(AM_V_at)test -n "$(SPHINX_BUILD)" || { echo " *** sphinx-build is not available"; exit 1; }
-       $(AM_V_GEN)PYTHONPATH=$(DESTDIR)$(pyexecdir) LD_LIBRARY_PATH=$(DESTDIR)$(libdir) $(SPHINX_BUILD) -b $* $(SPHINXOPTS) $(top_srcdir)/src/python-systemd/docs $(top_builddir)/man/python-systemd/
-       $(AM_V_at)echo Output has been generated in $(abs_top_builddir)/man/python-systemd/
+       $(AM_V_GEN)PYTHONPATH=$(DESTDIR)$(pyexecdir) LD_LIBRARY_PATH=$(DESTDIR)$(libdir) $(SPHINX_BUILD) -b $* $(SPHINXOPTS) $(top_srcdir)/src/python-systemd/docs $(top_builddir)/docs/html/python-systemd/
+       $(AM_V_at)echo Output has been generated in $(abs_top_builddir)/docs/html/python-systemd/
 
 destdir-sphinx: all
-       dir="`mktemp -d /tmp/systemd-install.XXXXXX`" && \
+       dir="$$(mktemp -d /tmp/systemd-install.XXXXXX)" && \
                $(MAKE) DESTDIR="$$dir" install && \
-               $(MAKE) DESTDIR="$$dir" sphinx-html && \
+               $(MAKE) DESTDIR="$$dir" sphinx-html && \
                rm -rf "$$dir"
 
+endif
+
+CLEAN_LOCAL_HOOKS += clean-sphinx
+
+clean-sphinx:
+       -rm -rf docs/html/python-systemd/
+
 # ------------------------------------------------------------------------------
 SED_PROCESS = \
        $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
@@ -3564,7 +3800,6 @@ EXTRA_DIST += \
 CLEANFILES += \
        $(nodist_systemunit_DATA) \
        $(nodist_userunit_DATA) \
-       $(nodist_man_MANS) \
        $(pkgconfigdata_DATA) \
        $(pkgconfiglib_DATA) \
        $(nodist_polkitpolicy_DATA)
@@ -3575,41 +3810,46 @@ XSLTPROC_FLAGS = \
        --nonet \
        --stringparam man.output.quietly 1 \
        --stringparam funcsynopsis.style ansi \
-       --stringparam man.th.extra1.suppress 1 \
        --stringparam man.authors.section.enabled 0 \
-       --stringparam man.copyright.section.enabled 0
+       --stringparam man.copyright.section.enabled 0 \
+       --stringparam systemd.version $(VERSION)
 
 XSLTPROC_PROCESS_MAN = \
        $(AM_V_XSLT)$(MKDIR_P) $(dir $@) && \
-       $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
+       $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-man.xsl $<
 
 XSLTPROC_PROCESS_HTML = \
        $(AM_V_XSLT)$(MKDIR_P) $(dir $@) && \
        $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
 
-man/%.1: man/%.xml
+man/%.1: man/%.xml man/custom-man.xsl
        $(XSLTPROC_PROCESS_MAN)
 
-man/%.3: man/%.xml
+man/%.3: man/%.xml man/custom-man.xsl
        $(XSLTPROC_PROCESS_MAN)
 
-man/%.5: man/%.xml
+man/%.5: man/%.xml man/custom-man.xsl
        $(XSLTPROC_PROCESS_MAN)
 
-man/%.7: man/%.xml
+man/%.7: man/%.xml man/custom-man.xsl
        $(XSLTPROC_PROCESS_MAN)
 
-man/%.8: man/%.xml
+man/%.8: man/%.xml man/custom-man.xsl
        $(XSLTPROC_PROCESS_MAN)
 
 man/%.html: man/%.xml man/custom-html.xsl
        $(XSLTPROC_PROCESS_HTML)
 
-CLEANFILES += \
-       $(dist_man_MANS) \
-       ${XML_FILES:.xml=.html}
+define html-alias
+       $(AM_V_LN)$(LN_S) -f $(notdir $<) $@
+endef
+
 endif
 
+EXTRA_DIST += \
+       man/custom-html.xsl \
+       man/custom-man.xsl
+
 # ------------------------------------------------------------------------------
 DBUS_PREPROCESS = $(CPP) -P $(CFLAGS) $(DBUS_CFLAGS) -imacros dbus/dbus-protocol.h
 
@@ -3744,16 +3984,17 @@ install-data-hook: $(INSTALL_DATA_HOOKS)
 
 distclean-local: $(DISTCLEAN_LOCAL_HOOKS)
 
-clean-local:
+clean-local: $(CLEAN_LOCAL_HOOKS)
        rm -rf $(abs_srcdir)/install-tree
        rm -f $(abs_srcdir)/hwdb/usb.ids $(abs_srcdir)/hwdb/pci.ids $(abs_srcdir)/hwdb/oui.txt \
-              $(abs_srcdir)/hwdb/iab.txt
+             $(abs_srcdir)/hwdb/iab.txt
 
 DISTCHECK_CONFIGURE_FLAGS = \
        --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
        --with-dbussessionservicedir=$$dc_install_base/$(dbussessionservicedir) \
        --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
        --with-dbusinterfacedir=$$dc_install_base/$(dbusinterfacedir) \
+       --with-bashcompletiondir=$$dc_install_base/$(bashcompletiondir) \
        --with-pamlibdir=$$dc_install_base/$(pamlibdir) \
        --with-rootprefix=$$dc_install_base \
        --disable-split-usr
@@ -3777,7 +4018,7 @@ hwdb-update:
        ( cd $(top_srcdir)/hwdb && \
        wget -N http://www.linux-usb.org/usb.ids \
                http://pci-ids.ucw.cz/v2.2/pci.ids \
-               http://standards.ieee.org/develop/regauth/oui/oui.txt \
+               http://standards.ieee.org/develop/regauth/oui/oui.txt \
                http://standards.ieee.org/develop/regauth/iab/iab.txt && \
        ./ids-update.pl )
 
@@ -3793,7 +4034,7 @@ doc-sync: all destdir-sphinx
        gtkdoc-rebase --html-dir=docs/gudev/html --online
        rsync -av --delete docs/gudev/html/ --omit-dir-times $(www_target)/gudev/
        rsync -av --delete-excluded --include="*.html" --exclude="*" --omit-dir-times man/ $(www_target)/man/
-       rsync -av --delete --omit-dir-times man/python-systemd/ $(www_target)/man/python-systemd/
+       rsync -av --delete --omit-dir-times docs/html/python-systemd/ $(www_target)/python-systemd/
 
 git-tag:
        git tag "v$(VERSION)" -m "systemd $(VERSION)"