chiark / gitweb /
includes: remove duplicate includes
[elogind.git] / Makefile.am
index e6f411c..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,7 +52,7 @@ 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
@@ -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)\" \
@@ -189,7 +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 \
+       -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)
@@ -556,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 = \
@@ -604,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 $<,$^)
 
@@ -635,9 +641,10 @@ EXTRA_DIST += \
        $(HTML_FILES) \
        $(HTML_ALIAS) \
        $(man_MANS) \
-       make-man-index.py \
-       make-directive-index.py \
-       xml_helper.py
+       tools/make-man-index.py \
+       tools/make-directive-index.py \
+       tools/make-man-rules.py \
+       tools/xml_helper.py
 
 # ------------------------------------------------------------------------------
 noinst_LTLIBRARIES += \
@@ -997,7 +1004,6 @@ libsystemd_core_la_LIBADD = \
        libsystemd-capability.la \
        libsystemd-units.la \
        libsystemd-label.la \
-       libsystemd-id128-internal.la \
        libsystemd-daemon-internal.la \
        libudev-internal.la \
        libsystemd-shared.la \
@@ -1121,6 +1127,7 @@ tests += \
        test-utf8 \
        test-ellipsize \
        test-util \
+       test-tmpfiles \
        test-namespace \
        test-date \
        test-sleep \
@@ -1227,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
 
@@ -1371,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 = \
@@ -1392,7 +1405,7 @@ test_install_SOURCES = \
 test_install_LDADD = \
        libsystemd-units.la \
        libsystemd-label.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
        libsystemd-shared.la
 
 test_watchdog_SOURCES = \
@@ -1414,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:
@@ -1456,7 +1469,6 @@ systemd_analyze_SOURCES = \
 
 systemd_analyze_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
@@ -1466,7 +1478,6 @@ systemd_initctl_SOURCES = \
 
 systemd_initctl_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
@@ -1480,7 +1491,6 @@ systemd_update_utmp_CFLAGS = \
 
 systemd_update_utmp_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la \
        $(AUDIT_LIBS)
@@ -1556,7 +1566,7 @@ systemd_tmpfiles_LDADD = \
        libsystemd-units.la \
        libsystemd-label.la \
        libsystemd-capability.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
        libsystemd-shared.la
 
 rootbin_PROGRAMS += \
@@ -1609,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
 
 # ------------------------------------------------------------------------------
@@ -1632,7 +1642,6 @@ systemd_fsck_SOURCES = \
 
 systemd_fsck_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-daemon-internal.la \
        libudev-internal.la \
        libsystemd-shared.la
@@ -1712,7 +1721,7 @@ bootctl_SOURCES = \
 
 bootctl_LDADD = \
        libsystemd-shared.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
        libsystemd-daemon-internal.la
 
 bin_PROGRAMS += \
@@ -1733,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)
@@ -1790,7 +1799,6 @@ systemd_cgroups_agent_SOURCES = \
 
 systemd_cgroups_agent_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
@@ -1802,16 +1810,8 @@ systemctl_LDADD = \
        libsystemd-units.la \
        libsystemd-label.la \
        libsystemd-internal.la \
-       libsystemd-logs.la
-
-if ENABLE_LOGIND
-systemctl_LDADD += \
-       libsystemd-login-internal.la
-endif
-
-systemctl_LDADD += \
+       libsystemd-logs.la \
        libsystemd-journal-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
@@ -1865,7 +1865,6 @@ systemd_nspawn_LDADD = \
        libsystemd-label.la \
        libsystemd-capability.la \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
@@ -1878,7 +1877,6 @@ systemd_run_LDADD = \
        libsystemd-capability.la \
        libsystemd-internal.la \
        libsystemd-daemon-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-shared.la
 
 # ------------------------------------------------------------------------------
@@ -1888,7 +1886,6 @@ systemd_bus_proxyd_SOURCES = \
 systemd_bus_proxyd_LDADD = \
        libsystemd-internal.la \
        libsystemd-daemon-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-shared.la
 
 bus-proxyd-install-hook:
@@ -1982,74 +1979,73 @@ libsystemd_la_SOURCES = \
        src/systemd/sd-memfd.h \
        src/systemd/sd-utf8.h \
        src/systemd/sd-event.h \
-       src/systemd/sd-dhcp-client.h \
        src/systemd/sd-rtnl.h \
        src/systemd/sd-resolve.h \
-       src/libsystemd/sd-bus.c \
-       src/libsystemd/bus-control.c \
-       src/libsystemd/bus-control.h \
-       src/libsystemd/bus-error.c \
-       src/libsystemd/bus-error.h \
-       src/libsystemd/bus-internal.c \
-       src/libsystemd/bus-internal.h \
-       src/libsystemd/bus-socket.c \
-       src/libsystemd/bus-socket.h \
-       src/libsystemd/bus-kernel.c \
-       src/libsystemd/bus-kernel.h \
-       src/libsystemd/bus-container.c \
-       src/libsystemd/bus-container.h \
-       src/libsystemd/bus-message.c \
-       src/libsystemd/bus-message.h \
-       src/libsystemd/bus-creds.c \
-       src/libsystemd/bus-creds.h \
-       src/libsystemd/bus-signature.c \
-       src/libsystemd/bus-signature.h \
-       src/libsystemd/bus-type.c \
-       src/libsystemd/bus-type.h \
-       src/libsystemd/bus-match.c \
-       src/libsystemd/bus-match.h \
-       src/libsystemd/bus-bloom.c \
-       src/libsystemd/bus-bloom.h \
-       src/libsystemd/bus-introspect.c \
-       src/libsystemd/bus-introspect.h \
-       src/libsystemd/bus-objects.c \
-       src/libsystemd/bus-objects.h \
-       src/libsystemd/bus-gvariant.c \
-       src/libsystemd/bus-gvariant.h \
-       src/libsystemd/bus-convenience.c \
-       src/libsystemd/kdbus.h \
-       src/libsystemd/sd-memfd.c \
-       src/libsystemd/bus-util.c \
-       src/libsystemd/bus-util.h \
-       src/libsystemd/sd-utf8.c \
-       src/libsystemd/sd-event.c \
-       src/libsystemd/event-util.h \
-       src/libsystemd/bus-protocol.h \
-       src/libsystemd/sd-dhcp-client.c \
-       src/libsystemd/dhcp-network.c \
-       src/libsystemd/dhcp-option.c \
-       src/libsystemd/dhcp-internal.h \
-       src/libsystemd/dhcp-protocol.h \
-       src/libsystemd/sd-rtnl.c \
-       src/libsystemd/rtnl-internal.h \
-       src/libsystemd/rtnl-message.c \
-       src/libsystemd/rtnl-util.h \
-       src/libsystemd/rtnl-util.c \
-       src/libsystemd/sd-resolve.c \
-       src/libsystemd/resolve-util.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/bus-error-mapping.c
+       src/libsystemd/sd-bus/bus-error-mapping.c
 
 libsystemd_la_LIBADD = \
-       libsystemd-id128-internal.la \
        libsystemd-daemon-internal.la \
-       libsystemd-shared.la
+       libsystemd-shared.la \
+       -lresolv
 
 libsystemd_la_CFLAGS = \
        $(AM_CFLAGS) \
-       -pthread \
-       -lresolv
+       -pthread
 
 libsystemd_la_LDFLAGS = \
        $(AM_LDFLAGS) \
@@ -2059,14 +2055,18 @@ libsystemd_la_LDFLAGS = \
 pkgconfiglib_DATA += \
        src/libsystemd/libsystemd.pc
 
+pkginclude_HEADERS += \
+       src/systemd/sd-login.h \
+       src/systemd/sd-id128.h
+
 EXTRA_DIST += \
-       src/libsystemd/bus-error-mapping.gperf \
-       src/libsystemd/libsystemd.pc.in \
-       src/libsystemd/DIFFERENCES \
-       src/libsystemd/GVARIANT-SERIALIZATION
+       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/bus-error-mapping.c
+       src/libsystemd/sd-bus/bus-error-mapping.c
 
 lib_LTLIBRARIES += \
        libsystemd.la
@@ -2084,8 +2084,8 @@ noinst_LTLIBRARIES += \
        libsystemd-internal.la
 
 libsystemd_dump_la_SOURCES = \
-       src/libsystemd/bus-dump.c \
-       src/libsystemd/bus-dump.h
+       src/libsystemd/sd-bus/bus-dump.c \
+       src/libsystemd/sd-bus/bus-dump.h
 
 libsystemd_dump_la_CFLAGS = \
        $(AM_CFLAGS) \
@@ -2112,8 +2112,6 @@ tests += \
        test-bus-creds \
        test-bus-gvariant \
        test-event \
-       test-dhcp-option \
-       test-dhcp-client \
        test-rtnl \
        test-resolve
 
@@ -2121,11 +2119,10 @@ bin_PROGRAMS += \
        busctl
 
 test_bus_marshal_SOURCES = \
-       src/libsystemd/test-bus-marshal.c
+       src/libsystemd/sd-bus/test-bus-marshal.c
 
 test_bus_marshal_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la \
        libsystemd-dump.la \
@@ -2141,14 +2138,14 @@ test_bus_marshal_CFLAGS = \
        $(CAP_CFLAGS)
 
 test_bus_signature_SOURCES = \
-       src/libsystemd/test-bus-signature.c
+       src/libsystemd/sd-bus/test-bus-signature.c
 
 test_bus_signature_LDADD = \
        libsystemd-shared.la \
        libsystemd-internal.la
 
 test_bus_chat_SOURCES = \
-       src/libsystemd/test-bus-chat.c
+       src/libsystemd/sd-bus/test-bus-chat.c
 
 test_bus_chat_CFLAGS = \
        $(AM_CFLAGS) \
@@ -2156,21 +2153,19 @@ test_bus_chat_CFLAGS = \
 
 test_bus_chat_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
 test_bus_cleanup_SOURCES = \
-       src/libsystemd/test-bus-cleanup.c
+       src/libsystemd/sd-bus/test-bus-cleanup.c
 
 test_bus_cleanup_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
 test_bus_server_SOURCES = \
-       src/libsystemd/test-bus-server.c
+       src/libsystemd/sd-bus/test-bus-server.c
 
 test_bus_server_CFLAGS = \
        $(AM_CFLAGS) \
@@ -2178,12 +2173,11 @@ test_bus_server_CFLAGS = \
 
 test_bus_server_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
 test_bus_objects_SOURCES = \
-       src/libsystemd/test-bus-objects.c
+       src/libsystemd/sd-bus/test-bus-objects.c
 
 test_bus_objects_CFLAGS = \
        $(AM_CFLAGS) \
@@ -2192,7 +2186,6 @@ test_bus_objects_CFLAGS = \
 
 test_bus_objects_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la \
        libsystemd-dump.la \
@@ -2200,20 +2193,18 @@ test_bus_objects_LDADD = \
        $(CAP_LIBS)
 
 test_bus_error_SOURCES = \
-       src/libsystemd/test-bus-error.c
+       src/libsystemd/sd-bus/test-bus-error.c
 
 test_bus_error_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
 test_bus_gvariant_SOURCES = \
-       src/libsystemd/test-bus-gvariant.c
+       src/libsystemd/sd-bus/test-bus-gvariant.c
 
 test_bus_gvariant_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la \
        libsystemd-dump.la \
@@ -2227,31 +2218,28 @@ test_bus_gvariant_CFLAGS = \
        $(CAP_CFLAGS)
 
 test_bus_creds_SOURCES = \
-       src/libsystemd/test-bus-creds.c
+       src/libsystemd/sd-bus/test-bus-creds.c
 
 test_bus_creds_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la \
        libsystemd-dump.la \
        libsystemd-capability.la
 
 test_bus_match_SOURCES = \
-       src/libsystemd/test-bus-match.c
+       src/libsystemd/sd-bus/test-bus-match.c
 
 test_bus_match_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
 test_bus_kernel_SOURCES = \
-       src/libsystemd/test-bus-kernel.c
+       src/libsystemd/sd-bus/test-bus-kernel.c
 
 test_bus_kernel_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la \
        libsystemd-dump.la \
@@ -2263,36 +2251,33 @@ test_bus_kernel_CFLAGS = \
        $(CAP_CFLAGS)
 
 test_bus_kernel_bloom_SOURCES = \
-       src/libsystemd/test-bus-kernel-bloom.c
+       src/libsystemd/sd-bus/test-bus-kernel-bloom.c
 
 test_bus_kernel_bloom_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
 test_bus_kernel_benchmark_SOURCES = \
-       src/libsystemd/test-bus-kernel-benchmark.c
+       src/libsystemd/sd-bus/test-bus-kernel-benchmark.c
 
 test_bus_kernel_benchmark_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
 test_bus_memfd_SOURCES = \
-       src/libsystemd/test-bus-memfd.c
+       src/libsystemd/sd-bus/test-bus-memfd.c
 
 test_bus_memfd_LDADD = \
        libsystemd-internal.la \
        libsystemd-shared.la
 
 test_bus_zero_copy_SOURCES = \
-       src/libsystemd/test-bus-zero-copy.c
+       src/libsystemd/sd-bus/test-bus-zero-copy.c
 
 test_bus_zero_copy_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la \
        libsystemd-dump.la \
@@ -2304,69 +2289,46 @@ test_bus_zero_copy_CFLAGS = \
        $(CAP_CFLAGS)
 
 test_bus_introspect_SOURCES = \
-       src/libsystemd/test-bus-introspect.c
+       src/libsystemd/sd-bus/test-bus-introspect.c
 
 test_bus_introspect_LDADD = \
        libsystemd-shared.la \
        libsystemd-internal.la
 
 test_event_SOURCES = \
-       src/libsystemd/test-event.c
+       src/libsystemd/sd-event/test-event.c
 
 test_event_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
-       libsystemd-daemon-internal.la \
-       libsystemd-shared.la
-
-test_dhcp_option_SOURCES = \
-       src/libsystemd/dhcp-protocol.h \
-       src/libsystemd/dhcp-internal.h \
-       src/libsystemd/test-dhcp-option.c
-
-test_dhcp_option_LDADD = \
-       libsystemd-internal.la \
-       libsystemd-shared.la
-
-test_dhcp_client_SOURCES = \
-       src/systemd/sd-dhcp-client.h \
-       src/libsystemd/dhcp-protocol.h \
-       src/libsystemd/dhcp-internal.h \
-       src/libsystemd/test-dhcp-client.c
-
-test_dhcp_client_LDADD = \
-       libsystemd-internal.la \
        libsystemd-daemon-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-shared.la
 
 test_rtnl_SOURCES = \
-       src/libsystemd/test-rtnl.c
+       src/libsystemd/sd-rtnl/test-rtnl.c
 
 test_rtnl_LDADD = \
        libsystemd-internal.la \
        libsystemd-daemon-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-shared.la
 
 test_resolve_SOURCES = \
        src/systemd/sd-resolve.h \
-       src/libsystemd/test-resolve.c
+       src/libsystemd/sd-resolve/test-resolve.c
 
 test_resolve_LDADD = \
        libsystemd-internal.la \
-       libsystemd-shared.la
+       libsystemd-shared.la \
+       -lresolv
 
 test_resolve_CFLAGS = \
        $(AM_CFLAGS) \
        -pthread
 
 busctl_SOURCES = \
-       src/libsystemd/busctl.c
+       src/libsystemd/sd-bus/busctl.c
 
 busctl_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la \
        libsystemd-dump.la \
@@ -2378,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
@@ -2417,7 +2423,6 @@ libudev_la_LDFLAGS = \
 
 libudev_la_LIBADD = \
        libsystemd-daemon-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-shared.la
 
 pkgconfiglib_DATA += \
@@ -2602,7 +2607,6 @@ libudev_core_la_LIBADD = \
        libsystemd-label.la \
        libsystemd-daemon-internal.la \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-shared.la \
        $(BLKID_LIBS) \
        $(KMOD_LIBS)
@@ -2974,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 += \
@@ -3068,7 +3027,7 @@ journalctl_SOURCES = \
 
 journalctl_LDADD = \
        libsystemd-journal-internal.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
        libsystemd-logs.la \
        libsystemd-shared.la
 
@@ -3198,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 = \
@@ -3253,14 +3212,9 @@ libsystemd_journal_core_la_LIBADD = \
        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
@@ -3409,7 +3363,6 @@ systemd_journal_gatewayd_SOURCES = \
 systemd_journal_gatewayd_LDADD = \
        libsystemd-logs.la \
        libsystemd-journal-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-internal.la \
        libsystemd-shared.la \
@@ -3446,7 +3399,6 @@ systemd_socket_proxyd_LDADD = \
        libsystemd-logs.la \
        libsystemd-internal.la \
        libsystemd-journal-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
@@ -3458,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
@@ -3473,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 += \
@@ -3734,7 +3682,6 @@ systemd_hostnamed_SOURCES = \
 systemd_hostnamed_LDADD = \
        libsystemd-label.la \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
@@ -3767,7 +3714,6 @@ hostnamectl_SOURCES = \
 
 hostnamectl_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
@@ -3795,7 +3741,6 @@ systemd_bus_driverd_SOURCES = \
 
 systemd_bus_driverd_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
@@ -3833,7 +3778,6 @@ systemd_localed_SOURCES = \
 systemd_localed_LDADD = \
        libsystemd-label.la \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
@@ -3868,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-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
@@ -3890,6 +3833,8 @@ dist_zshcompletion_DATA += \
 
 endif
 
+.PHONY: update-kbd-model-map
+
 polkitpolicy_in_files += \
        src/locale/org.freedesktop.locale1.policy.in
 
@@ -3904,7 +3849,6 @@ systemd_timedated_SOURCES = \
 systemd_timedated_LDADD = \
        libsystemd-label.la \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
@@ -3941,7 +3885,6 @@ timedatectl_SOURCES = \
 
 timedatectl_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
@@ -4002,7 +3945,6 @@ libsystemd_machine_core_la_LIBADD = \
        libsystemd-label.la \
        libsystemd-daemon-internal.la \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
        libudev-internal.la \
        libsystemd-shared.la
 
@@ -4014,7 +3956,6 @@ machinectl_SOURCES = \
 
 machinectl_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
@@ -4066,7 +4007,7 @@ systemd_networkd_SOURCES = \
        src/network/networkd.h \
        src/network/networkd.c \
        src/network/networkd-link.c \
-       src/network/networkd-bridge.c \
+       src/network/networkd-netdev.c \
        src/network/networkd-network.c \
        src/network/networkd-address.c \
        src/network/networkd-route.c \
@@ -4079,7 +4020,7 @@ systemd_networkd_LDADD = \
        libudev-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
+       libsystemd-dhcp.la \
        libsystemd-label.la \
        libsystemd-shared.la
 
@@ -4093,7 +4034,7 @@ test_network_SOURCES = \
        src/network/test-network.c \
        src/network/networkd.h \
        src/network/networkd-link.c \
-       src/network/networkd-bridge.c \
+       src/network/networkd-netdev.c \
        src/network/networkd-network.c \
        src/network/networkd-address.c \
        src/network/networkd-route.c \
@@ -4103,7 +4044,7 @@ test_network_SOURCES = \
 test_network_LDADD = \
        libudev-internal.la \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
+       libsystemd-dhcp.la \
        libsystemd-daemon-internal.la \
        libsystemd-label.la \
        libsystemd-shared.la
@@ -4161,7 +4102,6 @@ libsystemd_logind_core_la_LIBADD = \
        libsystemd-label.la \
        libsystemd-capability.la \
        libsystemd-daemon-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-internal.la \
        libudev-internal.la \
        libsystemd-shared.la
@@ -4195,7 +4135,6 @@ loginctl_LDADD = \
        libsystemd-internal.la \
        libudev-internal.la \
        libsystemd-shared.la \
-       libsystemd-id128-internal.la \
        libsystemd-daemon-internal.la
 
 rootbin_PROGRAMS += \
@@ -4213,7 +4152,6 @@ systemd_inhibit_SOURCES = \
 
 systemd_inhibit_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
@@ -4224,14 +4162,14 @@ 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 = \
@@ -4240,7 +4178,6 @@ test_inhibit_SOURCES = \
 test_inhibit_LDADD = \
        libsystemd-internal.la \
        libsystemd-daemon-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-shared.la
 
 test_login_tables_SOURCES = \
@@ -4257,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
@@ -4300,7 +4214,6 @@ pam_systemd_la_LDFLAGS = \
 pam_systemd_la_LIBADD = \
        libsystemd-capability.la \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la \
        $(PAM_LIBS)
@@ -4312,16 +4225,6 @@ 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
@@ -4339,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
 
@@ -4400,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 \
@@ -4453,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 \
@@ -4495,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
 
@@ -4518,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
 
@@ -4554,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/
 
@@ -4563,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)|' \
@@ -4887,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 \
@@ -4895,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/ && \
        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/
@@ -4913,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
@@ -4923,6 +4895,7 @@ 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 \
                if file $$f | grep -q shell; then \
@@ -4938,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 \
@@ -4959,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
@@ -4978,7 +4961,8 @@ endef
 test-libsystemd-sym.c: \
        src/libsystemd/libsystemd.sym \
        src/systemd/sd-bus.h \
-       src/systemd/sd-utf8.h
+       src/systemd/sd-utf8.h \
+       src/systemd/sd-login.h
        $(generate-sym-test)
 
 test-libsystemd-daemon-sym.c: \
@@ -4987,7 +4971,7 @@ test-libsystemd-daemon-sym.c: \
        $(generate-sym-test)
 
 test-libsystemd-id128-sym.c: \
-       src/libsystemd-id128/libsystemd-id128.sym \
+       src/compat-libs/libsystemd-id128.sym \
        src/systemd/sd-id128.h
        $(generate-sym-test)
 
@@ -4997,7 +4981,7 @@ test-libsystemd-journal-sym.c: \
        $(generate-sym-test)
 
 test-libsystemd-login-sym.c: \
-       src/login/libsystemd-login.sym \
+       src/compat-libs/libsystemd-login.sym \
        src/systemd/sd-login.h
        $(generate-sym-test)
 
@@ -5039,19 +5023,26 @@ test_libudev_sym_LDADD = \
 BUILT_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-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)