chiark / gitweb /
includes: remove duplicate includes
[elogind.git] / Makefile.am
index 246bf45..09a827b 100644 (file)
@@ -44,7 +44,7 @@ LIBGUDEV_REVISION=3
 LIBGUDEV_AGE=1
 
 LIBSYSTEMD_LOGIN_CURRENT=9
-LIBSYSTEMD_LOGIN_REVISION=1
+LIBSYSTEMD_LOGIN_REVISION=2
 LIBSYSTEMD_LOGIN_AGE=9
 
 LIBSYSTEMD_DAEMON_CURRENT=0
@@ -52,16 +52,16 @@ LIBSYSTEMD_DAEMON_REVISION=10
 LIBSYSTEMD_DAEMON_AGE=0
 
 LIBSYSTEMD_ID128_CURRENT=0
-LIBSYSTEMD_ID128_REVISION=26
+LIBSYSTEMD_ID128_REVISION=27
 LIBSYSTEMD_ID128_AGE=0
 
 LIBSYSTEMD_JOURNAL_CURRENT=11
 LIBSYSTEMD_JOURNAL_REVISION=3
 LIBSYSTEMD_JOURNAL_AGE=11
 
-LIBSYSTEMD_BUS_CURRENT=0
-LIBSYSTEMD_BUS_REVISION=0
-LIBSYSTEMD_BUS_AGE=0
+LIBSYSTEMD_CURRENT=0
+LIBSYSTEMD_REVISION=0
+LIBSYSTEMD_AGE=0
 
 # Dirs of external packages
 dbuspolicydir=@dbuspolicydir@
@@ -145,6 +145,10 @@ TESTS =
 endif
 udevlibexec_PROGRAMS =
 
+.PHONY: $(INSTALL_EXEC_HOOKS) $(UNINSTALL_EXEC_HOOKS) \
+       $(INSTALL_DATA_HOOKS) $(UNINSTALL_DATA_HOOKS) \
+       $(DISTCLEAN_LOCAL_HOOKS) $(CLEAN_LOCAL_HOOKS)
+
 AM_CPPFLAGS = \
        -include $(top_builddir)/config.h \
        -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\" \
@@ -177,6 +181,7 @@ AM_CPPFLAGS = \
        -DQUOTACHECK=\"$(QUOTACHECK)\" \
        -DKEXEC=\"$(KEXEC)\" \
        -I $(top_srcdir)/src \
+       -I $(top_builddir)/src/shared \
        -I $(top_srcdir)/src/shared \
        -I $(top_srcdir)/src/network \
        -I $(top_srcdir)/src/login \
@@ -188,8 +193,9 @@ AM_CPPFLAGS = \
        -I $(top_srcdir)/src/udev \
        -I $(top_srcdir)/src/udev/net \
        -I $(top_builddir)/src/udev \
-       -I $(top_srcdir)/src/libsystemd-bus \
-       -I $(top_srcdir)/src/libsystemd-rtnl \
+       -I $(top_srcdir)/src/libsystemd/sd-bus \
+       -I $(top_srcdir)/src/libsystemd/sd-event \
+       -I $(top_srcdir)/src/libsystemd/sd-rtnl \
        $(OUR_CPPFLAGS)
 
 AM_CFLAGS = $(OUR_CFLAGS)
@@ -218,7 +224,10 @@ LOCAL_FS_TARGET_WANTS =
 MULTI_USER_TARGET_WANTS =
 SYSINIT_TARGET_WANTS =
 SOCKETS_TARGET_WANTS =
+BUSNAMES_TARGET_WANTS =
 TIMERS_TARGET_WANTS =
+USER_SOCKETS_TARGET_WANTS =
+USER_BUSNAMES_TARGET_WANTS =
 
 SYSTEM_UNIT_ALIASES =
 USER_UNIT_ALIASES =
@@ -226,22 +235,25 @@ USER_UNIT_ALIASES =
 GENERAL_ALIASES =
 
 install-target-wants-hook:
-       what="$(RUNLEVEL1_TARGET_WANTS)" && wants=runlevel1.target && $(add-wants)
-       what="$(RUNLEVEL2_TARGET_WANTS)" && wants=runlevel2.target && $(add-wants)
-       what="$(RUNLEVEL3_TARGET_WANTS)" && wants=runlevel3.target && $(add-wants)
-       what="$(RUNLEVEL4_TARGET_WANTS)" && wants=runlevel4.target && $(add-wants)
-       what="$(RUNLEVEL5_TARGET_WANTS)" && wants=runlevel5.target && $(add-wants)
-       what="$(SHUTDOWN_TARGET_WANTS)" && wants=shutdown.target && $(add-wants)
-       what="$(LOCAL_FS_TARGET_WANTS)" && wants=local-fs.target && $(add-wants)
-       what="$(MULTI_USER_TARGET_WANTS)" && wants=multi-user.target && $(add-wants)
-       what="$(SYSINIT_TARGET_WANTS)" && wants=sysinit.target && $(add-wants)
-       what="$(SOCKETS_TARGET_WANTS)" && wants=sockets.target && $(add-wants)
-       what="$(TIMERS_TARGET_WANTS)" && wants=timers.target && $(add-wants)
-       what="$(SLICES_TARGET_WANTS)" && wants=slices.target && $(add-wants)
+       what="$(RUNLEVEL1_TARGET_WANTS)" && wants=runlevel1.target && dir=$(systemunitdir) && $(add-wants)
+       what="$(RUNLEVEL2_TARGET_WANTS)" && wants=runlevel2.target && dir=$(systemunitdir) && $(add-wants)
+       what="$(RUNLEVEL3_TARGET_WANTS)" && wants=runlevel3.target && dir=$(systemunitdir) && $(add-wants)
+       what="$(RUNLEVEL4_TARGET_WANTS)" && wants=runlevel4.target && dir=$(systemunitdir) && $(add-wants)
+       what="$(RUNLEVEL5_TARGET_WANTS)" && wants=runlevel5.target && dir=$(systemunitdir) && $(add-wants)
+       what="$(SHUTDOWN_TARGET_WANTS)" && wants=shutdown.target && dir=$(systemunitdir) && $(add-wants)
+       what="$(LOCAL_FS_TARGET_WANTS)" && wants=local-fs.target && dir=$(systemunitdir) && $(add-wants)
+       what="$(MULTI_USER_TARGET_WANTS)" && wants=multi-user.target && dir=$(systemunitdir) && $(add-wants)
+       what="$(SYSINIT_TARGET_WANTS)" && wants=sysinit.target && dir=$(systemunitdir) && $(add-wants)
+       what="$(SOCKETS_TARGET_WANTS)" && wants=sockets.target && dir=$(systemunitdir) && $(add-wants)
+       what="$(BUSNAMES_TARGET_WANTS)" && wants=busnames.target && dir=$(systemunitdir) && $(add-wants)
+       what="$(TIMERS_TARGET_WANTS)" && wants=timers.target && dir=$(systemunitdir) && $(add-wants)
+       what="$(SLICES_TARGET_WANTS)" && wants=slices.target && dir=$(systemunitdir) && $(add-wants)
+       what="$(USER_SOCKETS_TARGET_WANTS)" && wants=sockets.target && dir=$(userunitdir) && $(add-wants)
+       what="$(USER_BUSNAMES_TARGET_WANTS)" && wants=busnames.target && dir=$(userunitdir) && $(add-wants)
 
 define add-wants
        [ -z "$$what" ] || ( \
-         dir=$(DESTDIR)$(systemunitdir)/$$wants.wants && \
+         dir=$(DESTDIR)$$dir/$$wants.wants && \
          $(MKDIR_P) -m 0755 $$dir && \
          cd $$dir && \
          rm -f $$what && \
@@ -301,7 +313,6 @@ rootbin_PROGRAMS = \
 bin_PROGRAMS = \
        systemd-cgls \
        systemd-cgtop \
-       systemd-stdio-bridge \
        systemd-nspawn \
        systemd-detect-virt \
        systemd-delta \
@@ -328,6 +339,7 @@ rootlibexec_PROGRAMS = \
        systemd-ac-power \
        systemd-sysctl \
        systemd-sleep \
+       systemd-bus-proxyd \
        systemd-socket-proxyd
 
 systemgenerator_PROGRAMS = \
@@ -392,6 +404,7 @@ dist_systemunit_DATA = \
        units/sigpwr.target \
        units/sleep.target \
        units/sockets.target \
+       units/busnames.target \
        units/timers.target \
        units/paths.target \
        units/suspend.target \
@@ -456,6 +469,7 @@ nodist_systemunit_DATA = \
        units/systemd-nspawn@.service
 
 dist_userunit_DATA = \
+       units/user/basic.target \
        units/user/default.target \
        units/user/exit.target
 
@@ -504,7 +518,8 @@ CLEANFILES += \
        units/console-shell.service.m4 \
        units/console-getty.service.m4 \
        units/container-getty@.service.m4 \
-       units/rescue.service.m4
+       units/rescue.service.m4 \
+       units/user@.service.m4
 
 if HAVE_SYSV_COMPAT
 nodist_systemunit_DATA += \
@@ -547,7 +562,7 @@ MANPAGES_ALIAS =
 
 include Makefile-man.am
 
-.PHONY: man
+.PHONY: man update-man-list
 man: $(MANPAGES) $(MANPAGES_ALIAS) $(HTML_FILES) $(HTML_ALIAS)
 
 XML_FILES = \
@@ -595,16 +610,16 @@ XML_GLOB = $(wildcard $(top_srcdir)/man/*.xml $(top_builddir)/man/*.xml)
 NON_INDEX_XML_FILES = $(filter-out man/systemd.index.xml,$(XML_FILES))
 SOURCE_XML_FILES = $(filter-out man/systemd.directives.xml,$(NON_INDEX_XML_FILES))
 
-update-man-list: make-man-rules.py $(XML_GLOB)
+update-man-list: $(top_srcdir)/tools/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
        @echo "Makefile-man.am has been regenerated"
 
-man/systemd.index.xml: make-man-index.py $(NON_INDEX_XML_FILES)
+man/systemd.index.xml: $(top_srcdir)/tools/make-man-index.py $(NON_INDEX_XML_FILES)
        $(AM_V_at)$(MKDIR_P) $(dir $@)
        $(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^)
 
-man/systemd.directives.xml: make-directive-index.py $(SOURCE_XML_FILES)
+man/systemd.directives.xml: $(top_srcdir)/tools/make-directive-index.py $(SOURCE_XML_FILES)
        $(AM_V_at)$(MKDIR_P) $(dir $@)
        $(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^)
 
@@ -626,32 +641,10 @@ EXTRA_DIST += \
        $(HTML_FILES) \
        $(HTML_ALIAS) \
        $(man_MANS) \
-       make-man-index.py \
-       make-directive-index.py \
-       xml_helper.py
-
-# ------------------------------------------------------------------------------
-noinst_LTLIBRARIES += \
-       libsystemd-rtnl.la
-
-libsystemd_rtnl_la_SOURCES = \
-       src/systemd/sd-rtnl.h \
-       src/libsystemd-rtnl/sd-rtnl.c \
-       src/libsystemd-rtnl/rtnl-internal.h \
-       src/libsystemd-rtnl/rtnl-message.c \
-       src/libsystemd-rtnl/rtnl-util.h \
-       src/libsystemd-rtnl/rtnl-util.c
-
-test_rtnl_SOURCES = \
-       src/libsystemd-rtnl/test-rtnl.c
-
-test_rtnl_LDADD = \
-       libsystemd-rtnl.la \
-       libsystemd-bus-internal.la \
-       libsystemd-id128-internal.la \
-       libsystemd-shared.la
-
-tests += test-rtnl
+       tools/make-man-index.py \
+       tools/make-directive-index.py \
+       tools/make-man-rules.py \
+       tools/xml_helper.py
 
 # ------------------------------------------------------------------------------
 noinst_LTLIBRARIES += \
@@ -662,16 +655,22 @@ libsystemd_shared_la_SOURCES = \
        src/shared/linux/fanotify.h \
        src/shared/linux/seccomp.h \
        src/shared/linux/seccomp-bpf.h \
+       src/shared/ioprio.h \
        src/shared/missing.h \
+       src/shared/initreq.h \
+       src/shared/securebits.h \
+       src/shared/special.h \
        src/shared/list.h \
        src/shared/macro.h \
        src/shared/def.h \
+       src/shared/sparse-endian.h \
+       src/shared/refcnt.h \
+       src/shared/udev-util.h \
+       src/shared/bus-errors.h \
        src/shared/device-nodes.c \
        src/shared/device-nodes.h \
-       src/shared/sparse-endian.h \
        src/shared/util.c \
        src/shared/util.h \
-       src/shared/udev-util.h \
        src/shared/virt.c \
        src/shared/virt.h \
        src/shared/efivars.c \
@@ -682,6 +681,8 @@ libsystemd_shared_la_SOURCES = \
        src/shared/time-util.h \
        src/shared/hashmap.c \
        src/shared/hashmap.h \
+       src/shared/siphash24.c \
+       src/shared/siphash24.h \
        src/shared/set.c \
        src/shared/set.h \
        src/shared/fdset.c \
@@ -712,7 +713,6 @@ libsystemd_shared_la_SOURCES = \
        src/shared/gunicode.h \
        src/shared/pager.c \
        src/shared/pager.h \
-       src/shared/ioprio.h \
        src/shared/socket-util.c \
        src/shared/socket-util.h \
        src/shared/conf-files.c \
@@ -742,13 +742,12 @@ libsystemd_shared_la_SOURCES = \
        src/shared/fileio.c \
        src/shared/fileio.h \
        src/shared/output-mode.h \
-       src/shared/MurmurHash3.c \
-       src/shared/MurmurHash3.h \
+       src/shared/MurmurHash2.c \
+       src/shared/MurmurHash2.h \
        src/shared/acpi-fpdt.h \
        src/shared/acpi-fpdt.c \
        src/shared/boot-timestamps.h \
        src/shared/boot-timestamps.c \
-       src/shared/refcnt.h \
        src/shared/mkdir.c \
        src/shared/mkdir.h \
        src/shared/smack-util.c \
@@ -760,22 +759,21 @@ libsystemd_shared_la_SOURCES = \
        src/shared/ptyfwd.c \
        src/shared/ptyfwd.h \
        src/shared/net-util.c \
-       src/shared/net-util.h
-
-#-------------------------------------------------------------------------------
-noinst_LTLIBRARIES += \
-       libsystemd-dbus.la
-
-libsystemd_dbus_la_SOURCES = \
-       src/shared/dbus-common.c \
-       src/shared/dbus-common.h
-
-libsystemd_dbus_la_CFLAGS = \
-       $(AM_CFLAGS) \
-       $(DBUS_CFLAGS)
+       src/shared/net-util.h \
+       src/shared/errno-list.c \
+       src/shared/errno-list.h \
+       src/shared/syscall-list.c \
+       src/shared/syscall-list.h \
+       src/shared/audit.c \
+       src/shared/audit.h \
+       src/shared/xml.c \
+       src/shared/xml.h
 
-libsystemd_dbus_la_LIBADD = \
-       $(DBUS_LIBS)
+nodist_libsystemd_shared_la_SOURCES = \
+       src/shared/errno-from-name.h \
+       src/shared/errno-to-name.h \
+       src/shared/syscall-from-name.h \
+       src/shared/syscall-to-name.h
 
 # ------------------------------------------------------------------------------
 noinst_LTLIBRARIES += \
@@ -791,10 +789,6 @@ libsystemd_units_la_SOURCES = \
        src/shared/specifier.c \
        src/shared/specifier.h
 
-libsystemd_units_la_CFLAGS = \
-       $(AM_CFLAGS) \
-       $(DBUS_CFLAGS)
-
 # ------------------------------------------------------------------------------
 noinst_LTLIBRARIES += \
        libsystemd-label.la
@@ -844,14 +838,6 @@ libsystemd_capability_la_LIBADD = \
        $(CAP_LIBS)
 
 # ------------------------------------------------------------------------------
-noinst_LTLIBRARIES += \
-       libsystemd-audit.la
-
-libsystemd_audit_la_SOURCES = \
-       src/shared/audit.c \
-       src/shared/audit.h
-
-# ------------------------------------------------------------------------------
 if HAVE_ACL
 noinst_LTLIBRARIES += \
        libsystemd-acl.la
@@ -887,20 +873,22 @@ libsystemd_core_la_SOURCES = \
        src/core/load-fragment.h \
        src/core/service.c \
        src/core/service.h \
-       src/core/automount.c \
-       src/core/automount.h \
-       src/core/mount.c \
-       src/core/mount.h \
-       src/core/swap.c \
-       src/core/swap.h \
-       src/core/device.c \
-       src/core/device.h \
+       src/core/socket.c \
+       src/core/socket.h \
+       src/core/busname.c \
+       src/core/busname.h \
        src/core/target.c \
        src/core/target.h \
        src/core/snapshot.c \
        src/core/snapshot.h \
-       src/core/socket.c \
-       src/core/socket.h \
+       src/core/device.c \
+       src/core/device.h \
+       src/core/mount.c \
+       src/core/mount.h \
+       src/core/automount.c \
+       src/core/automount.h \
+       src/core/swap.c \
+       src/core/swap.h \
        src/core/timer.c \
        src/core/timer.h \
        src/core/path.c \
@@ -927,20 +915,22 @@ libsystemd_core_la_SOURCES = \
        src/core/dbus-service.h \
        src/core/dbus-socket.c \
        src/core/dbus-socket.h \
-       src/core/dbus-timer.c \
-       src/core/dbus-timer.h \
+       src/core/dbus-busname.c \
+       src/core/dbus-busname.h \
        src/core/dbus-target.c \
        src/core/dbus-target.h \
+       src/core/dbus-snapshot.c \
+       src/core/dbus-snapshot.h \
+       src/core/dbus-device.c \
+       src/core/dbus-device.h \
        src/core/dbus-mount.c \
        src/core/dbus-mount.h \
        src/core/dbus-automount.c \
        src/core/dbus-automount.h \
        src/core/dbus-swap.c \
        src/core/dbus-swap.h \
-       src/core/dbus-snapshot.c \
-       src/core/dbus-snapshot.h \
-       src/core/dbus-device.c \
-       src/core/dbus-device.h \
+       src/core/dbus-timer.c \
+       src/core/dbus-timer.h \
        src/core/dbus-path.c \
        src/core/dbus-path.h \
        src/core/dbus-slice.c \
@@ -953,6 +943,8 @@ libsystemd_core_la_SOURCES = \
        src/core/dbus-kill.h \
        src/core/dbus-cgroup.c \
        src/core/dbus-cgroup.h \
+       src/core/dbus-client-track.c \
+       src/core/dbus-client-track.h \
        src/core/cgroup.c \
        src/core/cgroup.h \
        src/core/selinux-access.c \
@@ -979,18 +971,12 @@ libsystemd_core_la_SOURCES = \
        src/core/namespace.h \
        src/core/tcpwrap.c \
        src/core/tcpwrap.h \
-       src/core/securebits.h \
-       src/core/initreq.h \
-       src/core/special.h \
-       src/core/bus-errors.h \
        src/core/build.h \
        src/core/sysfs-show.h \
        src/core/switch-root.h \
        src/core/switch-root.c \
        src/core/killall.h \
        src/core/killall.c \
-       src/core/syscall-list.c \
-       src/core/syscall-list.h \
        src/core/audit-fd.c \
        src/core/audit-fd.h \
        src/core/async.c \
@@ -1004,13 +990,10 @@ endif
 
 nodist_libsystemd_core_la_SOURCES = \
        src/core/load-fragment-gperf.c \
-       src/core/load-fragment-gperf-nulstr.c \
-       src/core/syscall-from-name.h \
-       src/core/syscall-to-name.h
+       src/core/load-fragment-gperf-nulstr.c
 
 libsystemd_core_la_CFLAGS = \
        $(AM_CFLAGS) \
-       $(DBUS_CFLAGS) \
        $(LIBWRAP_CFLAGS) \
        $(PAM_CFLAGS) \
        $(AUDIT_CFLAGS) \
@@ -1021,13 +1004,10 @@ libsystemd_core_la_LIBADD = \
        libsystemd-capability.la \
        libsystemd-units.la \
        libsystemd-label.la \
-       libsystemd-dbus.la \
-       libsystemd-audit.la \
-       libsystemd-id128-internal.la \
        libsystemd-daemon-internal.la \
        libudev-internal.la \
        libsystemd-shared.la \
-       libsystemd-rtnl.la \
+       libsystemd-internal.la \
        $(LIBWRAP_LIBS) \
        $(PAM_LIBS) \
        $(AUDIT_LIBS) \
@@ -1045,37 +1025,53 @@ CLEANFILES += \
        src/core/load-fragment-gperf.gperf \
        src/core/load-fragment-gperf.c \
        src/core/load-fragment-gperf-nulstr.c \
-       src/core/syscall-list.txt \
-       src/core/syscall-from-name.gperf
+       src/shared/syscall-list.txt \
+       src/shared/syscall-from-name.gperf \
+       src/shared/errno-list.txt \
+       src/shared/errno-from-name.gperf
 
 BUILT_SOURCES += \
-       src/core/syscall-from-name.h \
-       src/core/syscall-to-name.h
+       src/shared/syscall-from-name.h \
+       src/shared/syscall-to-name.h \
+       src/shared/errno-from-name.h \
+       src/shared/errno-to-name.h
 
-src/core/syscall-list.txt: Makefile
+src/shared/syscall-list.txt:
        $(AM_V_at)$(MKDIR_P) $(dir $@)
        $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include sys/syscall.h - < /dev/null | $(AWK) '/^#define[ \t]+__NR_[^ ]+[ \t]+[0-9(]/ { sub(/__NR_/, "", $$2); if ($$2 !~ /SYSCALL_BASE/) print $$2; }' > $@
 
-src/core/syscall-from-name.gperf: src/core/syscall-list.txt Makefile
+src/shared/syscall-from-name.gperf: src/shared/syscall-list.txt
        $(AM_V_at)$(MKDIR_P) $(dir $@)
        $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct syscall_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, __NR_%s\n", $$1, $$1 }' < $< > $@
 
-src/core/syscall-from-name.h: src/core/syscall-from-name.gperf Makefile
+src/shared/syscall-from-name.h: src/shared/syscall-from-name.gperf
        $(AM_V_at)$(MKDIR_P) $(dir $@)
        $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_syscall -H hash_syscall_name -p -C < $< > $@
 
-src/core/syscall-to-name.h: src/core/syscall-list.txt Makefile
+src/shared/syscall-to-name.h: src/shared/syscall-list.txt
+       $(AM_V_at)$(MKDIR_P) $(dir $@)
+       $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const syscall_names[] = { "} { printf "[SYSCALL_TO_INDEX(__NR_%s)] = \"%s\",\n", $$1, $$1 } END{print "};"}' < $< > $@
+
+src/shared/errno-list.txt:
+       $(AM_V_at)$(MKDIR_P) $(dir $@)
+       $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include errno.h - < /dev/null | $(AWK) '/^#define[ \t]+E[^ _]+[ \t]+[0-9]/ { print $$2; }'  > $@
+
+src/shared/errno-from-name.gperf: src/shared/errno-list.txt
+       $(AM_V_at)$(MKDIR_P) $(dir $@)
+       $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct errno_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' < $< > $@
+
+src/shared/errno-from-name.h: src/shared/errno-from-name.gperf
        $(AM_V_at)$(MKDIR_P) $(dir $@)
-       $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char* const syscall_names[] = { "} { printf "[SYSCALL_TO_INDEX(__NR_%s)] = \"%s\",\n", $$1, $$1 } END{print "};"}' < $< > $@
+       $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_errno -H hash_errno_name -p -C < $< > $@
+
+src/shared/errno-to-name.h: src/shared/errno-list.txt
+       $(AM_V_at)$(MKDIR_P) $(dir $@)
+       $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const errno_names[] = { "} { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' < $< > $@
 
 # ------------------------------------------------------------------------------
 systemd_SOURCES = \
        src/core/main.c
 
-systemd_CFLAGS = \
-       $(AM_CFLAGS) \
-       $(DBUS_CFLAGS)
-
 systemd_LDADD = \
        libsystemd-core.la \
        $(RT_LIBS)
@@ -1131,6 +1127,7 @@ tests += \
        test-utf8 \
        test-ellipsize \
        test-util \
+       test-tmpfiles \
        test-namespace \
        test-date \
        test-sleep \
@@ -1139,20 +1136,25 @@ tests += \
        test-calendarspec \
        test-strip-tab-ansi \
        test-cgroup-util \
+       test-cgroup-mask \
        test-prioq \
        test-fileio \
        test-time \
        test-hashmap \
        test-list \
        test-tables \
-       test-device-nodes
+       test-device-nodes \
+       test-xml
 
 EXTRA_DIST += \
        test/sched_idle_bad.service \
        test/sched_idle_ok.service \
        test/sched_rr_bad.service \
        test/sched_rr_ok.service \
-       test/sched_rr_change.service
+       test/sched_rr_change.service \
+       test/son.service \
+       test/daughter.service \
+       test/parent.slice
 
 EXTRA_DIST += \
        src/test/test-helper.h
@@ -1166,10 +1168,6 @@ test_device_nodes_LDADD = \
 test_engine_SOURCES = \
        src/test/test-engine.c
 
-test_engine_CFLAGS = \
-       $(AM_CFLAGS) \
-       $(DBUS_CFLAGS)
-
 test_engine_LDADD = \
        libsystemd-core.la \
        $(RT_LIBS)
@@ -1177,10 +1175,6 @@ test_engine_LDADD = \
 test_job_type_SOURCES = \
        src/test/test-job-type.c
 
-test_job_type_CFLAGS = \
-       $(AM_CFLAGS) \
-       $(DBUS_CFLAGS)
-
 test_job_type_LDADD = \
        libsystemd-core.la \
        $(RT_LIBS)
@@ -1191,10 +1185,6 @@ test_ns_SOURCES = \
 test_ns_LDADD = \
        libsystemd-core.la
 
-test_ns_CFLAGS = \
-       $(AM_CFLAGS) \
-       $(DBUS_CFLAGS)
-
 test_loopback_SOURCES = \
        src/test/test-loopback.c
 
@@ -1221,10 +1211,6 @@ endif
 test_unit_name_SOURCES = \
        src/test/test-unit-name.c
 
-test_unit_name_CFLAGS = \
-       $(AM_CFLAGS) \
-       $(DBUS_CFLAGS)
-
 test_unit_name_LDADD = \
        libsystemd-core.la \
        $(RT_LIBS)
@@ -1232,10 +1218,6 @@ test_unit_name_LDADD = \
 test_unit_file_SOURCES = \
        src/test/test-unit-file.c
 
-test_unit_file_CFLAGS = \
-       $(AM_CFLAGS) \
-       $(DBUS_CFLAGS)
-
 test_unit_file_LDADD = \
        libsystemd-core.la \
        $(RT_LIBS)
@@ -1252,6 +1234,12 @@ test_util_SOURCES = \
 test_util_LDADD = \
        libsystemd-core.la
 
+test_tmpfiles_SOURCES = \
+       src/test/test-tmpfiles.c
+
+test_tmpfiles_LDADD = \
+       libsystemd-shared.la
+
 test_namespace_SOURCES = \
        src/test/test-namespace.c
 
@@ -1264,6 +1252,12 @@ test_hashmap_SOURCES = \
 test_hashmap_LDADD = \
        libsystemd-core.la
 
+test_xml_SOURCES = \
+       src/test/test-xml.c
+
+test_xml_LDADD = \
+       libsystemd-shared.la
+
 test_list_SOURCES = \
        src/test/test-list.c
 
@@ -1274,10 +1268,6 @@ test_tables_SOURCES = \
        src/test/test-tables.c \
        src/shared/test-tables.h
 
-test_tables_CFLAGS = \
-       $(AM_CFLAGS) \
-       $(DBUS_CFLAGS)
-
 test_tables_LDADD = \
        libsystemd-logs.la \
        libsystemd-journal-internal.la \
@@ -1358,6 +1348,17 @@ test_cgroup_LDADD = \
        libsystemd-label.la \
        libsystemd-shared.la
 
+test_cgroup_mask_SOURCES = \
+       src/test/test-cgroup-mask.c
+
+test_cgroup_mask_CPPFLAGS = \
+       $(AM_CPPFLAGS) \
+       -DTEST_DIR=\"$(abs_top_srcdir)/test\"
+
+test_cgroup_mask_LDADD = \
+       libsystemd-core.la \
+       $(RT_LIBS)
+
 test_cgroup_util_SOURCES = \
        src/test/test-cgroup-util.c
 
@@ -1383,7 +1384,7 @@ test_strv_SOURCES = \
 
 test_strv_LDADD = \
        libsystemd-units.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
        libsystemd-shared.la
 
 test_path_util_SOURCES = \
@@ -1401,14 +1402,10 @@ test_strxcpyx_LDADD = \
 test_install_SOURCES = \
        src/test/test-install.c
 
-test_install_CFLAGS = \
-       $(AM_CFLAGS) \
-       $(DBUS_CFLAGS)
-
 test_install_LDADD = \
        libsystemd-units.la \
        libsystemd-label.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
        libsystemd-shared.la
 
 test_watchdog_SOURCES = \
@@ -1420,10 +1417,9 @@ test_watchdog_LDADD = \
 test_sched_prio_SOURCES = \
        src/test/test-sched-prio.c
 
-test_sched_prio_CFLAGS = \
-       $(AM_CFLAGS) \
-       $(DBUS_CFLAGS) \
-       -D"STR(s)=\#s" -D"TEST_DIR=STR($(abs_top_srcdir)/test/)"
+test_sched_prio_CPPFLAGS = \
+       $(AM_CPPFLAGS) \
+       -DTEST_DIR=\"$(abs_top_srcdir)/test\"
 
 test_sched_prio_LDADD = \
        libsystemd-core.la \
@@ -1431,7 +1427,7 @@ test_sched_prio_LDADD = \
 
 # ------------------------------------------------------------------------------
 ## .PHONY so it always rebuilds it
-.PHONY: coverage lcov-run lcov-report
+.PHONY: coverage lcov-run lcov-report coverage-sync
 
 # run lcov from scratch, always
 coverage:
@@ -1472,8 +1468,7 @@ systemd_analyze_SOURCES = \
        src/analyze/analyze.c
 
 systemd_analyze_LDADD = \
-       libsystemd-bus-internal.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
@@ -1482,8 +1477,7 @@ systemd_initctl_SOURCES = \
        src/initctl/initctl.c
 
 systemd_initctl_LDADD = \
-       libsystemd-bus-internal.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
@@ -1496,8 +1490,7 @@ systemd_update_utmp_CFLAGS = \
        $(AUDIT_CFLAGS)
 
 systemd_update_utmp_LDADD = \
-       libsystemd-bus-internal.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la \
        $(AUDIT_LIBS)
@@ -1567,14 +1560,13 @@ EXTRA_DIST += \
 # ------------------------------------------------------------------------------
 if ENABLE_TMPFILES
 systemd_tmpfiles_SOURCES = \
-       src/tmpfiles/tmpfiles.c \
-       src/shared/specifier.c \
-       src/shared/specifier.h
+       src/tmpfiles/tmpfiles.c
 
 systemd_tmpfiles_LDADD = \
+       libsystemd-units.la \
        libsystemd-label.la \
        libsystemd-capability.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
        libsystemd-shared.la
 
 rootbin_PROGRAMS += \
@@ -1590,6 +1582,7 @@ nodist_systemunit_DATA += \
 
 dist_tmpfiles_DATA = \
        tmpfiles.d/systemd.conf \
+       tmpfiles.d/systemd-nologin.conf \
        tmpfiles.d/tmp.conf \
        tmpfiles.d/x11.conf
 
@@ -1626,7 +1619,7 @@ systemd_machine_id_setup_SOURCES = \
 
 systemd_machine_id_setup_LDADD = \
        libsystemd-label.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
        libsystemd-shared.la
 
 # ------------------------------------------------------------------------------
@@ -1648,8 +1641,7 @@ systemd_fsck_SOURCES = \
        src/fsck/fsck.c
 
 systemd_fsck_LDADD = \
-       libsystemd-bus-internal.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
        libsystemd-daemon-internal.la \
        libudev-internal.la \
        libsystemd-shared.la
@@ -1729,7 +1721,7 @@ bootctl_SOURCES = \
 
 bootctl_LDADD = \
        libsystemd-shared.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
        libsystemd-daemon-internal.la
 
 bin_PROGRAMS += \
@@ -1750,7 +1742,7 @@ systemd_gpt_auto_generator_SOURCES = \
 
 systemd_gpt_auto_generator_LDADD = \
        libsystemd-label.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
        libudev-internal.la \
        libsystemd-shared.la \
        $(BLKID_LIBS)
@@ -1761,6 +1753,29 @@ systemd_gpt_auto_generator_CFLAGS = \
 endif
 
 # ------------------------------------------------------------------------------
+if ENABLE_KDBUS
+systemgenerator_PROGRAMS +=  \
+       systemd-dbus1-generator
+
+systemd_dbus1_generator_SOURCES = \
+       src/dbus1-generator/dbus1-generator.c
+
+systemd_dbus1_generator_LDADD = \
+       libsystemd-label.la \
+       libsystemd-shared.la \
+       libsystemd-internal.la
+
+dbus1-generator-install-hook:
+       $(AM_V_LN)$(LN_S) -f $(systemgeneratordir)/systemd-dbus1-generator $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
+
+dbus1-generator-uninstall-hook:
+       rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
+
+INSTALL_EXEC_HOOKS += dbus1-generator-install-hook
+UNINSTALL_EXEC_HOOKS += dbus1-generator-uninstall-hook
+endif
+
+# ------------------------------------------------------------------------------
 systemd_rc_local_generator_SOURCES = \
        src/rc-local-generator/rc-local-generator.c
 
@@ -1783,8 +1798,7 @@ systemd_cgroups_agent_SOURCES = \
        src/cgroups-agent/cgroups-agent.c
 
 systemd_cgroups_agent_LDADD = \
-       libsystemd-bus-internal.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
@@ -1795,11 +1809,9 @@ systemctl_SOURCES = \
 systemctl_LDADD = \
        libsystemd-units.la \
        libsystemd-label.la \
-       libsystemd-bus-internal.la \
+       libsystemd-internal.la \
        libsystemd-logs.la \
-       libsystemd-login-internal.la \
        libsystemd-journal-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
@@ -1852,11 +1864,9 @@ systemd_nspawn_SOURCES = \
 systemd_nspawn_LDADD = \
        libsystemd-label.la \
        libsystemd-capability.la \
-       libsystemd-bus-internal.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
        libsystemd-daemon-internal.la \
-       libsystemd-shared.la \
-       libsystemd-rtnl.la
+       libsystemd-shared.la
 
 # ------------------------------------------------------------------------------
 systemd_run_SOURCES = \
@@ -1865,21 +1875,43 @@ systemd_run_SOURCES = \
 systemd_run_LDADD = \
        libsystemd-label.la \
        libsystemd-capability.la \
-       libsystemd-bus-internal.la \
+       libsystemd-internal.la \
        libsystemd-daemon-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-shared.la
 
 # ------------------------------------------------------------------------------
-systemd_stdio_bridge_SOURCES = \
-       src/stdio-bridge/stdio-bridge.c
+systemd_bus_proxyd_SOURCES = \
+       src/bus-proxyd/bus-proxyd.c
 
-systemd_stdio_bridge_LDADD = \
-       libsystemd-bus-internal.la \
+systemd_bus_proxyd_LDADD = \
+       libsystemd-internal.la \
        libsystemd-daemon-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-shared.la
 
+bus-proxyd-install-hook:
+       $(AM_V_LN)$(LN_S) -f ../lib/systemd/systemd-bus-proxyd $(DESTDIR)$(bindir)/systemd-stdio-bridge
+
+bus-proxyd-uninstall-hook:
+       rm -f $(DESTDIR)$(bindir)/systemd-stdio-bridge
+
+INSTALL_EXEC_HOOKS += bus-proxyd-install-hook
+UNINSTALL_EXEC_HOOKS += bus-proxyd-uninstall-hook
+
+if ENABLE_KDBUS
+nodist_systemunit_DATA += \
+       units/systemd-bus-proxyd@.service
+
+dist_systemunit_DATA += \
+       units/systemd-bus-proxyd.socket
+
+dist_userunit_DATA += \
+       units/user/systemd-bus-proxyd.socket \
+       units/user/systemd-bus-proxyd@.service
+endif
+
+EXTRA_DIST += \
+       units/systemd-bus-proxyd@.service.in
+
 # ------------------------------------------------------------------------------
 systemd_tty_ask_password_agent_SOURCES = \
        src/tty-ask-password-agent/tty-ask-password-agent.c
@@ -1939,97 +1971,134 @@ EXTRA_DIST += \
        src/libsystemd-daemon/libsystemd-daemon.pc.in
 
 # ------------------------------------------------------------------------------
-libsystemd_bus_la_SOURCES = \
-       src/libsystemd-bus/libsystemd-bus.sym \
+libsystemd_la_SOURCES = \
+       src/libsystemd/libsystemd.sym \
        src/systemd/sd-bus.h \
        src/systemd/sd-bus-protocol.h \
        src/systemd/sd-bus-vtable.h \
        src/systemd/sd-memfd.h \
        src/systemd/sd-utf8.h \
        src/systemd/sd-event.h \
-       src/libsystemd-bus/sd-bus.c \
-       src/libsystemd-bus/bus-control.c \
-       src/libsystemd-bus/bus-control.h \
-       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-kernel.c \
-       src/libsystemd-bus/bus-kernel.h \
-       src/libsystemd-bus/bus-container.c \
-       src/libsystemd-bus/bus-container.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 \
-       src/libsystemd-bus/bus-match.c \
-       src/libsystemd-bus/bus-match.h \
-       src/libsystemd-bus/bus-bloom.c \
-       src/libsystemd-bus/bus-bloom.h \
-       src/libsystemd-bus/bus-introspect.c \
-       src/libsystemd-bus/bus-introspect.h \
-       src/libsystemd-bus/bus-objects.c \
-       src/libsystemd-bus/bus-objects.h \
-       src/libsystemd-bus/bus-convenience.c \
-       src/libsystemd-bus/kdbus.h \
-       src/libsystemd-bus/sd-memfd.c \
-       src/libsystemd-bus/bus-util.c \
-       src/libsystemd-bus/bus-util.h \
-       src/libsystemd-bus/sd-utf8.c \
-       src/libsystemd-bus/sd-event.c \
-       src/libsystemd-bus/event-util.h
-
-libsystemd_bus_la_LIBADD = \
-       libsystemd-id128-internal.la \
+       src/systemd/sd-rtnl.h \
+       src/systemd/sd-resolve.h \
+       src/systemd/sd-login.h \
+       src/systemd/sd-id128.h \
+       src/libsystemd/sd-bus/sd-bus.c \
+       src/libsystemd/sd-bus/bus-control.c \
+       src/libsystemd/sd-bus/bus-control.h \
+       src/libsystemd/sd-bus/bus-error.c \
+       src/libsystemd/sd-bus/bus-error.h \
+       src/libsystemd/sd-bus/bus-internal.c \
+       src/libsystemd/sd-bus/bus-internal.h \
+       src/libsystemd/sd-bus/bus-socket.c \
+       src/libsystemd/sd-bus/bus-socket.h \
+       src/libsystemd/sd-bus/bus-kernel.c \
+       src/libsystemd/sd-bus/bus-kernel.h \
+       src/libsystemd/sd-bus/bus-container.c \
+       src/libsystemd/sd-bus/bus-container.h \
+       src/libsystemd/sd-bus/bus-message.c \
+       src/libsystemd/sd-bus/bus-message.h \
+       src/libsystemd/sd-bus/bus-creds.c \
+       src/libsystemd/sd-bus/bus-creds.h \
+       src/libsystemd/sd-bus/bus-signature.c \
+       src/libsystemd/sd-bus/bus-signature.h \
+       src/libsystemd/sd-bus/bus-type.c \
+       src/libsystemd/sd-bus/bus-type.h \
+       src/libsystemd/sd-bus/bus-match.c \
+       src/libsystemd/sd-bus/bus-match.h \
+       src/libsystemd/sd-bus/bus-bloom.c \
+       src/libsystemd/sd-bus/bus-bloom.h \
+       src/libsystemd/sd-bus/bus-introspect.c \
+       src/libsystemd/sd-bus/bus-introspect.h \
+       src/libsystemd/sd-bus/bus-objects.c \
+       src/libsystemd/sd-bus/bus-objects.h \
+       src/libsystemd/sd-bus/bus-gvariant.c \
+       src/libsystemd/sd-bus/bus-gvariant.h \
+       src/libsystemd/sd-bus/bus-convenience.c \
+       src/libsystemd/sd-bus/bus-util.c \
+       src/libsystemd/sd-bus/bus-util.h \
+       src/libsystemd/sd-bus/bus-protocol.h \
+       src/libsystemd/sd-bus/kdbus.h \
+       src/libsystemd/sd-bus/sd-memfd.c \
+       src/libsystemd/sd-utf8/sd-utf8.c \
+       src/libsystemd/sd-event/sd-event.c \
+       src/libsystemd/sd-event/event-util.h \
+       src/libsystemd/sd-rtnl/sd-rtnl.c \
+       src/libsystemd/sd-rtnl/rtnl-internal.h \
+       src/libsystemd/sd-rtnl/rtnl-message.c \
+       src/libsystemd/sd-rtnl/rtnl-util.h \
+       src/libsystemd/sd-rtnl/rtnl-util.c \
+       src/libsystemd/sd-resolve/sd-resolve.c \
+       src/libsystemd/sd-resolve/resolve-util.h \
+       src/libsystemd/sd-id128/sd-id128.c \
+       src/login/sd-login.c \
+       src/login/login-shared.c \
+       src/login/login-shared.h
+
+nodist_libsystemd_la_SOURCES = \
+       src/libsystemd/sd-bus/bus-error-mapping.c
+
+libsystemd_la_LIBADD = \
        libsystemd-daemon-internal.la \
-       libsystemd-shared.la
+       libsystemd-shared.la \
+       -lresolv
 
-libsystemd_bus_la_CFLAGS = \
+libsystemd_la_CFLAGS = \
        $(AM_CFLAGS) \
        -pthread
 
-libsystemd_bus_la_LDFLAGS = \
+libsystemd_la_LDFLAGS = \
        $(AM_LDFLAGS) \
-       -version-info $(LIBSYSTEMD_BUS_CURRENT):$(LIBSYSTEMD_BUS_REVISION):$(LIBSYSTEMD_BUS_AGE) \
-       -Wl,--version-script=$(top_srcdir)/src/libsystemd-bus/libsystemd-bus.sym
+       -version-info $(LIBSYSTEMD_CURRENT):$(LIBSYSTEMD_REVISION):$(LIBSYSTEMD_AGE) \
+       -Wl,--version-script=$(top_srcdir)/src/libsystemd/libsystemd.sym
 
 pkgconfiglib_DATA += \
-       src/libsystemd-bus/libsystemd-bus.pc
+       src/libsystemd/libsystemd.pc
+
+pkginclude_HEADERS += \
+       src/systemd/sd-login.h \
+       src/systemd/sd-id128.h
 
 EXTRA_DIST += \
-       src/libsystemd-bus/libsystemd-bus.pc.in
+       src/libsystemd/sd-bus/bus-error-mapping.gperf \
+       src/libsystemd/sd-bus/DIFFERENCES \
+       src/libsystemd/sd-bus/GVARIANT-SERIALIZATION \
+       src/libsystemd/libsystemd.pc.in
+
+CLEANFILES += \
+       src/libsystemd/sd-bus/bus-error-mapping.c
 
 lib_LTLIBRARIES += \
-       libsystemd-bus.la
+       libsystemd.la
 
-libsystemd_bus_internal_la_SOURCES = \
-       $(libsystemd_bus_la_SOURCES)
+libsystemd_internal_la_SOURCES = \
+       $(libsystemd_la_SOURCES)
 
-libsystemd_bus_internal_la_CFLAGS = \
-       $(libsystemd_bus_la_CFLAGS)
+nodist_libsystemd_internal_la_SOURCES = \
+       $(nodist_libsystemd_la_SOURCES)
+
+libsystemd_internal_la_CFLAGS = \
+       $(libsystemd_la_CFLAGS)
 
 noinst_LTLIBRARIES += \
-       libsystemd-bus-internal.la
+       libsystemd-internal.la
 
-libsystemd_bus_dump_la_SOURCES = \
-       src/libsystemd-bus/bus-dump.c \
-       src/libsystemd-bus/bus-dump.h
+libsystemd_dump_la_SOURCES = \
+       src/libsystemd/sd-bus/bus-dump.c \
+       src/libsystemd/sd-bus/bus-dump.h
 
-libsystemd_bus_dump_la_CFLAGS = \
-       $(AM_CFLAGS)
+libsystemd_dump_la_CFLAGS = \
+       $(AM_CFLAGS) \
        $(CAP_CFLAGS)
 
 noinst_LTLIBRARIES += \
-       libsystemd-bus-dump.la
+       libsystemd-dump.la
 
 tests += \
        test-bus-marshal \
        test-bus-signature \
        test-bus-chat \
+       test-bus-cleanup \
        test-bus-server \
        test-bus-match \
        test-bus-kernel \
@@ -2039,20 +2108,24 @@ tests += \
        test-bus-zero-copy \
        test-bus-introspect \
        test-bus-objects \
-       test-event
+       test-bus-error \
+       test-bus-creds \
+       test-bus-gvariant \
+       test-event \
+       test-rtnl \
+       test-resolve
 
 bin_PROGRAMS += \
        busctl
 
 test_bus_marshal_SOURCES = \
-       src/libsystemd-bus/test-bus-marshal.c
+       src/libsystemd/sd-bus/test-bus-marshal.c
 
 test_bus_marshal_LDADD = \
-       libsystemd-bus-internal.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la \
-       libsystemd-bus-dump.la \
+       libsystemd-dump.la \
        libsystemd-capability.la \
        $(GLIB_LIBS) \
        $(DBUS_LIBS) \
@@ -2065,40 +2138,46 @@ test_bus_marshal_CFLAGS = \
        $(CAP_CFLAGS)
 
 test_bus_signature_SOURCES = \
-       src/libsystemd-bus/test-bus-signature.c
+       src/libsystemd/sd-bus/test-bus-signature.c
 
 test_bus_signature_LDADD = \
        libsystemd-shared.la \
-       libsystemd-bus-internal.la
+       libsystemd-internal.la
 
 test_bus_chat_SOURCES = \
-       src/libsystemd-bus/test-bus-chat.c
+       src/libsystemd/sd-bus/test-bus-chat.c
 
 test_bus_chat_CFLAGS = \
        $(AM_CFLAGS) \
        -pthread
 
 test_bus_chat_LDADD = \
-       libsystemd-bus-internal.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
+       libsystemd-daemon-internal.la \
+       libsystemd-shared.la
+
+test_bus_cleanup_SOURCES = \
+       src/libsystemd/sd-bus/test-bus-cleanup.c
+
+test_bus_cleanup_LDADD = \
+       libsystemd-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
 test_bus_server_SOURCES = \
-       src/libsystemd-bus/test-bus-server.c
+       src/libsystemd/sd-bus/test-bus-server.c
 
 test_bus_server_CFLAGS = \
        $(AM_CFLAGS) \
        -pthread
 
 test_bus_server_LDADD = \
-       libsystemd-bus-internal.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
 test_bus_objects_SOURCES = \
-       src/libsystemd-bus/test-bus-objects.c
+       src/libsystemd/sd-bus/test-bus-objects.c
 
 test_bus_objects_CFLAGS = \
        $(AM_CFLAGS) \
@@ -2106,32 +2185,64 @@ test_bus_objects_CFLAGS = \
        -pthread
 
 test_bus_objects_LDADD = \
-       libsystemd-bus-internal.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la \
-       libsystemd-bus-dump.la \
+       libsystemd-dump.la \
        libsystemd-capability.la \
        $(CAP_LIBS)
 
+test_bus_error_SOURCES = \
+       src/libsystemd/sd-bus/test-bus-error.c
+
+test_bus_error_LDADD = \
+       libsystemd-internal.la \
+       libsystemd-daemon-internal.la \
+       libsystemd-shared.la
+
+test_bus_gvariant_SOURCES = \
+       src/libsystemd/sd-bus/test-bus-gvariant.c
+
+test_bus_gvariant_LDADD = \
+       libsystemd-internal.la \
+       libsystemd-daemon-internal.la \
+       libsystemd-shared.la \
+       libsystemd-dump.la \
+       libsystemd-capability.la \
+       $(GLIB_LIBS) \
+       $(CAP_LIBS)
+
+test_bus_gvariant_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(GLIB_CFLAGS)
+       $(CAP_CFLAGS)
+
+test_bus_creds_SOURCES = \
+       src/libsystemd/sd-bus/test-bus-creds.c
+
+test_bus_creds_LDADD = \
+       libsystemd-internal.la \
+       libsystemd-daemon-internal.la \
+       libsystemd-shared.la \
+       libsystemd-dump.la \
+       libsystemd-capability.la
+
 test_bus_match_SOURCES = \
-       src/libsystemd-bus/test-bus-match.c
+       src/libsystemd/sd-bus/test-bus-match.c
 
 test_bus_match_LDADD = \
-       libsystemd-bus-internal.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
 test_bus_kernel_SOURCES = \
-       src/libsystemd-bus/test-bus-kernel.c
+       src/libsystemd/sd-bus/test-bus-kernel.c
 
 test_bus_kernel_LDADD = \
-       libsystemd-bus-internal.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la \
-       libsystemd-bus-dump.la \
+       libsystemd-dump.la \
        libsystemd-capability.la \
        $(CAP_LIBS)
 
@@ -2140,39 +2251,36 @@ test_bus_kernel_CFLAGS = \
        $(CAP_CFLAGS)
 
 test_bus_kernel_bloom_SOURCES = \
-       src/libsystemd-bus/test-bus-kernel-bloom.c
+       src/libsystemd/sd-bus/test-bus-kernel-bloom.c
 
 test_bus_kernel_bloom_LDADD = \
-       libsystemd-bus-internal.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
 test_bus_kernel_benchmark_SOURCES = \
-       src/libsystemd-bus/test-bus-kernel-benchmark.c
+       src/libsystemd/sd-bus/test-bus-kernel-benchmark.c
 
 test_bus_kernel_benchmark_LDADD = \
-       libsystemd-bus-internal.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
 test_bus_memfd_SOURCES = \
-       src/libsystemd-bus/test-bus-memfd.c
+       src/libsystemd/sd-bus/test-bus-memfd.c
 
 test_bus_memfd_LDADD = \
-       libsystemd-bus-internal.la \
+       libsystemd-internal.la \
        libsystemd-shared.la
 
 test_bus_zero_copy_SOURCES = \
-       src/libsystemd-bus/test-bus-zero-copy.c
+       src/libsystemd/sd-bus/test-bus-zero-copy.c
 
 test_bus_zero_copy_LDADD = \
-       libsystemd-bus-internal.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la \
-       libsystemd-bus-dump.la \
+       libsystemd-dump.la \
        libsystemd-capability.la \
        $(CAP_LIBS)
 
@@ -2181,30 +2289,49 @@ test_bus_zero_copy_CFLAGS = \
        $(CAP_CFLAGS)
 
 test_bus_introspect_SOURCES = \
-       src/libsystemd-bus/test-bus-introspect.c
+       src/libsystemd/sd-bus/test-bus-introspect.c
 
 test_bus_introspect_LDADD = \
        libsystemd-shared.la \
-       libsystemd-bus-internal.la
+       libsystemd-internal.la
 
 test_event_SOURCES = \
-       src/libsystemd-bus/test-event.c
+       src/libsystemd/sd-event/test-event.c
 
 test_event_LDADD = \
-       libsystemd-bus-internal.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
+       libsystemd-daemon-internal.la \
+       libsystemd-shared.la
+
+test_rtnl_SOURCES = \
+       src/libsystemd/sd-rtnl/test-rtnl.c
+
+test_rtnl_LDADD = \
+       libsystemd-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
+test_resolve_SOURCES = \
+       src/systemd/sd-resolve.h \
+       src/libsystemd/sd-resolve/test-resolve.c
+
+test_resolve_LDADD = \
+       libsystemd-internal.la \
+       libsystemd-shared.la \
+       -lresolv
+
+test_resolve_CFLAGS = \
+       $(AM_CFLAGS) \
+       -pthread
+
 busctl_SOURCES = \
-       src/libsystemd-bus/busctl.c
+       src/libsystemd/sd-bus/busctl.c
 
 busctl_LDADD = \
-       libsystemd-bus-internal.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la \
-       libsystemd-bus-dump.la \
+       libsystemd-dump.la \
        libsystemd-capability.la \
        $(CAP_LIBS)
 
@@ -2213,6 +2340,50 @@ busctl_CFLAGS = \
        $(CAP_CFLAGS)
 
 # ------------------------------------------------------------------------------
+noinst_LTLIBRARIES += \
+       libsystemd-dhcp.la
+
+libsystemd_dhcp_la_SOURCES = \
+       src/systemd/sd-dhcp-client.h \
+       src/libsystemd-dhcp/sd-dhcp-client.c \
+       src/libsystemd-dhcp/dhcp-lease.h \
+       src/libsystemd-dhcp/dhcp-lease.c \
+       src/libsystemd-dhcp/dhcp-network.c \
+       src/libsystemd-dhcp/dhcp-option.c \
+       src/libsystemd-dhcp/dhcp-internal.h \
+       src/libsystemd-dhcp/dhcp-protocol.h
+
+libsystemd_dhcp_la_LIBADD = \
+       libsystemd-internal.la \
+       libsystemd-shared.la
+
+test_dhcp_option_SOURCES = \
+       src/libsystemd-dhcp/dhcp-protocol.h \
+       src/libsystemd-dhcp/dhcp-internal.h \
+       src/libsystemd-dhcp/test-dhcp-option.c
+
+test_dhcp_option_LDADD = \
+       libsystemd-dhcp.la \
+       libsystemd-internal.la \
+       libsystemd-shared.la
+
+test_dhcp_client_SOURCES = \
+       src/systemd/sd-dhcp-client.h \
+       src/libsystemd-dhcp/dhcp-protocol.h \
+       src/libsystemd-dhcp/dhcp-internal.h \
+       src/libsystemd-dhcp/test-dhcp-client.c
+
+test_dhcp_client_LDADD = \
+       libsystemd-dhcp.la \
+       libsystemd-internal.la \
+       libsystemd-daemon-internal.la \
+       libsystemd-shared.la
+
+tests += \
+       test-dhcp-option \
+       test-dhcp-client
+
+# ------------------------------------------------------------------------------
 if ENABLE_GTK_DOC
 SUBDIRS += \
        docs/libudev
@@ -2252,7 +2423,6 @@ libudev_la_LDFLAGS = \
 
 libudev_la_LIBADD = \
        libsystemd-daemon-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-shared.la
 
 pkgconfiglib_DATA += \
@@ -2328,6 +2498,8 @@ dist_udevhwdb_DATA = \
        hwdb/20-pci-classes.hwdb \
        hwdb/20-usb-vendor-model.hwdb \
        hwdb/20-usb-classes.hwdb \
+       hwdb/20-sdio-vendor-model.hwdb \
+       hwdb/20-sdio-classes.hwdb \
        hwdb/20-bluetooth-vendor-product.hwdb \
        hwdb/20-acpi-vendor.hwdb \
        hwdb/20-OUI.hwdb \
@@ -2375,17 +2547,17 @@ rootlibexec_PROGRAMS += \
 noinst_LTLIBRARIES += \
        libudev-core.la
 
-src/udev/keyboard-keys.txt: Makefile
+src/udev/keyboard-keys.txt:
        $(AM_V_at)$(MKDIR_P) $(dir $@)
        $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include linux/input.h - < /dev/null | $(AWK) '/^#define[ \t]+KEY_[^ ]+[ \t]+[0-9]/ { if ($$2 != "KEY_MAX") { print $$2 } }' | sed 's/^KEY_COFFEE$$/KEY_SCREENLOCK/' > $@
 
-src/udev/keyboard-keys-from-name.gperf: src/udev/keyboard-keys.txt Makefile
+src/udev/keyboard-keys-from-name.gperf: src/udev/keyboard-keys.txt
        $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print tolower(substr($$1 ,5)) ", " $$1 }' < $< > $@
 
-src/udev/keyboard-keys-from-name.h: src/udev/keyboard-keys-from-name.gperf Makefile
+src/udev/keyboard-keys-from-name.h: src/udev/keyboard-keys-from-name.gperf
        $(AM_V_GPERF)$(GPERF) -L ANSI-C -t -N keyboard_lookup_key -H hash_key_name -p -C < $< > $@
 
-src/udev/keyboard-keys-to-name.h: src/udev/keyboard-keys.txt Makefile
+src/udev/keyboard-keys-to-name.h: src/udev/keyboard-keys.txt
        $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char* const key_names[KEY_CNT] = { "} { print "[" $$1 "] = \"" $$1 "\"," } END{print "};"}' < $< > $@
 
 libudev_core_la_SOURCES = \
@@ -2434,8 +2606,7 @@ libudev_core_la_LIBADD = \
        libudev-internal.la \
        libsystemd-label.la \
        libsystemd-daemon-internal.la \
-       libsystemd-rtnl.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
        libsystemd-shared.la \
        $(BLKID_LIBS) \
        $(KMOD_LIBS)
@@ -2800,9 +2971,6 @@ mtd_probe_SOURCES =  \
        src/udev/mtd_probe/mtd_probe.h \
        src/udev/mtd_probe/probe_smartmedia.c
 
-mtd_probe_CPPFLAGS = \
-       $(AM_CPPFLAGS)
-
 dist_udevrules_DATA += \
        rules/75-probe_mtd.rules
 
@@ -2810,62 +2978,17 @@ udevlibexec_PROGRAMS += \
        mtd_probe
 
 # ------------------------------------------------------------------------------
-libsystemd_id128_la_SOURCES = \
-       src/libsystemd-id128/libsystemd-id128.sym \
-       src/libsystemd-id128/sd-id128.c
-
-libsystemd_id128_la_CFLAGS = \
-       $(AM_CFLAGS) \
-       -fvisibility=hidden
-
-libsystemd_id128_la_LDFLAGS = \
-       $(AM_LDFLAGS) \
-       -version-info $(LIBSYSTEMD_ID128_CURRENT):$(LIBSYSTEMD_ID128_REVISION):$(LIBSYSTEMD_ID128_AGE) \
-       -Wl,--version-script=$(top_srcdir)/src/libsystemd-id128/libsystemd-id128.sym
-
-libsystemd_id128_la_LIBADD = \
-       libsystemd-daemon-internal.la \
-       libsystemd-shared.la
-
-libsystemd_id128_internal_la_SOURCES = \
-       $(libsystemd_id128_la_SOURCES)
-
 test_id128_SOURCES = \
        src/test/test-id128.c
 
 test_id128_LDADD = \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
 tests += \
        test-id128
 
-pkginclude_HEADERS += \
-       src/systemd/sd-id128.h
-
-lib_LTLIBRARIES += \
-       libsystemd-id128.la
-
-noinst_LTLIBRARIES += \
-       libsystemd-id128-internal.la
-
-pkgconfiglib_DATA += \
-       src/libsystemd-id128/libsystemd-id128.pc
-
-# move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
-libsystemd-id128-install-hook:
-       libname=libsystemd-id128.so && $(move-to-rootlibdir)
-
-libsystemd-id128-uninstall-hook:
-       rm -f $(DESTDIR)$(rootlibdir)/libsystemd-id128.so*
-
-INSTALL_EXEC_HOOKS += libsystemd-id128-install-hook
-UNINSTALL_EXEC_HOOKS += libsystemd-id128-uninstall-hook
-
-EXTRA_DIST += \
-       src/libsystemd-id128/libsystemd-id128.pc.in
-
 # ------------------------------------------------------------------------------
 
 rootlibexec_PROGRAMS += \
@@ -2885,7 +3008,9 @@ systemd_journald_SOURCES = \
        src/journal/journald-server.h
 
 systemd_journald_LDADD = \
-       libsystemd-journal-core.la
+       libsystemd-journal-core.la \
+       libsystemd-internal.la \
+       libsystemd-shared.la
 
 systemd_cat_SOURCES = \
        src/journal/cat.c
@@ -2902,7 +3027,7 @@ journalctl_SOURCES = \
 
 journalctl_LDADD = \
        libsystemd-journal-internal.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
        libsystemd-logs.la \
        libsystemd-shared.la
 
@@ -2959,6 +3084,12 @@ test_journal_stream_SOURCES = \
 test_journal_stream_LDADD = \
        libsystemd-journal-core.la
 
+test_journal_flush_SOURCES = \
+       src/journal/test-journal-flush.c
+
+test_journal_flush_LDADD = \
+       libsystemd-journal-core.la
+
 test_journal_init_SOURCES = \
        src/journal/test-journal-init.c
 
@@ -2986,8 +3117,8 @@ test_mmap_cache_LDADD = \
 test_catalog_SOURCES = \
        src/journal/test-catalog.c
 
-test_catalog_CFLAGS = \
-       $(AM_CFLAGS) \
+test_catalog_CPPFLAGS = \
+       $(AM_CPPFLAGS) \
        -DCATALOG_DIR=\"$(abs_top_srcdir)/catalog\"
 
 test_catalog_LDADD = \
@@ -3026,7 +3157,7 @@ libsystemd_journal_la_LDFLAGS = \
 libsystemd_journal_la_LIBADD = \
        libsystemd-label.la \
        libsystemd-daemon-internal.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
        libsystemd-shared.la
 
 libsystemd_journal_internal_la_SOURCES = \
@@ -3078,18 +3209,12 @@ nodist_libsystemd_journal_core_la_SOURCES = \
 libsystemd_journal_core_la_LIBADD = \
        libsystemd-journal-internal.la \
        libudev-internal.la \
-       libsystemd-audit.la \
        libsystemd-capability.la \
        libsystemd-label.la \
        libsystemd-daemon-internal.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
        libsystemd-shared.la
 
-if ENABLE_LOGIND
-libsystemd_journal_core_la_LIBADD += \
-       libsystemd-login-internal.la
-endif
-
 if HAVE_ACL
 libsystemd_journal_core_la_LIBADD += \
        libsystemd-acl.la
@@ -3165,6 +3290,7 @@ tests += \
        test-journal-init \
        test-journal-verify \
        test-journal-interleaving \
+       test-journal-flush \
        test-mmap-cache \
        test-catalog
 
@@ -3202,6 +3328,9 @@ pkgconfiglib_DATA += \
        src/journal/libsystemd-journal.pc
 
 dist_catalog_DATA = \
+       catalog/systemd.fr.catalog \
+       catalog/systemd.ru.catalog \
+       catalog/systemd.it.catalog \
        catalog/systemd.catalog
 
 SOCKETS_TARGET_WANTS += \
@@ -3234,17 +3363,19 @@ systemd_journal_gatewayd_SOURCES = \
 systemd_journal_gatewayd_LDADD = \
        libsystemd-logs.la \
        libsystemd-journal-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-daemon-internal.la \
-       libsystemd-bus-internal.la \
+       libsystemd-internal.la \
        libsystemd-shared.la \
        $(MICROHTTPD_LIBS)
 
 systemd_journal_gatewayd_CFLAGS = \
        $(AM_CFLAGS) \
-       -DDOCUMENT_ROOT=\"$(gatewayddocumentrootdir)\" \
        $(MICROHTTPD_CFLAGS)
 
+systemd_journal_gatewayd_CPPFLAGS = \
+       $(AM_CPPFLAGS) \
+       -DDOCUMENT_ROOT=\"$(gatewayddocumentrootdir)\"
+
 dist_systemunit_DATA += \
        units/systemd-journal-gatewayd.socket
 
@@ -3266,9 +3397,8 @@ systemd_socket_proxyd_SOURCES = \
 
 systemd_socket_proxyd_LDADD = \
        libsystemd-logs.la \
-       libsystemd-bus-internal.la \
+       libsystemd-internal.la \
        libsystemd-journal-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
@@ -3280,12 +3410,8 @@ systemd_coredump_SOURCES = \
 systemd_coredump_LDADD = \
        libsystemd-journal-internal.la \
        libsystemd-label.la \
-       libsystemd-shared.la
-
-if ENABLE_LOGIND
-systemd_coredump_LDADD += \
-       libsystemd-login-internal.la
-endif
+       libsystemd-shared.la \
+       libsystemd-internal.la
 
 rootlibexec_PROGRAMS += \
        systemd-coredump
@@ -3295,7 +3421,7 @@ systemd_coredumpctl_SOURCES = \
 
 systemd_coredumpctl_LDADD = \
        libsystemd-journal-internal.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
        libsystemd-shared.la
 
 bin_PROGRAMS += \
@@ -3555,8 +3681,7 @@ systemd_hostnamed_SOURCES = \
 
 systemd_hostnamed_LDADD = \
        libsystemd-label.la \
-       libsystemd-bus-internal.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
@@ -3566,6 +3691,9 @@ rootlibexec_PROGRAMS += \
 nodist_systemunit_DATA += \
        units/systemd-hostnamed.service
 
+dist_systemunit_DATA += \
+       units/org.freedesktop.hostname1.busname
+
 dist_dbuspolicy_DATA += \
        src/hostname/org.freedesktop.hostname1.conf
 
@@ -3578,12 +3706,14 @@ polkitpolicy_files += \
 SYSTEM_UNIT_ALIASES += \
        systemd-hostnamed.service dbus-org.freedesktop.hostname1.service
 
+BUSNAMES_TARGET_WANTS += \
+       org.freedesktop.hostname1.busname
+
 hostnamectl_SOURCES = \
        src/hostname/hostnamectl.c
 
 hostnamectl_LDADD = \
-       libsystemd-bus-internal.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
@@ -3605,20 +3735,58 @@ EXTRA_DIST += \
        units/systemd-hostnamed.service.in
 
 # ------------------------------------------------------------------------------
+if ENABLE_KDBUS
+systemd_bus_driverd_SOURCES = \
+       src/bus-driverd/bus-driverd.c
+
+systemd_bus_driverd_LDADD = \
+       libsystemd-internal.la \
+       libsystemd-daemon-internal.la \
+       libsystemd-shared.la
+
+rootlibexec_PROGRAMS += \
+       systemd-bus-driverd
+
+nodist_systemunit_DATA += \
+       units/systemd-bus-driverd.service
+
+dist_systemunit_DATA += \
+       units/org.freedesktop.DBus.busname
+
+BUSNAMES_TARGET_WANTS += \
+       org.freedesktop.DBus.busname
+
+nodist_userunit_DATA += \
+       units/user/systemd-bus-driverd.service
+
+USER_BUSNAMES_TARGET_WANTS += \
+       org.freedesktop.DBus.busname
+
+USER_UNIT_ALIASES += \
+       $(systemunitdir)/org.freedesktop.DBus.busname org.freedesktop.DBus.busname
+endif
+
+EXTRA_DIST += \
+       units/systemd-bus-driverd.service.in \
+       units/user/systemd-bus-driverd.service.in
+
+# ------------------------------------------------------------------------------
 if ENABLE_LOCALED
 systemd_localed_SOURCES = \
        src/locale/localed.c
 
 systemd_localed_LDADD = \
        libsystemd-label.la \
-       libsystemd-bus-internal.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
 nodist_systemunit_DATA += \
        units/systemd-localed.service
 
+dist_systemunit_DATA += \
+       units/org.freedesktop.locale1.busname
+
 rootlibexec_PROGRAMS += \
        systemd-localed
 
@@ -3634,6 +3802,9 @@ polkitpolicy_files += \
 SYSTEM_UNIT_ALIASES += \
        systemd-localed.service dbus-org.freedesktop.locale1.service
 
+BUSNAMES_TARGET_WANTS += \
+       org.freedesktop.locale1.busname
+
 dist_pkgdata_DATA += \
        src/locale/kbd-model-map
 
@@ -3641,14 +3812,13 @@ dist_noinst_SCRIPT = \
        src/locale/generate-kbd-model-map
 
 update-kbd-model-map: src/locale/generate-kbd-model-map
-       $PYTHON $< > src/locale/kbd-model-map
+       $PYTHON $< >src/locale/kbd-model-map
 
 localectl_SOURCES = \
        src/locale/localectl.c
 
 localectl_LDADD = \
-       libsystemd-bus-internal.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
@@ -3663,6 +3833,8 @@ dist_zshcompletion_DATA += \
 
 endif
 
+.PHONY: update-kbd-model-map
+
 polkitpolicy_in_files += \
        src/locale/org.freedesktop.locale1.policy.in
 
@@ -3676,8 +3848,7 @@ systemd_timedated_SOURCES = \
 
 systemd_timedated_LDADD = \
        libsystemd-label.la \
-       libsystemd-bus-internal.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
@@ -3693,6 +3864,9 @@ dist_dbuspolicy_DATA += \
 nodist_systemunit_DATA += \
        units/systemd-timedated.service
 
+dist_systemunit_DATA += \
+       units/org.freedesktop.timedate1.busname
+
 polkitpolicy_files += \
        src/timedate/org.freedesktop.timedate1.policy
 
@@ -3703,12 +3877,14 @@ INSTALL_DIRS += \
 SYSTEM_UNIT_ALIASES += \
        systemd-timedated.service dbus-org.freedesktop.timedate1.service
 
+BUSNAMES_TARGET_WANTS += \
+       org.freedesktop.timedate1.busname
+
 timedatectl_SOURCES = \
        src/timedate/timedatectl.c
 
 timedatectl_LDADD = \
-       libsystemd-bus-internal.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
@@ -3767,10 +3943,8 @@ libsystemd_machine_core_la_SOURCES = \
 
 libsystemd_machine_core_la_LIBADD = \
        libsystemd-label.la \
-       libsystemd-audit.la \
        libsystemd-daemon-internal.la \
-       libsystemd-bus-internal.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
        libudev-internal.la \
        libsystemd-shared.la
 
@@ -3781,8 +3955,7 @@ machinectl_SOURCES = \
        src/machine/machinectl.c
 
 machinectl_LDADD = \
-       libsystemd-bus-internal.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
@@ -3802,7 +3975,8 @@ nodist_systemunit_DATA += \
        units/systemd-machined.service
 
 dist_systemunit_DATA += \
-       units/machine.slice
+       units/machine.slice \
+       units/org.freedesktop.machine1.busname
 
 dist_dbussystemservice_DATA += \
        src/machine/org.freedesktop.machine1.service
@@ -3816,6 +3990,9 @@ dist_zshcompletion_DATA += \
 SYSTEM_UNIT_ALIASES += \
        systemd-machined.service dbus-org.freedesktop.machine1.service
 
+BUSNAMES_TARGET_WANTS += \
+       org.freedesktop.machine1.busname
+
 EXTRA_DIST += \
        units/systemd-machined.service.in
 
@@ -3830,6 +4007,7 @@ systemd_networkd_SOURCES = \
        src/network/networkd.h \
        src/network/networkd.c \
        src/network/networkd-link.c \
+       src/network/networkd-netdev.c \
        src/network/networkd-network.c \
        src/network/networkd-address.c \
        src/network/networkd-route.c \
@@ -3840,9 +4018,10 @@ nodist_systemd_networkd_SOURCES = \
 
 systemd_networkd_LDADD = \
        libudev-internal.la \
-       libsystemd-bus-internal.la \
-       libsystemd-id128-internal.la \
-       libsystemd-rtnl.la \
+       libsystemd-daemon-internal.la \
+       libsystemd-internal.la \
+       libsystemd-dhcp.la \
+       libsystemd-label.la \
        libsystemd-shared.la
 
 nodist_systemunit_DATA += \
@@ -3855,6 +4034,7 @@ test_network_SOURCES = \
        src/network/test-network.c \
        src/network/networkd.h \
        src/network/networkd-link.c \
+       src/network/networkd-netdev.c \
        src/network/networkd-network.c \
        src/network/networkd-address.c \
        src/network/networkd-route.c \
@@ -3863,12 +4043,14 @@ test_network_SOURCES = \
 
 test_network_LDADD = \
        libudev-internal.la \
-       libsystemd-bus-internal.la \
-       libsystemd-id128-internal.la \
-       libsystemd-rtnl.la \
+       libsystemd-internal.la \
+       libsystemd-dhcp.la \
+       libsystemd-daemon-internal.la \
+       libsystemd-label.la \
        libsystemd-shared.la
 
-tests += test-network
+tests += \
+       test-network
 
 EXTRA_DIST += \
        src/network/networkd-gperf.gperf \
@@ -3892,7 +4074,6 @@ systemd_logind_LDADD = \
 
 libsystemd_logind_core_la_SOURCES = \
        src/login/logind-core.c \
-       src/login/logind-dbus.c \
        src/login/logind-device.c \
        src/login/logind-device.h \
        src/login/logind-button.c \
@@ -3909,6 +4090,7 @@ libsystemd_logind_core_la_SOURCES = \
        src/login/logind-user.h \
        src/login/logind-inhibit.c \
        src/login/logind-inhibit.h \
+       src/login/logind-dbus.c \
        src/login/logind-session-dbus.c \
        src/login/logind-seat-dbus.c \
        src/login/logind-user-dbus.c \
@@ -3919,10 +4101,8 @@ libsystemd_logind_core_la_SOURCES = \
 libsystemd_logind_core_la_LIBADD = \
        libsystemd-label.la \
        libsystemd-capability.la \
-       libsystemd-audit.la \
        libsystemd-daemon-internal.la \
-       libsystemd-id128-internal.la \
-       libsystemd-bus-internal.la \
+       libsystemd-internal.la \
        libudev-internal.la \
        libsystemd-shared.la
 
@@ -3952,10 +4132,9 @@ loginctl_SOURCES = \
        src/login/sysfs-show.c
 
 loginctl_LDADD = \
-       libsystemd-bus-internal.la \
+       libsystemd-internal.la \
        libudev-internal.la \
        libsystemd-shared.la \
-       libsystemd-id128-internal.la \
        libsystemd-daemon-internal.la
 
 rootbin_PROGRAMS += \
@@ -3972,8 +4151,7 @@ systemd_inhibit_SOURCES = \
        src/login/inhibit.c
 
 systemd_inhibit_LDADD = \
-       libsystemd-bus-internal.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
@@ -3984,23 +4162,22 @@ test_login_SOURCES = \
        src/login/test-login.c
 
 test_login_LDADD = \
-       libsystemd-login-internal.la \
+       libsystemd-internal.la \
        libsystemd-shared.la
 
 test_login_shared_SOURCES = \
        src/login/test-login-shared.c
 
 test_login_shared_LDADD = \
-       libsystemd-login-internal.la \
+       libsystemd-internal.la \
        libsystemd-shared.la
 
 test_inhibit_SOURCES = \
        src/login/test-inhibit.c
 
 test_inhibit_LDADD = \
-       libsystemd-bus-internal.la \
+       libsystemd-internal.la \
        libsystemd-daemon-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-shared.la
 
 test_login_tables_SOURCES = \
@@ -4017,29 +4194,6 @@ tests += \
        test-login-tables \
        test-login-shared
 
-libsystemd_login_la_SOURCES = \
-       src/login/libsystemd-login.sym \
-       src/login/sd-login.c \
-       src/systemd/sd-login.h \
-       src/login/login-shared.c \
-       src/login/login-shared.h
-
-libsystemd_login_la_CFLAGS = \
-       $(AM_CFLAGS) \
-       -fvisibility=hidden
-
-libsystemd_login_la_LDFLAGS = \
-       $(AM_LDFLAGS) \
-       -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-daemon-internal.la \
-       libsystemd-shared.la
-
-libsystemd_login_internal_la_SOURCES = \
-       $(libsystemd_login_la_SOURCES)
-
 if HAVE_PAM
 pam_systemd_la_SOURCES = \
        src/login/pam-module.c
@@ -4059,9 +4213,7 @@ pam_systemd_la_LDFLAGS = \
 
 pam_systemd_la_LIBADD = \
        libsystemd-capability.la \
-       libsystemd-audit.la \
-       libsystemd-bus-internal.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la \
        $(PAM_LIBS)
@@ -4073,22 +4225,13 @@ dist_pamconf_DATA = \
        src/login/systemd-user
 endif
 
-# move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
-libsystemd-login-install-hook:
-       libname=libsystemd-login.so && $(move-to-rootlibdir)
-
-libsystemd-login-uninstall-hook:
-       rm -f $(DESTDIR)$(rootlibdir)/libsystemd-login.so*
-
-INSTALL_EXEC_HOOKS += libsystemd-login-install-hook
-UNINSTALL_EXEC_HOOKS += libsystemd-login-uninstall-hook
-
 nodist_systemunit_DATA += \
        units/systemd-logind.service \
        units/systemd-user-sessions.service
 
 dist_systemunit_DATA += \
-       units/user.slice
+       units/user.slice \
+       units/org.freedesktop.login1.busname
 
 dist_dbussystemservice_DATA += \
        src/login/org.freedesktop.login1.service
@@ -4099,18 +4242,6 @@ dist_dbuspolicy_DATA += \
 dist_pkgsysconf_DATA += \
        src/login/logind.conf
 
-pkginclude_HEADERS += \
-       src/systemd/sd-login.h
-
-lib_LTLIBRARIES += \
-       libsystemd-login.la
-
-noinst_LTLIBRARIES += \
-       libsystemd-login-internal.la
-
-pkgconfiglib_DATA += \
-       src/login/libsystemd-login.pc
-
 polkitpolicy_files += \
        src/login/org.freedesktop.login1.policy
 
@@ -4124,6 +4255,11 @@ MULTI_USER_TARGET_WANTS += \
 SYSTEM_UNIT_ALIASES += \
        systemd-logind.service dbus-org.freedesktop.login1.service
 
+BUSNAMES_TARGET_WANTS += \
+       org.freedesktop.login1.busname
+
+if ENABLE_MULTI_SEAT_X
+
 systemd_multi_seat_x_SOURCES = \
        src/login/multi-seat-x.c
 
@@ -4134,6 +4270,8 @@ systemd_multi_seat_x_LDADD = \
 rootlibexec_PROGRAMS += \
        systemd-multi-seat-x
 
+endif
+
 dist_udevrules_DATA += \
        src/login/70-uaccess.rules \
        src/login/70-power-switch.rules
@@ -4153,7 +4291,6 @@ polkitpolicy_in_files += \
 
 EXTRA_DIST += \
        src/login/logind-gperf.gperf \
-       src/login/libsystemd-login.pc.in \
        src/login/71-seat.rules.in \
        src/login/73-seat-late.rules.in \
        units/systemd-logind.service.in \
@@ -4206,7 +4343,7 @@ id128_la_LDFLAGS = \
 
 id128_la_LIBADD = \
        $(PYTHON_DEVEL_LIBS) \
-       libsystemd-id128.la
+       libsystemd.la
 
 _daemon_la_SOURCES = \
        src/python-systemd/_daemon.c \
@@ -4248,7 +4385,7 @@ _reader_la_LDFLAGS = \
 _reader_la_LIBADD = \
        $(PYTHON_DEVEL_LIBS) \
        libsystemd-journal.la \
-       libsystemd-id128.la \
+       libsystemd.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
@@ -4271,7 +4408,7 @@ login_la_LDFLAGS = \
 login_la_LIBADD = \
        $(PYTHON_DEVEL_LIBS) \
        libsystemd-journal.la \
-       libsystemd-login.la \
+       libsystemd.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
@@ -4280,7 +4417,7 @@ dist_pkgpyexec_PYTHON = \
        src/python-systemd/daemon.py \
        src/python-systemd/__init__.py
 
-src/python-systemd/id128-constants.h: src/systemd/sd-messages.h Makefile
+src/python-systemd/id128-constants.h: src/systemd/sd-messages.h
        $(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) JOINER/p' <$< >$@
 
@@ -4307,6 +4444,8 @@ endif
 
 CLEAN_LOCAL_HOOKS += clean-sphinx
 
+.PHONY: python-shell destdir-sphinx clean-sphinx clean-python
+
 clean-sphinx:
        -rm -rf docs/html/python-systemd/
 
@@ -4316,6 +4455,80 @@ clean-python:
        -rm -f _daemon.la id128.la _journal.la login.la _reader.la
 
 # ------------------------------------------------------------------------------
+if ENABLE_COMPAT_LIBS
+
+define generate-fake-lib
+       $(AM_V_at)$(MKDIR_P) $(dir $@)
+       $(AM_V_GEN)sed -r -n 's/^ +(sd_.*);/void new_\1(void);\n__asm__(".symver new_\1,\1@LIBSYSTEMD_209");\nstatic void (*resolve_\1(void)) (void) {\n\treturn new_\1;\n}\nvoid \1(void) __attribute__((ifunc("resolve_\1")));\nobsolete_lib(\1,$(notdir $(basename $<)));\n/p' <$< >$@
+endef
+
+libsystemd_login_la_SOURCES = \
+       libsystemd-login.c \
+       src/compat-libs/libsystemd-login.sym
+
+libsystemd_login_la_CFLAGS = \
+       $(AM_CFLAGS) \
+       -fvisibility=default \
+       -imacros $(top_srcdir)/src/compat-libs/linkwarning.h \
+       -fno-lto
+
+libsystemd_login_la_LDFLAGS = \
+       $(AM_LDFLAGS) \
+       -version-info $(LIBSYSTEMD_LOGIN_CURRENT):$(LIBSYSTEMD_LOGIN_REVISION):$(LIBSYSTEMD_LOGIN_AGE) \
+       -Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-login.sym
+
+libsystemd_login_la_LIBADD = \
+       libsystemd.la
+
+libsystemd_id128_la_SOURCES = \
+       libsystemd-id128.c \
+       src/compat-libs/libsystemd-id128.sym
+
+libsystemd_id128_la_CFLAGS = \
+       $(libsystemd_login_la_CFLAGS)
+
+libsystemd_id128_la_LDFLAGS = \
+       $(AM_LDFLAGS) \
+       -version-info $(LIBSYSTEMD_ID128_CURRENT):$(LIBSYSTEMD_ID128_REVISION):$(LIBSYSTEMD_ID128_AGE) \
+       -Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-id128.sym
+
+libsystemd_id128_la_LIBADD = \
+       libsystemd.la
+
+BUILT_SOURCES += \
+       libsystemd-login.c \
+       libsystemd-id128.c
+
+libsystemd-%.c: src/compat-libs/libsystemd-%.sym
+       $(generate-fake-lib)
+
+lib_LTLIBRARIES += \
+       libsystemd-login.la \
+       libsystemd-id128.la
+
+pkgconfiglib_DATA += \
+       src/compat-libs/libsystemd-login.pc \
+       src/compat-libs/libsystemd-id128.pc
+
+# move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
+compat-lib-install-hook:
+       libname=libsystemd-login.so && $(move-to-rootlibdir)
+       libname=libsystemd-id128.so && $(move-to-rootlibdir)
+
+compat-lib-uninstall-hook:
+       rm -f $(DESTDIR)$(rootlibdir)/libsystemd-login.so*
+       rm -f $(DESTDIR)$(rootlibdir)/libsystemd-id128.so*
+
+INSTALL_EXEC_HOOKS += compat-lib-install-hook
+UNINSTALL_EXEC_HOOKS += compat-lib-uninstall-hook
+
+endif
+
+EXTRA_DIST += \
+       src/compat-libs/libsystemd-login.pc.in \
+       src/compat-libs/libsystemd-id128.pc.in
+
+# ------------------------------------------------------------------------------
 substitutions = \
        '|rootlibexecdir=$(rootlibexecdir)|' \
        '|rootbindir=$(rootbindir)|' \
@@ -4368,28 +4581,28 @@ SED_PROCESS = \
        $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
                < $< > $@
 
-units/%: units/%.in Makefile
+units/%: units/%.in
        $(SED_PROCESS)
 
-man/%: man/%.in Makefile
+man/%: man/%.in
        $(SED_PROCESS)
 
-sysctl.d/%: sysctl.d/%.in Makefile
+sysctl.d/%: sysctl.d/%.in
        $(SED_PROCESS)
 
-%.pc: %.pc.in Makefile
+%.pc: %.pc.in
        $(SED_PROCESS)
 
-src/core/macros.%: src/core/macros.%.in Makefile
+src/core/macros.%: src/core/macros.%.in
        $(SED_PROCESS)
 
-src/%.policy.in: src/%.policy.in.in Makefile
+src/%.policy.in: src/%.policy.in.in
        $(SED_PROCESS)
 
-%.rules: %.rules.in Makefile
+%.rules: %.rules.in
        $(SED_PROCESS)
 
-%.sh: %.sh.in Makefile
+%.sh: %.sh.in
        $(SED_PROCESS)
        $(AM_V_GEN)chmod +x $@
 
@@ -4401,12 +4614,12 @@ src/%: src/%.m4
        $(AM_V_at)$(MKDIR_P) $(dir $@)
        $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
 
-units/%: units/%.m4 Makefile
-       $(AM_V_M4)$(MKDIR_P) $(dir $@)
+units/%: units/%.m4
+       $(AM_V_at)$(MKDIR_P) $(dir $@)
        $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_SYSTEM=1 < $< > $@
 
-units/user/%: units/%.m4 Makefile
-       $(AM_V_M4)$(MKDIR_P) $(dir $@)
+units/user/%: units/%.m4
+       $(AM_V_at)$(MKDIR_P) $(dir $@)
        $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_USER=1 < $< > $@
 
 if ENABLE_POLKIT
@@ -4428,7 +4641,7 @@ CLEANFILES += \
 
 # ------------------------------------------------------------------------------
 if ENABLE_MANPAGES
-man/custom-entities.ent: Makefile
+man/custom-entities.ent:
        $(AM_V_GEN)$(MKDIR_P) $(dir $@)
        $(AM_V_GEN)(echo '<?xml version="1.0" encoding="utf-8" ?>' && \
         echo '$(subst '|,<!ENTITY ,$(subst =, ",$(subst |',">,$(substitutions))))') \
@@ -4555,6 +4768,7 @@ SYSTEM_UNIT_ALIASES += \
 USER_UNIT_ALIASES += \
        $(systemunitdir)/shutdown.target shutdown.target \
        $(systemunitdir)/sockets.target sockets.target \
+       $(systemunitdir)/busnames.target busnames.target \
        $(systemunitdir)/timers.target timers.target \
        $(systemunitdir)/paths.target paths.target \
        $(systemunitdir)/bluetooth.target bluetooth.target \
@@ -4621,7 +4835,8 @@ DISTCHECK_CONFIGURE_FLAGS = \
        --with-pamlibdir=$$dc_install_base/$(pamlibdir) \
        --with-pamconfdir=$$dc_install_base/$(pamconfdir) \
        --with-rootprefix=$$dc_install_base \
-       --disable-split-usr
+       --disable-split-usr \
+       --enable-kdbus
 
 if HAVE_SYSV_COMPAT
 DISTCHECK_CONFIGURE_FLAGS += \
@@ -4638,6 +4853,7 @@ DISTCHECK_CONFIGURE_FLAGS += \
        --enable-gtk-doc
 endif
 
+.PHONY: hwdb-update
 hwdb-update:
        ( cd $(top_srcdir)/hwdb && \
        wget -N http://www.linux-usb.org/usb.ids \
@@ -4646,16 +4862,19 @@ hwdb-update:
                http://standards.ieee.org/develop/regauth/iab/iab.txt && \
        ./ids-update.pl )
 
+.PHONY: kdbus-update
 kdbus-update:
-       ( cd $(top_srcdir)/src/libsystemd-bus/ && \
+       ( cd $(top_srcdir)/src/libsystemd/ && \
        wget -N https://d-bus.googlecode.com/git/kdbus.h )
 
+.PHONY: upload
 upload: all distcheck
        cp -v systemd-$(VERSION).tar.xz /home/lennart/git.fedora/systemd/
        scp systemd-$(VERSION).tar.xz fdo:/srv/www.freedesktop.org/www/software/systemd/
        scp man/*.html tango:public/systemd-man/
 
 www_target = www.freedesktop.org:/srv/www.freedesktop.org/www/software/systemd
+.PHONY: doc-sync
 doc-sync: all destdir-sphinx
        gtkdoc-rebase --html-dir=docs/libudev/html --online
        rsync -rlv --delete docs/libudev/html/ --omit-dir-times $(www_target)/libudev/
@@ -4664,9 +4883,11 @@ doc-sync: all destdir-sphinx
        rsync -rlv --delete-excluded --include="*.html" --exclude="*" --omit-dir-times man/ $(www_target)/man/
        rsync -rlv --delete --omit-dir-times docs/html/python-systemd/ $(www_target)/python-systemd/
 
+.PHONY: git-tag
 git-tag:
        git tag "v$(VERSION)" -m "systemd $(VERSION)"
 
+.PHONY: install-tree
 install-tree: all
        rm -rf $(abs_srcdir)/install-tree
        $(MAKE) install DESTDIR=$(abs_srcdir)/install-tree
@@ -4674,10 +4895,14 @@ install-tree: all
 
 # Let's run all tests of the test suite, but under valgrind. Let's
 # exclude the one perl script we have in there
+.PHONY: valgrind-tests
 valgrind-tests: $(TESTS)
        $(AM_V_GEN)for f in $(filter-out %.pl, $^); do \
-               echo "Running $$f"; \
-               libtool --mode=execute valgrind -q --leak-check=full --max-stackframe=4194400 --error-exitcode=55 $(builddir)/$$f ; \
+               if file $$f | grep -q shell; then \
+               echo -e "$${x}Skipping non-binary $$f"; else \
+               echo -e "$${x}Running $$f"; \
+               libtool --mode=execute valgrind -q --leak-check=full --max-stackframe=5242880 --error-exitcode=55 $(builddir)/$$f ; fi; \
+               x="\n\n"; \
        done
 
 exported-%: %
@@ -4686,6 +4911,7 @@ exported-%: %
 exported: $(addprefix exported-, $(lib_LTLIBRARIES))
        $(AM_V_GEN)cat $^ > $@
 
+.PHONY: check-api-docs
 check-api-docs: exported man
        $(AM_V_GEN)for symbol in `cat exported` ; do \
                if test -f $(builddir)/man/$$symbol.html ; then \
@@ -4707,9 +4933,18 @@ CLEANFILES += \
        defined \
        undefined
 
+.PHONY: check-api-unused
 check-api-unused: defined undefined exported
        ( cat exported undefined ) | sort -u  | diff -u - defined | grep ^+ | grep -v ^+++ | cut -c2-
 
+.PHONY: check-includes
+check-includes: $(top_srcdir)/tools/check-includes.pl
+       $(AM_V_GEN) find * -name '*.[hcS]' -type f -print | sort -u \
+               | xargs $(top_srcdir)/tools/check-includes.pl
+
+EXTRA_DIST += \
+       $(top_srcdir)/tools/check-includes.pl
+
 # Stupid test that everything purported to be exported really is
 
 define generate-sym-test
@@ -4723,47 +4958,42 @@ define generate-sym-test
        $(AM_V_at)printf 'return 0; }\n' >> $@
 endef
 
-test-libsystemd-bus-sym.c: \
-       src/libsystemd-bus/libsystemd-bus.sym \
+test-libsystemd-sym.c: \
+       src/libsystemd/libsystemd.sym \
        src/systemd/sd-bus.h \
        src/systemd/sd-utf8.h \
-       Makefile
+       src/systemd/sd-login.h
        $(generate-sym-test)
 
 test-libsystemd-daemon-sym.c: \
        src/libsystemd-daemon/libsystemd-daemon.sym \
-       src/systemd/sd-daemon.h \
-       Makefile
+       src/systemd/sd-daemon.h
        $(generate-sym-test)
 
 test-libsystemd-id128-sym.c: \
-       src/libsystemd-id128/libsystemd-id128.sym \
-       src/systemd/sd-id128.h \
-       Makefile
+       src/compat-libs/libsystemd-id128.sym \
+       src/systemd/sd-id128.h
        $(generate-sym-test)
 
 test-libsystemd-journal-sym.c: \
        src/journal/libsystemd-journal.sym \
-       src/systemd/sd-journal.h \
-       Makefile
+       src/systemd/sd-journal.h
        $(generate-sym-test)
 
 test-libsystemd-login-sym.c: \
-       src/login/libsystemd-login.sym \
-       src/systemd/sd-login.h \
-       Makefile
+       src/compat-libs/libsystemd-login.sym \
+       src/systemd/sd-login.h
        $(generate-sym-test)
 
 test-libudev-sym.c: \
        src/libudev/libudev.sym \
-       src/udev/udev.h \
-       Makefile
+       src/udev/udev.h
        $(generate-sym-test)
 
-test_libsystemd_bus_sym_SOURCES = \
-       test-libsystemd-bus-sym.c
-test_libsystemd_bus_sym_LDADD = \
-       libsystemd-bus.la
+test_libsystemd_sym_SOURCES = \
+       test-libsystemd-sym.c
+test_libsystemd_sym_LDADD = \
+       libsystemd.la
 
 test_libsystemd_daemon_sym_SOURCES = \
        test-libsystemd-daemon-sym.c
@@ -4791,17 +5021,31 @@ test_libudev_sym_LDADD = \
        libudev.la
 
 BUILT_SOURCES += \
-       $(test_libsystemd_bus_sym_SOURCES) \
+       $(test_libsystemd_sym_SOURCES) \
        $(test_libsystemd_daemon_sym_SOURCES) \
-       $(test_libsystemd_id128_sym_SOURCES) \
        $(test_libsystemd_journal_sym_SOURCES) \
-       $(test_libsystemd_login_sym_SOURCES) \
        $(test_libudev_sym_SOURCES)
 
 tests += \
-       test-libsystemd-bus-sym \
+       test-libsystemd-sym \
        test-libsystemd-daemon-sym \
-       test-libsystemd-id128-sym \
        test-libsystemd-journal-sym \
-       test-libsystemd-login-sym \
        test-libudev-sym
+
+if ENABLE_COMPAT_LIBS
+BUILT_SOURCES += \
+       $(test_libsystemd_login_sym_SOURCES) \
+       $(test_libsystemd_id128_sym_SOURCES)
+
+tests += \
+       test-libsystemd-login-sym \
+       test-libsystemd-id128-sym
+endif
+
+.PHONY: cppcheck
+cppcheck:
+       cppcheck --enable=all -q $(top_srcdir)
+
+# Used to extract compile flags for YCM.
+print-%:
+       @echo $($*)