chiark / gitweb /
core: check the right variable for failed open()
[elogind.git] / Makefile.am
index c538e7c..669eb33 100644 (file)
@@ -39,29 +39,29 @@ LIBUDEV_CURRENT=5
 LIBUDEV_REVISION=0
 LIBUDEV_AGE=4
 
-LIBGUDEV_CURRENT=1
-LIBGUDEV_REVISION=3
-LIBGUDEV_AGE=1
+LIBGUDEV_CURRENT=2
+LIBGUDEV_REVISION=0
+LIBGUDEV_AGE=2
 
 LIBSYSTEMD_LOGIN_CURRENT=9
-LIBSYSTEMD_LOGIN_REVISION=2
+LIBSYSTEMD_LOGIN_REVISION=3
 LIBSYSTEMD_LOGIN_AGE=9
 
 LIBSYSTEMD_DAEMON_CURRENT=0
-LIBSYSTEMD_DAEMON_REVISION=11
+LIBSYSTEMD_DAEMON_REVISION=12
 LIBSYSTEMD_DAEMON_AGE=0
 
 LIBSYSTEMD_ID128_CURRENT=0
-LIBSYSTEMD_ID128_REVISION=27
+LIBSYSTEMD_ID128_REVISION=28
 LIBSYSTEMD_ID128_AGE=0
 
 LIBSYSTEMD_JOURNAL_CURRENT=11
-LIBSYSTEMD_JOURNAL_REVISION=4
+LIBSYSTEMD_JOURNAL_REVISION=5
 LIBSYSTEMD_JOURNAL_AGE=11
 
-LIBSYSTEMD_CURRENT=0
+LIBSYSTEMD_CURRENT=1
 LIBSYSTEMD_REVISION=0
-LIBSYSTEMD_AGE=0
+LIBSYSTEMD_AGE=1
 
 # Dirs of external packages
 dbuspolicydir=@dbuspolicydir@
@@ -87,7 +87,7 @@ userunitdir=$(prefix)/lib/systemd/user
 userpresetdir=$(prefix)/lib/systemd/user-preset
 tmpfilesdir=$(prefix)/lib/tmpfiles.d
 sysctldir=$(prefix)/lib/sysctl.d
-networkdir=$(prefix)/lib/systemd/network
+networkdir=$(rootprefix)/lib/systemd/network
 pkgincludedir=$(includedir)/systemd
 systemgeneratordir=$(rootlibexecdir)/system-generators
 usergeneratordir=$(prefix)/lib/systemd/user-generators
@@ -101,6 +101,7 @@ udevrulesdir=$(udevlibexecdir)/rules.d
 udevhwdbdir=$(udevlibexecdir)/hwdb.d
 catalogdir=$(prefix)/lib/systemd/catalog
 kernelinstalldir = $(prefix)/lib/kernel/install.d
+ntpunitsdir=$(prefix)/lib/systemd/ntp-units.d
 
 # And these are the special ones for /
 rootprefix=@rootprefix@
@@ -128,6 +129,7 @@ polkitpolicy_in_files =
 polkitpolicy_files =
 dist_udevrules_DATA =
 nodist_udevrules_DATA =
+nodist_pkgsysconf_DATA =
 dist_pkgsysconf_DATA =
 dist_pkgdata_DATA =
 dist_dbuspolicy_DATA =
@@ -186,6 +188,8 @@ AM_CPPFLAGS = \
        -I $(top_srcdir)/src/network \
        -I $(top_srcdir)/src/login \
        -I $(top_srcdir)/src/journal \
+       -I $(top_srcdir)/src/timedate \
+       -I $(top_srcdir)/src/timesync \
        -I $(top_srcdir)/src/systemd \
        -I $(top_builddir)/src/core \
        -I $(top_srcdir)/src/core \
@@ -196,6 +200,7 @@ AM_CPPFLAGS = \
        -I $(top_srcdir)/src/libsystemd/sd-bus \
        -I $(top_srcdir)/src/libsystemd/sd-event \
        -I $(top_srcdir)/src/libsystemd/sd-rtnl \
+       -I $(top_srcdir)/src/libsystemd-network \
        $(OUR_CPPFLAGS)
 
 AM_CFLAGS = $(OUR_CFLAGS)
@@ -206,8 +211,8 @@ define move-to-rootlibdir
        if test "$(libdir)" != "$(rootlibdir)"; then \
                $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
                so_img_name=$$(readlink $(DESTDIR)$(libdir)/$$libname) && \
-               so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
-               $(LN_S) -f $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/$$libname && \
+               rm -f $(DESTDIR)$(libdir)/$$libname && \
+               $(LN_S) --relative -f $(DESTDIR)$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/$$libname && \
                mv $(DESTDIR)$(libdir)/$$libname.* $(DESTDIR)$(rootlibdir); \
        fi
 endef
@@ -231,7 +236,6 @@ USER_BUSNAMES_TARGET_WANTS =
 
 SYSTEM_UNIT_ALIASES =
 USER_UNIT_ALIASES =
-
 GENERAL_ALIASES =
 
 install-target-wants-hook:
@@ -267,9 +271,9 @@ install-aliases-hook:
        set -- $(SYSTEM_UNIT_ALIASES) && \
                dir=$(systemunitdir) && $(install-aliases)
        set -- $(USER_UNIT_ALIASES) && \
-               dir=$(userunitdir) && $(install-aliases)
+               dir=$(userunitdir) && $(install-relative-aliases)
        set -- $(GENERAL_ALIASES) && \
-               dir= && $(install-aliases)
+               dir= && $(install-relative-aliases)
 
 define install-aliases
        while [ -n "$$1" ]; do \
@@ -280,6 +284,15 @@ define install-aliases
        done
 endef
 
+define install-relative-aliases
+       while [ -n "$$1" ]; do \
+               $(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \
+               rm -f $(DESTDIR)$$dir/$$2 && \
+               $(LN_S) --relative $(DESTDIR)$$1 $(DESTDIR)$$dir/$$2 && \
+               shift 2 || exit $$?; \
+       done
+endef
+
 INSTALL_EXEC_HOOKS += \
        install-target-wants-hook \
        install-directories-hook \
@@ -302,6 +315,10 @@ AM_V_LN = $(AM_V_LN_$(V))
 AM_V_LN_ = $(AM_V_LN_$(AM_DEFAULT_VERBOSITY))
 AM_V_LN_0 = @echo "  LN      " $@;
 
+AM_V_RM = $(AM_V_RM_$(V))
+AM_V_RM_ = $(AM_V_RM_$(AM_DEFAULT_VERBOSITY))
+AM_V_RM_0 = @echo "  RM      " $@;
+
 # ------------------------------------------------------------------------------
 rootbin_PROGRAMS = \
        systemctl \
@@ -352,7 +369,12 @@ dist_bashcompletion_DATA = \
        shell-completion/bash/journalctl \
        shell-completion/bash/systemctl \
        shell-completion/bash/systemd-analyze \
+       shell-completion/bash/systemd-cat \
+       shell-completion/bash/systemd-cgls \
+       shell-completion/bash/systemd-cgtop \
        shell-completion/bash/systemd-delta \
+       shell-completion/bash/systemd-detect-virt \
+       shell-completion/bash/systemd-nspawn \
        shell-completion/bash/systemd-run \
        shell-completion/bash/udevadm \
        shell-completion/bash/kernel-install
@@ -502,9 +524,6 @@ EXTRA_DIST += \
        units/systemd-fsck@.service.in \
        units/systemd-fsck-root.service.in \
        units/user@.service.in \
-       units/systemd-udevd.service \
-       units/systemd-udev-trigger.service \
-       units/systemd-udev-settle.service \
        units/debug-shell.service.in \
        units/systemd-hibernate.service.in \
        units/systemd-hybrid-sleep.service.in \
@@ -553,7 +572,10 @@ dist_doc_DATA = \
        LICENSE.LGPL2.1 \
        LICENSE.GPL2 \
        LICENSE.MIT \
-       DISTRO_PORTING
+       DISTRO_PORTING \
+       src/libsystemd/sd-bus/PORTING-DBUS1 \
+       src/libsystemd/sd-bus/DIFFERENCES \
+       src/libsystemd/sd-bus/GVARIANT-SERIALIZATION
 
 @INTLTOOL_POLICY_RULE@
 
@@ -646,8 +668,7 @@ EXTRA_DIST += \
        tools/make-man-index.py \
        tools/make-directive-index.py \
        tools/make-man-rules.py \
-       tools/xml_helper.py \
-       man/less-variables.xml
+       tools/xml_helper.py
 
 # ------------------------------------------------------------------------------
 noinst_LTLIBRARIES += \
@@ -674,6 +695,8 @@ libsystemd_shared_la_SOURCES = \
        src/shared/util.h \
        src/shared/virt.c \
        src/shared/virt.h \
+       src/shared/architecture.c \
+       src/shared/architecture.h \
        src/shared/efivars.c \
        src/shared/efivars.h \
        src/shared/path-util.c \
@@ -759,18 +782,37 @@ libsystemd_shared_la_SOURCES = \
        src/shared/ima-util.h \
        src/shared/ptyfwd.c \
        src/shared/ptyfwd.h \
-       src/shared/net-util.c \
-       src/shared/net-util.h \
        src/shared/errno-list.c \
        src/shared/errno-list.h \
+       src/shared/af-list.c \
+       src/shared/af-list.h \
        src/shared/audit.c \
        src/shared/audit.h \
        src/shared/xml.c \
-       src/shared/xml.h
+       src/shared/xml.h \
+       src/shared/condition-util.c \
+       src/shared/condition-util.h \
+       src/shared/bus-label.c \
+       src/shared/bus-label.h \
+       src/shared/gpt.h \
+       src/shared/generator.h \
+       src/shared/generator.c \
+       src/shared/clean-ipc.h \
+       src/shared/clean-ipc.c \
+       src/shared/login-shared.c \
+       src/shared/login-shared.h \
+       src/shared/async.c \
+       src/shared/async.h
 
 nodist_libsystemd_shared_la_SOURCES = \
        src/shared/errno-from-name.h \
-       src/shared/errno-to-name.h
+       src/shared/errno-to-name.h \
+       src/shared/af-from-name.h \
+       src/shared/af-to-name.h
+
+libsystemd_shared_la_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(SECCOMP_CFLAGS)
 
 # ------------------------------------------------------------------------------
 noinst_LTLIBRARIES += \
@@ -814,7 +856,6 @@ libsystemd_label_la_LIBADD = \
 # ------------------------------------------------------------------------------
 
 if HAVE_SECCOMP
-
 noinst_LTLIBRARIES += \
        libsystemd-seccomp.la
 
@@ -828,7 +869,6 @@ libsystemd_seccomp_la_CFLAGS = \
 
 libsystemd_seccomp_la_LIBADD = \
        $(SECCOMP_LIBS)
-
 endif
 
 # ------------------------------------------------------------------------------
@@ -960,8 +1000,6 @@ 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 \
@@ -986,8 +1024,6 @@ libsystemd_core_la_SOURCES = \
        src/core/condition.h \
        src/core/namespace.c \
        src/core/namespace.h \
-       src/core/tcpwrap.c \
-       src/core/tcpwrap.h \
        src/core/build.h \
        src/core/sysfs-show.h \
        src/core/switch-root.h \
@@ -996,8 +1032,8 @@ libsystemd_core_la_SOURCES = \
        src/core/killall.c \
        src/core/audit-fd.c \
        src/core/audit-fd.h \
-       src/core/async.c \
-       src/core/async.h
+       src/core/show-status.c \
+       src/core/show-status.h
 
 if HAVE_KMOD
 libsystemd_core_la_SOURCES += \
@@ -1011,11 +1047,11 @@ nodist_libsystemd_core_la_SOURCES = \
 
 libsystemd_core_la_CFLAGS = \
        $(AM_CFLAGS) \
-       $(LIBWRAP_CFLAGS) \
        $(PAM_CFLAGS) \
        $(AUDIT_CFLAGS) \
        $(CAP_CFLAGS) \
        $(KMOD_CFLAGS) \
+       $(APPARMOR_CFLAGS) \
        $(SECCOMP_CFLAGS) \
        -pthread
 
@@ -1026,11 +1062,11 @@ libsystemd_core_la_LIBADD = \
        libudev-internal.la \
        libsystemd-shared.la \
        libsystemd-internal.la \
-       $(LIBWRAP_LIBS) \
        $(PAM_LIBS) \
        $(AUDIT_LIBS) \
        $(CAP_LIBS) \
        $(KMOD_LIBS) \
+       $(APPARMOR_LIBS) \
        $(SECCOMP_LIBS)
 
 if HAVE_SECCOMP
@@ -1050,15 +1086,19 @@ CLEANFILES += \
        src/core/load-fragment-gperf.c \
        src/core/load-fragment-gperf-nulstr.c \
        src/shared/errno-list.txt \
-       src/shared/errno-from-name.gperf
+       src/shared/errno-from-name.gperf \
+       src/shared/af-list.txt \
+       src/shared/af-from-name.gperf
 
 BUILT_SOURCES += \
        src/shared/errno-from-name.h \
-       src/shared/errno-to-name.h
+       src/shared/errno-to-name.h \
+       src/shared/af-from-name.h \
+       src/shared/af-to-name.h
 
 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; }'  > $@
+       $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include errno.h - < /dev/null | $(AWK) '/^#define[ \t]+E[^ _]+[ \t]+/ { print $$2; }'  > $@
 
 src/shared/errno-from-name.gperf: src/shared/errno-list.txt
        $(AM_V_at)$(MKDIR_P) $(dir $@)
@@ -1070,12 +1110,32 @@ src/shared/errno-from-name.h: src/shared/errno-from-name.gperf
 
 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 "};"}' < $< > $@
+       $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const errno_names[] = { "} !/EDEADLOCK/ && !/EWOULDBLOCK/ && !/ENOTSUP/ { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' < $< > $@
+
+src/shared/af-list.txt:
+       $(AM_V_at)$(MKDIR_P) $(dir $@)
+       $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include sys/socket.h - < /dev/null | grep -v AF_UNSPEC | grep -v AF_MAX | $(AWK) '/^#define[ \t]+AF_[^ \t]+[ \t]+PF_[^ \t]/ { print $$2; }'  > $@
+
+src/shared/af-from-name.gperf: src/shared/af-list.txt
+       $(AM_V_at)$(MKDIR_P) $(dir $@)
+       $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct af_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' < $< > $@
+
+src/shared/af-from-name.h: src/shared/af-from-name.gperf
+       $(AM_V_at)$(MKDIR_P) $(dir $@)
+       $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_af -H hash_af_name -p -C < $< > $@
+
+src/shared/af-to-name.h: src/shared/af-list.txt
+       $(AM_V_at)$(MKDIR_P) $(dir $@)
+       $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const af_names[] = { "} !/AF_FILE/ && !/AF_ROUTE/ && !/AF_LOCAL/ { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' < $< > $@
 
 # ------------------------------------------------------------------------------
 systemd_SOURCES = \
        src/core/main.c
 
+systemd_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(SECCOMP_CFLAGS)
+
 systemd_LDADD = \
        libsystemd-core.la \
        $(RT_LIBS)
@@ -1115,9 +1175,16 @@ manual_tests += \
        test-hostname \
        test-daemon \
        test-cgroup \
+       test-cgroup-mask \
        test-install \
        test-watchdog \
-       test-log
+       test-log \
+       test-ipcrm
+
+if HAVE_KMOD
+manual_tests += \
+       test-rtnl-manual
+endif
 
 tests += \
        test-job-type \
@@ -1140,7 +1207,6 @@ tests += \
        test-calendarspec \
        test-strip-tab-ansi \
        test-cgroup-util \
-       test-cgroup-mask \
        test-prioq \
        test-fileio \
        test-time \
@@ -1148,7 +1214,8 @@ tests += \
        test-list \
        test-tables \
        test-device-nodes \
-       test-xml
+       test-xml \
+       test-architecture
 
 EXTRA_DIST += \
        test/sched_idle_bad.service \
@@ -1172,6 +1239,10 @@ test_device_nodes_LDADD = \
 test_engine_SOURCES = \
        src/test/test-engine.c
 
+test_engine_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(SECCOMP_CFLAGS)
+
 test_engine_LDADD = \
        libsystemd-core.la \
        $(RT_LIBS)
@@ -1179,6 +1250,10 @@ test_engine_LDADD = \
 test_job_type_SOURCES = \
        src/test/test-job-type.c
 
+test_job_type_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(SECCOMP_CFLAGS)
+
 test_job_type_LDADD = \
        libsystemd-core.la \
        $(RT_LIBS)
@@ -1186,6 +1261,10 @@ test_job_type_LDADD = \
 test_ns_SOURCES = \
        src/test/test-ns.c
 
+test_ns_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(SECCOMP_CFLAGS)
+
 test_ns_LDADD = \
        libsystemd-core.la
 
@@ -1215,6 +1294,10 @@ endif
 test_unit_name_SOURCES = \
        src/test/test-unit-name.c
 
+test_unit_name_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(SECCOMP_CFLAGS)
+
 test_unit_name_LDADD = \
        libsystemd-core.la \
        $(RT_LIBS)
@@ -1222,6 +1305,10 @@ test_unit_name_LDADD = \
 test_unit_file_SOURCES = \
        src/test/test-unit-file.c
 
+test_unit_file_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(SECCOMP_CFLAGS)
+
 test_unit_file_LDADD = \
        libsystemd-core.la \
        $(RT_LIBS)
@@ -1272,6 +1359,10 @@ test_tables_SOURCES = \
        src/test/test-tables.c \
        src/shared/test-tables.h
 
+test_tables_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(SECCOMP_CFLAGS)
+
 test_tables_LDADD = \
        libsystemd-logs.la \
        libsystemd-journal-internal.la \
@@ -1296,12 +1387,37 @@ test_time_SOURCES = \
 test_time_LDADD = \
        libsystemd-core.la
 
+test_architecture_SOURCES = \
+       src/test/test-architecture.c
+
+test_architecture_LDADD = \
+       libsystemd-shared.la
+
 test_log_SOURCES = \
        src/test/test-log.c
 
 test_log_LDADD = \
        libsystemd-core.la
 
+test_ipcrm_SOURCES = \
+       src/test/test-ipcrm.c
+
+test_ipcrm_LDADD = \
+       libsystemd-shared.la \
+       -lrt
+
+test_rtnl_manual_SOURCES = \
+       src/test/test-rtnl-manual.c
+
+test_rtnl_manual_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(KMOD_CFLAGS)
+
+test_rtnl_manual_LDADD = \
+       libsystemd-internal.la \
+       libsystemd-shared.la \
+       $(KMOD_LIBS)
+
 test_ellipsize_SOURCES = \
        src/test/test-ellipsize.c
 
@@ -1350,7 +1466,8 @@ test_cgroup_SOURCES = \
 
 test_cgroup_LDADD = \
        libsystemd-label.la \
-       libsystemd-shared.la
+       libsystemd-shared.la \
+       libsystemd-internal.la
 
 test_cgroup_mask_SOURCES = \
        src/test/test-cgroup-mask.c
@@ -1359,6 +1476,10 @@ test_cgroup_mask_CPPFLAGS = \
        $(AM_CPPFLAGS) \
        -DTEST_DIR=\"$(abs_top_srcdir)/test\"
 
+test_cgroup_mask_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(SECCOMP_CFLAGS)
+
 test_cgroup_mask_LDADD = \
        libsystemd-core.la \
        $(RT_LIBS)
@@ -1409,8 +1530,8 @@ test_install_SOURCES = \
 test_install_LDADD = \
        libsystemd-units.la \
        libsystemd-label.la \
-       libsystemd-internal.la \
-       libsystemd-shared.la
+       libsystemd-shared.la \
+       libsystemd-internal.la
 
 test_watchdog_SOURCES = \
        src/test/test-watchdog.c
@@ -1425,6 +1546,10 @@ test_sched_prio_CPPFLAGS = \
        $(AM_CPPFLAGS) \
        -DTEST_DIR=\"$(abs_top_srcdir)/test\"
 
+test_sched_prio_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(SECCOMP_CFLAGS)
+
 test_sched_prio_LDADD = \
        libsystemd-core.la \
        $(RT_LIBS)
@@ -1726,6 +1851,9 @@ bootctl_LDADD = \
 bin_PROGRAMS += \
        bootctl
 
+dist_bashcompletion_DATA += \
+       shell-completion/bash/bootctl
+
 dist_zshcompletion_DATA += \
        shell-completion/zsh/_bootctl
 
@@ -1737,7 +1865,8 @@ systemgenerator_PROGRAMS +=  \
        systemd-gpt-auto-generator
 
 systemd_gpt_auto_generator_SOURCES = \
-       src/gpt-auto-generator/gpt-auto-generator.c
+       src/gpt-auto-generator/gpt-auto-generator.c \
+       src/shared/blkid-util.h
 
 systemd_gpt_auto_generator_LDADD = \
        libsystemd-label.la \
@@ -1766,7 +1895,8 @@ systemd_dbus1_generator_LDADD = \
 
 dbus1-generator-install-hook:
        $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(usergeneratordir)
-       $(AM_V_LN)$(LN_S) -f $(systemgeneratordir)/systemd-dbus1-generator $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
+       $(AM_V_RM)rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
+       $(AM_V_LN)$(LN_S) --relative -f $(DESTDIR)$(systemgeneratordir)/systemd-dbus1-generator $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
 
 dbus1-generator-uninstall-hook:
        rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
@@ -1842,6 +1972,7 @@ systemd_cgls_SOURCES = \
        src/cgls/cgls.c
 
 systemd_cgls_LDADD = \
+       libsystemd-internal.la \
        libsystemd-shared.la
 
 # ------------------------------------------------------------------------------
@@ -1861,7 +1992,8 @@ systemd_nspawn_SOURCES = \
 
 systemd_nspawn_CFLAGS = \
        $(AM_CFLAGS) \
-       $(SECCOMP_CFLAGS)
+       $(SECCOMP_CFLAGS) \
+       $(BLKID_CFLAGS)
 
 systemd_nspawn_LDADD = \
        libsystemd-label.la \
@@ -1869,8 +2001,13 @@ systemd_nspawn_LDADD = \
        libsystemd-internal.la \
        libudev-internal.la \
        libsystemd-shared.la \
+       $(BLKID_LIBS)
+
+if HAVE_SECCOMP
+systemd_nspawn_LDADD += \
        libsystemd-seccomp.la \
        $(SECCOMP_LIBS)
+endif
 
 # ------------------------------------------------------------------------------
 systemd_run_SOURCES = \
@@ -1892,7 +2029,8 @@ systemd_bus_proxyd_LDADD = \
 
 bus-proxyd-install-hook:
        $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(bindir)
-       $(AM_V_LN)$(LN_S) -f ../lib/systemd/systemd-bus-proxyd $(DESTDIR)$(bindir)/systemd-stdio-bridge
+       $(AM_V_RM)rm -f $(DESTDIR)$(bindir)/systemd-stdio-bridge
+       $(AM_V_LN)$(LN_S) --relative -f $(DESTDIR)$(rootlibexecdir)/systemd-bus-proxyd $(DESTDIR)$(bindir)/systemd-stdio-bridge
 
 bus-proxyd-uninstall-hook:
        rm -f $(DESTDIR)$(bindir)/systemd-stdio-bridge
@@ -1968,6 +2106,8 @@ libsystemd_internal_la_SOURCES = \
        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-track.c \
+       src/libsystemd/sd-bus/bus-track.h \
        src/libsystemd/sd-bus/bus-util.c \
        src/libsystemd/sd-bus/bus-util.h \
        src/libsystemd/sd-bus/bus-protocol.h \
@@ -1979,15 +2119,13 @@ libsystemd_internal_la_SOURCES = \
        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-types.h \
+       src/libsystemd/sd-rtnl/rtnl-types.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/libsystemd/sd-daemon/sd-daemon.c \
-       src/login/sd-login.c \
-       src/login/login-shared.c \
-       src/login/login-shared.h
+       src/libsystemd/sd-login/sd-login.c
 
 nodist_libsystemd_internal_la_SOURCES = \
        src/libsystemd/libsystemd.sym \
@@ -1997,8 +2135,23 @@ libsystemd_internal_la_CFLAGS = \
        $(AM_CFLAGS) \
        -pthread
 
+libsystemd_internal_la_LIBADD = \
+       $(RT_LIBS)
+
+libsystemd_resolve_la_SOURCES = \
+       src/libsystemd/sd-resolve/sd-resolve.c \
+       src/libsystemd/sd-resolve/resolve-util.h
+
+libsystemd_resolve_la_CFLAGS = \
+       $(AM_CFLAGS) \
+       -pthread
+
+libsystemd_resolve_la_LIBADD = \
+       -lresolv
+
 noinst_LTLIBRARIES += \
-       libsystemd-internal.la
+       libsystemd-internal.la \
+       libsystemd-resolve.la
 
 libsystemd_dump_la_SOURCES = \
        src/libsystemd/sd-bus/bus-dump.c \
@@ -2027,6 +2180,7 @@ BUILT_SOURCES += \
 
 libsystemd_la_SOURCES = \
        $(libsystemd_internal_la_SOURCES) \
+       $(libsystemd_resolve_la_SOURCES) \
        $(libsystemd_journal_internal_la_SOURCES)
 
 nodist_libsystemd_la_SOURCES = \
@@ -2034,6 +2188,7 @@ nodist_libsystemd_la_SOURCES = \
 
 libsystemd_la_CFLAGS = \
        $(libsystemd_internal_la_CFLAGS) \
+       $(libsystemd_resolve_la_CFLAGS) \
        $(libsystemd_journal_internal_la_CFLAGS)
 
 libsystemd_la_LDFLAGS = \
@@ -2043,9 +2198,18 @@ libsystemd_la_LDFLAGS = \
 
 libsystemd_la_LIBADD = \
        libsystemd-shared.la \
+       $(libsystemd_internal_la_LIBADD) \
        $(libsystemd_journal_internal_la_LIBADD) \
-       $(RT_LIBS) \
-       -lresolv
+       $(libsystemd_resolve_la_LIBADD)
+
+libsystemd-install-hook:
+       libname=libsystemd.so && $(move-to-rootlibdir)
+
+libsystemd-uninstall-hook:
+       rm -f $(DESTDIR)$(rootlibdir)/libsystemd.so*
+
+INSTALL_EXEC_HOOKS += libsystemd-install-hook
+UNINSTALL_EXEC_HOOKS += libsystemd-uninstall-hook
 
 pkgconfiglib_DATA += \
        src/libsystemd/libsystemd.pc
@@ -2133,6 +2297,10 @@ test_bus_chat_LDADD = \
 test_bus_cleanup_SOURCES = \
        src/libsystemd/sd-bus/test-bus-cleanup.c
 
+test_bus_cleanup_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(SECCOMP_CFLAGS)
+
 test_bus_cleanup_LDADD = \
        libsystemd-internal.la \
        libsystemd-shared.la
@@ -2255,8 +2423,8 @@ test_bus_introspect_SOURCES = \
        src/libsystemd/sd-bus/test-bus-introspect.c
 
 test_bus_introspect_LDADD = \
-       libsystemd-shared.la \
-       libsystemd-internal.la
+       libsystemd-internal.la \
+       libsystemd-shared.la
 
 test_event_SOURCES = \
        src/libsystemd/sd-event/test-event.c
@@ -2273,13 +2441,12 @@ test_rtnl_LDADD = \
        libsystemd-shared.la
 
 test_resolve_SOURCES = \
-       src/systemd/sd-resolve.h \
        src/libsystemd/sd-resolve/test-resolve.c
 
 test_resolve_LDADD = \
+       libsystemd-resolve.la \
        libsystemd-internal.la \
-       libsystemd-shared.la \
-       -lresolv
+       libsystemd-shared.la
 
 test_resolve_CFLAGS = \
        $(AM_CFLAGS) \
@@ -2301,47 +2468,72 @@ busctl_CFLAGS = \
 
 # ------------------------------------------------------------------------------
 noinst_LTLIBRARIES += \
-       libsystemd-dhcp.la
+       libsystemd-network.la
 
-libsystemd_dhcp_la_SOURCES = \
+libsystemd_network_la_SOURCES = \
+       src/systemd/sd-network.h \
        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-packet.c \
-       src/libsystemd-dhcp/dhcp-internal.h \
-       src/libsystemd-dhcp/dhcp-protocol.h
-
-libsystemd_dhcp_la_LIBADD = \
+       src/systemd/sd-dhcp-lease.h \
+       src/systemd/sd-ipv4ll.h \
+       src/network/sd-network.c \
+       src/network/network-util.h \
+       src/libsystemd-network/sd-dhcp-client.c \
+       src/libsystemd-network/dhcp-network.c \
+       src/libsystemd-network/dhcp-option.c \
+       src/libsystemd-network/dhcp-packet.c \
+       src/libsystemd-network/dhcp-internal.h \
+       src/libsystemd-network/dhcp-protocol.h \
+       src/libsystemd-network/dhcp-lease-internal.h \
+       src/libsystemd-network/sd-dhcp-lease.c \
+       src/libsystemd-network/sd-ipv4ll.c \
+       src/libsystemd-network/ipv4ll-network.c \
+       src/libsystemd-network/ipv4ll-packet.c \
+       src/libsystemd-network/ipv4ll-internal.h \
+       src/libsystemd-network/network-internal.c \
+       src/libsystemd-network/network-internal.h
+
+libsystemd_network_la_LIBADD = \
+       libsystemd-label.la \
        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
+       src/libsystemd-network/dhcp-protocol.h \
+       src/libsystemd-network/dhcp-internal.h \
+       src/libsystemd-network/test-dhcp-option.c
 
 test_dhcp_option_LDADD = \
-       libsystemd-dhcp.la \
+       libsystemd-network.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
+       src/libsystemd-network/dhcp-protocol.h \
+       src/libsystemd-network/dhcp-internal.h \
+       src/libsystemd-network/test-dhcp-client.c
 
 test_dhcp_client_LDADD = \
-       libsystemd-dhcp.la \
+       libsystemd-network.la \
+       libsystemd-label.la \
        libsystemd-internal.la \
        libsystemd-shared.la
 
+test_ipv4ll_SOURCES = \
+        src/systemd/sd-ipv4ll.h \
+        src/libsystemd-network/ipv4ll-internal.h \
+        src/libsystemd-network/test-ipv4ll.c
+
+test_ipv4ll_LDADD = \
+        libsystemd-network.la \
+        libsystemd-label.la \
+        libsystemd-internal.la \
+        libsystemd-shared.la
+
 tests += \
        test-dhcp-option \
-       test-dhcp-client
+       test-dhcp-client \
+       test-ipv4ll
 
 # ------------------------------------------------------------------------------
 if ENABLE_GTK_DOC
@@ -2420,8 +2612,7 @@ noinst_LTLIBRARIES += \
 
 libudev_internal_la_SOURCES =\
        $(libudev_la_SOURCES) \
-       src/libudev/libudev-device-private.c \
-       src/libudev/libudev-queue-private.c
+       src/libudev/libudev-device-private.c
 
 libudev_internal_la_CFLAGS = \
        $(AM_CFLAGS) \
@@ -2433,10 +2624,10 @@ INSTALL_DIRS += \
        $(sysconfdir)/udev/hwdb.d
 
 dist_network_DATA = \
-       network/99-default.link
+       network/99-default.link \
+       network/80-container-host0.network
 
 dist_udevrules_DATA += \
-       rules/99-systemd.rules \
        rules/42-usb-hid-pm.rules \
        rules/50-udev-default.rules \
        rules/60-drm.rules \
@@ -2453,6 +2644,9 @@ dist_udevrules_DATA += \
        rules/80-net-setup-link.rules \
        rules/95-udev-late.rules
 
+nodist_udevrules_DATA += \
+       rules/99-systemd.rules
+
 dist_udevhwdb_DATA = \
        hwdb/20-pci-vendor-model.hwdb \
        hwdb/20-pci-classes.hwdb \
@@ -2567,6 +2761,7 @@ libudev_core_la_LIBADD = \
        libudev-internal.la \
        libsystemd-label.la \
        libsystemd-internal.la \
+       libsystemd-network.la \
        libsystemd-shared.la \
        $(BLKID_LIBS) \
        $(KMOD_LIBS)
@@ -2600,10 +2795,8 @@ if HAVE_ACL
 libudev_core_la_SOURCES += \
        src/udev/udev-builtin-uaccess.c \
        src/login/logind-acl.c \
-       src/login/sd-login.c \
-       src/systemd/sd-login.h \
-       src/login/login-shared.c \
-       src/login/login-shared.h
+       src/libsystemd/sd-login/sd-login.c \
+       src/systemd/sd-login.h
 
 libudev_core_la_LIBADD += \
        libsystemd-acl.la
@@ -2977,6 +3170,38 @@ systemd_cat_SOURCES = \
 systemd_cat_LDADD = \
        libsystemd-journal-core.la
 
+if HAVE_MICROHTTPD
+rootlibexec_PROGRAMS += \
+       systemd-journal-remote
+
+systemd_journal_remote_SOURCES = \
+       src/journal/journal-remote-parse.h \
+       src/journal/journal-remote-parse.c \
+       src/journal/journal-remote-write.h \
+       src/journal/journal-remote-write.c \
+       src/journal/journal-remote.c
+
+systemd_journal_remote_LDADD = \
+       libsystemd-internal.la \
+       libsystemd-journal-core.la
+
+systemd_journal_remote_SOURCES += \
+       src/journal/microhttpd-util.h \
+       src/journal/microhttpd-util.c
+
+systemd_journal_remote_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(MICROHTTPD_CFLAGS)
+
+systemd_journal_remote_LDADD += \
+       $(MICROHTTPD_LIBS)
+
+if HAVE_GNUTLS
+systemd_journal_remote_LDADD += \
+       $(GNUTLS_LIBS)
+endif
+endif
+
 # using _CFLAGS = in the conditional below would suppress AM_CFLAGS
 journalctl_CFLAGS = \
        $(AM_CFLAGS)
@@ -3094,6 +3319,8 @@ libsystemd_journal_core_la_SOURCES = \
        src/journal/journald-server.h \
        src/journal/journald-console.c \
        src/journal/journald-console.h \
+       src/journal/journald-wall.c \
+       src/journal/journald-wall.h \
        src/journal/journald-native.c \
        src/journal/journald-native.h \
        src/journal/journald-rate-limit.c \
@@ -3119,8 +3346,20 @@ endif
 noinst_LTLIBRARIES += \
        libsystemd-journal-core.la
 
-# ------------------------------------------------------------------------------
+journal-install-hook:
+       -$(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/
 
+journal-uninstall-hook:
+       -rmdir $(DESTDIR)/var/log/journal/
+
+INSTALL_EXEC_HOOKS += journal-install-hook
+UNINSTALL_EXEC_HOOKS += journal-uninstall-hook
+
+# ------------------------------------------------------------------------------
 # Update catalog on installation. Do not bother if installing
 # in DESTDIR, since this is likely for packaging purposes.
 catalog-update-hook:
@@ -3270,6 +3509,11 @@ systemd_journal_gatewayd_LDADD = \
        libsystemd-shared.la \
        $(MICROHTTPD_LIBS)
 
+if HAVE_GNUTLS
+systemd_journal_gatewayd_LDADD += \
+       $(GNUTLS_LIBS)
+endif
+
 systemd_journal_gatewayd_CFLAGS = \
        $(AM_CFLAGS) \
        $(MICROHTTPD_CFLAGS)
@@ -3311,8 +3555,8 @@ systemd_coredump_SOURCES = \
 systemd_coredump_LDADD = \
        libsystemd-journal-internal.la \
        libsystemd-label.la \
-       libsystemd-shared.la \
-       libsystemd-internal.la
+       libsystemd-internal.la \
+       libsystemd-shared.la
 
 rootlibexec_PROGRAMS += \
        systemd-coredump
@@ -3635,39 +3879,13 @@ EXTRA_DIST += \
 
 # ------------------------------------------------------------------------------
 if ENABLE_KDBUS
-systemd_bus_driverd_SOURCES = \
-       src/bus-driverd/bus-driverd.c
-
-systemd_bus_driverd_LDADD = \
-       libsystemd-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
+       units/org.freedesktop.systemd1.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
+       org.freedesktop.systemd1.busname
 endif
 
-EXTRA_DIST += \
-       units/systemd-bus-driverd.service.in \
-       units/user/systemd-bus-driverd.service.in
-
 # ------------------------------------------------------------------------------
 if ENABLE_LOCALED
 systemd_localed_SOURCES = \
@@ -3799,6 +4017,51 @@ EXTRA_DIST += \
        units/systemd-timedated.service.in
 
 # ------------------------------------------------------------------------------
+if ENABLE_TIMESYNCD
+systemd_timesyncd_SOURCES = \
+       src/timesync/timesyncd.c \
+       src/timesync/timesyncd.h
+
+nodist_systemd_timesyncd_SOURCES = \
+       src/timesync/timesyncd-gperf.c
+
+EXTRA_DIST += \
+       src/timesync/timesyncd-gperf.gperf
+
+CLEANFILES += \
+       src/timesync/timesyncd-gperf.c
+
+systemd_timesyncd_LDADD = \
+       libsystemd-label.la \
+       libsystemd-internal.la \
+       libsystemd-shared.la \
+       libsystemd-resolve.la \
+       -lm
+
+rootlibexec_PROGRAMS += \
+       systemd-timesyncd
+
+nodist_systemunit_DATA += \
+       units/systemd-timesyncd.service
+
+EXTRA_DIST += \
+       units/systemd-timesyncd.service.in
+
+nodist_pkgsysconf_DATA += \
+       src/timesync/timesyncd.conf
+
+EXTRA_DIST += \
+       src/timesync/timesyncd.conf.in
+
+CLEANFILES += \
+       src/timesync/timesyncd.conf
+
+dist_ntpunits_DATA = \
+       src/timesync/90-systemd.list
+
+endif
+
+# ------------------------------------------------------------------------------
 if HAVE_MYHOSTNAME
 libnss_myhostname_la_SOURCES = \
        src/nss-myhostname/nss-myhostname.c \
@@ -3813,6 +4076,10 @@ libnss_myhostname_la_LDFLAGS = \
        -shared \
        -shrext .so.2
 
+libnss_myhostname_la_LIBADD = \
+       libsystemd-shared.la \
+       libsystemd-internal.la
+
 lib_LTLIBRARIES += \
        libnss_myhostname.la
 endif
@@ -3880,7 +4147,8 @@ dist_dbuspolicy_DATA += \
        src/machine/org.freedesktop.machine1.conf
 
 dist_zshcompletion_DATA += \
-       shell-completion/zsh/_machinectl
+       shell-completion/zsh/_machinectl \
+       shell-completion/zsh/_sd_machines
 
 SYSTEM_UNIT_ALIASES += \
        systemd-machined.service dbus-org.freedesktop.machine1.service
@@ -3899,8 +4167,17 @@ rootlibexec_PROGRAMS += \
        systemd-networkd
 
 systemd_networkd_SOURCES = \
+       src/network/networkd.c
+
+systemd_networkd_LDADD = \
+       libsystemd-networkd-core.la
+
+noinst_LTLIBRARIES += \
+       libsystemd-networkd-core.la
+
+libsystemd_networkd_core_la_SOURCES = \
+       src/libsystemd-network/network-internal.h \
        src/network/networkd.h \
-       src/network/networkd.c \
        src/network/networkd-link.c \
        src/network/networkd-netdev.c \
        src/network/networkd-network.c \
@@ -3908,49 +4185,57 @@ systemd_networkd_SOURCES = \
        src/network/networkd-route.c \
        src/network/networkd-manager.c
 
-nodist_systemd_networkd_SOURCES = \
-       src/network/networkd-gperf.c
+nodist_libsystemd_networkd_core_la_SOURCES = \
+       src/network/networkd-network-gperf.c \
+       src/network/networkd-netdev-gperf.c
 
-systemd_networkd_LDADD = \
+libsystemd_networkd_core_la_LIBADD = \
        libudev-internal.la \
        libsystemd-internal.la \
-       libsystemd-dhcp.la \
+       libsystemd-network.la \
        libsystemd-label.la \
        libsystemd-shared.la
 
 nodist_systemunit_DATA += \
-       units/systemd-networkd.service
+       units/systemd-networkd.service \
+       units/systemd-networkd-wait-online.service
 
-MULTI_USER_TARGET_WANTS += \
-       systemd-networkd.service
+GENERAL_ALIASES += \
+       $(systemunitdir)/systemd-networkd.service $(pkgsysconfdir)/system/multi-user.target.wants/systemd-networkd.service \
+       $(systemunitdir)/systemd-networkd.service $(pkgsysconfdir)/system/network-online.target.wants/systemd-networkd-wait-online.service
 
-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 \
-       src/network/networkd-manager.c \
-       src/network/networkd-gperf.c
+rootlibexec_PROGRAMS += \
+       systemd-networkd-wait-online
 
-test_network_LDADD = \
+systemd_networkd_wait_online_SOURCES = \
+       src/libsystemd-network/network-internal.h \
+       src/network/networkd-wait-online.c \
+       src/network/networkd-wait-online.h
+
+systemd_networkd_wait_online_LDADD = \
+       libsystemd-network.la \
        libudev-internal.la \
        libsystemd-internal.la \
-       libsystemd-dhcp.la \
-       libsystemd-label.la \
        libsystemd-shared.la
 
+test_network_SOURCES = \
+       src/network/test-network.c
+
+test_network_LDADD = \
+       libsystemd-networkd-core.la
+
 tests += \
        test-network
 
 EXTRA_DIST += \
-       src/network/networkd-gperf.gperf \
-       units/systemd-networkd.service.in
+       src/network/networkd-network-gperf.gperf \
+       src/network/networkd-netdev-gperf.gperf \
+       units/systemd-networkd.service.in \
+       units/systemd-networkd-wait-online.service.in
 
 CLEANFILES += \
-       src/network/networkd-gperf.c
+       src/network/networkd-network-gperf.c \
+       src/network/networkd-netdev-gperf.c
 endif
 
 # ------------------------------------------------------------------------------
@@ -3987,9 +4272,7 @@ libsystemd_logind_core_la_SOURCES = \
        src/login/logind-session-dbus.c \
        src/login/logind-seat-dbus.c \
        src/login/logind-user-dbus.c \
-       src/login/logind-acl.h \
-       src/login/login-shared.c \
-       src/login/login-shared.h
+       src/login/logind-acl.h
 
 libsystemd_logind_core_la_LIBADD = \
        libsystemd-label.la \
@@ -4049,7 +4332,7 @@ rootbin_PROGRAMS += \
        systemd-inhibit
 
 test_login_SOURCES = \
-       src/login/test-login.c
+       src/libsystemd/sd-login/test-login.c
 
 test_login_LDADD = \
        libsystemd-internal.la \
@@ -4231,6 +4514,7 @@ id128_la_LDFLAGS = \
 
 id128_la_LIBADD = \
        $(PYTHON_DEVEL_LIBS) \
+       libsystemd-shared.la \
        libsystemd.la
 
 _daemon_la_SOURCES = \
@@ -4252,6 +4536,7 @@ _daemon_la_LDFLAGS = \
 
 _daemon_la_LIBADD = \
        $(PYTHON_DEVEL_LIBS) \
+       libsystemd-shared.la \
        libsystemd.la
 
 _reader_la_SOURCES = \
@@ -4272,8 +4557,8 @@ _reader_la_LDFLAGS = \
 
 _reader_la_LIBADD = \
        $(PYTHON_DEVEL_LIBS) \
-       libsystemd.la \
-       libsystemd-shared.la
+       libsystemd-shared.la \
+       libsystemd.la
 
 login_la_SOURCES = \
        src/python-systemd/login.c \
@@ -4293,8 +4578,8 @@ login_la_LDFLAGS = \
 
 login_la_LIBADD = \
        $(PYTHON_DEVEL_LIBS) \
-       libsystemd.la \
-       libsystemd-shared.la
+       libsystemd-shared.la \
+       libsystemd.la
 
 dist_pkgpyexec_PYTHON = \
        src/python-systemd/journal.py \
@@ -4340,24 +4625,26 @@ clean-python:
 
 # ------------------------------------------------------------------------------
 if ENABLE_COMPAT_LIBS
-
 EXTRA_DIST += \
        src/compat-libs/linkwarning.h
 
-define generate-fake-lib
+libsystemd-%.c: src/compat-libs/libsystemd-%.sym
        $(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
+       $(AM_V_GEN)sed -r -n 's/^ +(sd_.*);/obsolete_lib(\1,$(notdir $(basename $<)));/p' <$< >$@
+
+BUILT_SOURCES += \
+       libsystemd-journal.c \
+       libsystemd-login.c \
+       libsystemd-id128.c \
+       libsystemd-daemon.c
 
 libsystemd_journal_la_SOURCES = \
        libsystemd-journal.c \
        src/compat-libs/libsystemd-journal.sym
 
-libsystemd_journal_la_CFLAGS = \
+libsystemd_journal_la_CPPFLAGS = \
        $(AM_CFLAGS) \
-       -fvisibility=default \
-       -imacros $(top_srcdir)/src/compat-libs/linkwarning.h \
-       -fno-lto
+       -imacros$(top_srcdir)/src/compat-libs/linkwarning.h
 
 libsystemd_journal_la_LDFLAGS = \
        $(AM_LDFLAGS) \
@@ -4365,17 +4652,17 @@ libsystemd_journal_la_LDFLAGS = \
        -Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-journal.sym
 
 libsystemd_journal_la_LIBADD = \
-       libsystemd.la
+       libsystemd-journal-internal.la \
+       libsystemd-internal.la \
+       libsystemd-shared.la
 
 libsystemd_login_la_SOURCES = \
        libsystemd-login.c \
        src/compat-libs/libsystemd-login.sym
 
-libsystemd_login_la_CFLAGS = \
+libsystemd_login_la_CPPFLAGS = \
        $(AM_CFLAGS) \
-       -fvisibility=default \
-       -imacros $(top_srcdir)/src/compat-libs/linkwarning.h \
-       -fno-lto
+       -imacros$(top_srcdir)/src/compat-libs/linkwarning.h
 
 libsystemd_login_la_LDFLAGS = \
        $(AM_LDFLAGS) \
@@ -4383,14 +4670,16 @@ libsystemd_login_la_LDFLAGS = \
        -Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-login.sym
 
 libsystemd_login_la_LIBADD = \
-       libsystemd.la
+       libsystemd-internal.la \
+       libsystemd-shared.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_CPPFLAGS = \
+       $(AM_CFLAGS) \
+       -imacros$(top_srcdir)/src/compat-libs/linkwarning.h
 
 libsystemd_id128_la_LDFLAGS = \
        $(AM_LDFLAGS) \
@@ -4398,14 +4687,16 @@ libsystemd_id128_la_LDFLAGS = \
        -Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-id128.sym
 
 libsystemd_id128_la_LIBADD = \
-       libsystemd.la
+       libsystemd-internal.la \
+       libsystemd-shared.la
 
 libsystemd_daemon_la_SOURCES = \
        libsystemd-daemon.c \
        src/compat-libs/libsystemd-daemon.sym
 
-libsystemd_daemon_la_CFLAGS = \
-       $(libsystemd_login_la_CFLAGS)
+libsystemd_daemon_la_CPPFLAGS = \
+       $(AM_CFLAGS) \
+       -imacros$(top_srcdir)/src/compat-libs/linkwarning.h
 
 libsystemd_daemon_la_LDFLAGS = \
        $(AM_LDFLAGS) \
@@ -4413,16 +4704,8 @@ libsystemd_daemon_la_LDFLAGS = \
        -Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-daemon.sym
 
 libsystemd_daemon_la_LIBADD = \
-       libsystemd.la
-
-BUILT_SOURCES += \
-       libsystemd-journal.c \
-       libsystemd-login.c \
-       libsystemd-id128.c \
-       libsystemd-daemon.c
-
-libsystemd-%.c: src/compat-libs/libsystemd-%.sym
-       $(generate-fake-lib)
+       libsystemd-internal.la \
+       libsystemd-shared.la
 
 lib_LTLIBRARIES += \
        libsystemd-journal.la \
@@ -4431,6 +4714,7 @@ lib_LTLIBRARIES += \
        libsystemd-daemon.la
 
 pkgconfiglib_DATA += \
+       src/compat-libs/libsystemd-journal.pc \
        src/compat-libs/libsystemd-login.pc \
        src/compat-libs/libsystemd-id128.pc \
        src/compat-libs/libsystemd-daemon.pc
@@ -4438,20 +4722,22 @@ pkgconfiglib_DATA += \
 # 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-journal.so && $(move-to-rootlibdir)
        libname=libsystemd-id128.so && $(move-to-rootlibdir)
        libname=libsystemd-daemon.so && $(move-to-rootlibdir)
 
 compat-lib-uninstall-hook:
        rm -f $(DESTDIR)$(rootlibdir)/libsystemd-login.so*
+       rm -f $(DESTDIR)$(rootlibdir)/libsystemd-journal.so*
        rm -f $(DESTDIR)$(rootlibdir)/libsystemd-id128.so*
        rm -f $(DESTDIR)$(rootlibdir)/libsystemd-daemon.so*
 
 INSTALL_EXEC_HOOKS += compat-lib-install-hook
 UNINSTALL_EXEC_HOOKS += compat-lib-uninstall-hook
-
 endif
 
 EXTRA_DIST += \
+       src/compat-libs/libsystemd-journal.pc.in \
        src/compat-libs/libsystemd-login.pc.in \
        src/compat-libs/libsystemd-id128.pc.in \
        src/compat-libs/libsystemd-daemon.pc.in
@@ -4502,7 +4788,8 @@ substitutions = \
        '|RC_LOCAL_SCRIPT_PATH_START=$(RC_LOCAL_SCRIPT_PATH_START)|' \
        '|RC_LOCAL_SCRIPT_PATH_STOP=$(RC_LOCAL_SCRIPT_PATH_STOP)|' \
        '|PYTHON=$(PYTHON)|' \
-       '|PYTHON_BINARY=$(PYTHON_BINARY)|'
+       '|PYTHON_BINARY=$(PYTHON_BINARY)|' \
+       '|NTP_SERVERS=$(NTP_SERVERS)|'
 
 SED_PROCESS = \
        $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
@@ -4530,6 +4817,9 @@ src/%.policy.in: src/%.policy.in.in
 %.rules: %.rules.in
        $(SED_PROCESS)
 
+%.conf: %.conf.in
+       $(SED_PROCESS)
+
 %.sh: %.sh.in
        $(SED_PROCESS)
        $(AM_V_GEN)chmod +x $@
@@ -4569,7 +4859,7 @@ CLEANFILES += \
 
 # ------------------------------------------------------------------------------
 if ENABLE_MANPAGES
-man/custom-entities.ent:
+man/custom-entities.ent: configure.ac
        $(AM_V_GEN)$(MKDIR_P) $(dir $@)
        $(AM_V_GEN)(echo '<?xml version="1.0" encoding="utf-8" ?>' && \
         printf '$(subst '|,<!ENTITY ,$(subst =, ",$(subst |',">\n,$(substitutions))))') \
@@ -4709,7 +4999,7 @@ GENERAL_ALIASES += \
        $(systemunitdir)/remote-fs.target $(pkgsysconfdir)/system/multi-user.target.wants/remote-fs.target \
        $(systemunitdir)/getty@.service $(pkgsysconfdir)/system/getty.target.wants/getty@tty1.service \
        $(pkgsysconfdir)/user $(sysconfdir)/xdg/systemd/user \
-       ../system-services/org.freedesktop.systemd1.service $(dbussessionservicedir)/org.freedesktop.systemd1.service
+       $(dbussystemservicedir)/org.freedesktop.systemd1.service $(dbussessionservicedir)/org.freedesktop.systemd1.service
 
 if HAVE_SYSV_COMPAT
 INSTALL_DIRS += \
@@ -4783,6 +5073,11 @@ DISTCHECK_CONFIGURE_FLAGS += \
        --enable-gtk-doc
 endif
 
+# check "broken" platforms limited toolchains for link breakage before we release
+.PHONY: linkcheck
+linkcheck:
+       $(MAKE) CFLAGS='-fno-lto' LDFLAGS='-Wl,-fuse-ld=gold -Wl,--as-needed -Wl,--no-gc-sections' distcheck
+
 .PHONY: hwdb-update
 hwdb-update:
        ( cd $(top_srcdir)/hwdb && \
@@ -4794,16 +5089,18 @@ hwdb-update:
 
 .PHONY: kdbus-update
 kdbus-update:
-       ( cd $(top_srcdir)/src/libsystemd/ && \
+       ( cd $(top_srcdir)/src/libsystemd/sd-bus/ && \
        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/
+.PHONY: git-tag
+git-tag:
+       git tag -s "v$(VERSION)" -m "systemd $(VERSION)"
 
 www_target = www.freedesktop.org:/srv/www.freedesktop.org/www/software/systemd
+.PHONY: upload
+upload: all check dist
+       scp systemd-$(VERSION).tar.xz $(www_target)
+
 .PHONY: doc-sync
 doc-sync: all destdir-sphinx
        gtkdoc-rebase --html-dir=docs/libudev/html --online
@@ -4813,9 +5110,10 @@ 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: tango
+tango: upload
+       cp -v systemd-$(VERSION).tar.xz /home/lennart/git.fedora/systemd/
+       scp man/*.html tango:public/systemd-man/
 
 .PHONY: install-tree
 install-tree: all
@@ -4876,7 +5174,6 @@ EXTRA_DIST += \
        $(top_srcdir)/tools/check-includes.pl
 
 # Stupid test that everything purported to be exported really is
-
 define generate-sym-test
        $(AM_V_at)$(MKDIR_P) $(dir $@)
        $(AM_V_at)printf '#include <stdio.h>\n' > $@
@@ -4894,7 +5191,8 @@ test-libsystemd-sym.c: \
                src/systemd/sd-daemon.h \
                src/systemd/sd-login.h \
                src/systemd/sd-bus.h \
-               src/systemd/sd-utf8.h
+               src/systemd/sd-utf8.h \
+               src/systemd/sd-resolve.h
        $(generate-sym-test)
 
 test-libudev-sym.c: \
@@ -4909,6 +5207,9 @@ test_libsystemd_sym_LDADD = \
 
 test_libudev_sym_SOURCES = \
        test-libudev-sym.c
+test_libudev_sym_CFLAGS = \
+       $(AM_CFLAGS) \
+       -Wno-deprecated-declarations
 test_libudev_sym_LDADD = \
        libudev.la
 
@@ -4981,3 +5282,6 @@ cppcheck:
 # Used to extract compile flags for YCM.
 print-%:
        @echo $($*)
+
+git-contrib:
+       @git shortlog -s `git describe --abbrev=0`.. | cut -c8- | awk '{ print $$0 "," }' | sort -u