chiark / gitweb /
libsystemd-id128: restructure Makefile.am
[elogind.git] / Makefile.am
index 4a338145f4eca4915d3c23bc0283009b7b0cc3b4..dea9d2b3cf11b77ba1c1b8f81b4042e9b6ccdc2d 100644 (file)
@@ -156,8 +156,7 @@ rootbin_PROGRAMS = \
        systemd-ask-password \
        systemd-tty-ask-password-agent \
        systemd-tmpfiles \
-       systemd-machine-id-setup \
-       systemd-journalctl
+       systemd-machine-id-setup
 
 bin_PROGRAMS = \
        systemd-cgls \
@@ -194,28 +193,7 @@ rootlibexec_PROGRAMS = \
        systemd-timestamp \
        systemd-ac-power \
        systemd-detect-virt \
-       systemd-sysctl \
-       systemd-journald
-
-if ENABLE_BINFMT
-rootlibexec_PROGRAMS += \
-       systemd-binfmt
-endif
-
-if ENABLE_HOSTNAMED
-rootlibexec_PROGRAMS += \
-       systemd-hostnamed
-endif
-
-if ENABLE_TIMEDATED
-rootlibexec_PROGRAMS += \
-       systemd-timedated
-endif
-
-if ENABLE_LOCALED
-rootlibexec_PROGRAMS += \
-       systemd-localed
-endif
+       systemd-sysctl
 
 systemgenerator_PROGRAMS = \
        systemd-getty-generator
@@ -229,14 +207,10 @@ systemgenerator_PROGRAMS += \
 endif
 
 lib_LTLIBRARIES = \
-       libsystemd-daemon.la \
-       libsystemd-id128.la \
-       libsystemd-journal.la
+       libsystemd-daemon.la
 
 pkginclude_HEADERS = \
-       src/sd-daemon.h \
-       src/sd-id128.h \
-       src/journal/sd-journal.h
+       src/sd-daemon.h
 
 noinst_PROGRAMS = \
        test-engine \
@@ -248,9 +222,7 @@ noinst_PROGRAMS = \
        test-cgroup \
        test-env-replace \
        test-strv \
-       test-install \
-       test-id128 \
-       test-journal
+       test-install
 
 if HAVE_PAM
 pamlib_LTLIBRARIES = \
@@ -264,39 +236,9 @@ dist_pkgsysconf_DATA = \
 dist_dbuspolicy_DATA = \
        src/org.freedesktop.systemd1.conf
 
-if ENABLE_HOSTNAMED
-dist_dbuspolicy_DATA += \
-       src/org.freedesktop.hostname1.conf
-endif
-
-if ENABLE_TIMEDATED
-dist_dbuspolicy_DATA += \
-       src/org.freedesktop.timedate1.conf
-endif
-
-if ENABLE_LOCALED
-dist_dbuspolicy_DATA += \
-       src/org.freedesktop.locale1.conf
-endif
-
 dist_dbussystemservice_DATA = \
        src/org.freedesktop.systemd1.service
 
-if ENABLE_HOSTNAMED
-dist_dbussystemservice_DATA += \
-       src/org.freedesktop.hostname1.service
-endif
-
-if ENABLE_TIMEDATED
-dist_dbussystemservice_DATA += \
-       src/org.freedesktop.timedate1.service
-endif
-
-if ENABLE_LOCALED
-dist_dbussystemservice_DATA += \
-       src/org.freedesktop.locale1.service
-endif
-
 dist_udevrules_DATA = \
        src/71-seat.rules
 
@@ -319,21 +261,6 @@ dbusinterface_DATA = \
        org.freedesktop.systemd1.Swap.xml \
        org.freedesktop.systemd1.Path.xml
 
-if ENABLE_HOSTNAMED
-dbusinterface_DATA += \
-       org.freedesktop.hostname1.xml
-endif
-
-if ENABLE_TIMEDATED
-dbusinterface_DATA += \
-       org.freedesktop.timedate1.xml
-endif
-
-if ENABLE_LOCALED
-dbusinterface_DATA += \
-       org.freedesktop.locale1.xml
-endif
-
 dist_bashcompletion_DATA = \
        src/systemd-bash-completion.sh
 
@@ -399,20 +326,13 @@ dist_systemunit_DATA = \
        units/quotaon.service \
        units/systemd-ask-password-wall.path \
        units/systemd-ask-password-console.path \
-       units/syslog.target \
-       units/systemd-journald.socket
+       units/syslog.target
 
 if HAVE_SYSV_COMPAT
 dist_systemunit_DATA += \
        units/var-lock.mount
 endif
 
-if ENABLE_BINFMT
-dist_systemunit_DATA += \
-       units/proc-sys-fs-binfmt_misc.automount \
-       units/proc-sys-fs-binfmt_misc.mount
-endif
-
 nodist_systemunit_DATA = \
        units/getty@.service \
        units/serial-getty@.service \
@@ -420,7 +340,6 @@ nodist_systemunit_DATA = \
        units/systemd-initctl.service \
        units/systemd-stdout-syslog-bridge.service \
        units/systemd-shutdownd.service \
-       units/systemd-journald.service \
        units/systemd-kmsg-syslogd.service \
        units/systemd-modules-load.service \
        units/systemd-vconsole-setup.service \
@@ -448,26 +367,6 @@ nodist_systemunit_DATA = \
        units/rescue.service \
        units/user@.service
 
-if ENABLE_BINFMT
-nodist_systemunit_DATA += \
-       units/systemd-binfmt.service
-endif
-
-if ENABLE_HOSTNAMED
-nodist_systemunit_DATA += \
-       units/systemd-hostnamed.service
-endif
-
-if ENABLE_TIMEDATED
-nodist_systemunit_DATA += \
-       units/systemd-timedated.service
-endif
-
-if ENABLE_LOCALED
-nodist_systemunit_DATA += \
-       units/systemd-localed.service
-endif
-
 dist_userunit_DATA = \
        units/user/default.target \
        units/user/exit.target
@@ -483,7 +382,6 @@ EXTRA_DIST += \
        units/systemd-initctl.service.in \
        units/systemd-stdout-syslog-bridge.service.in \
        units/systemd-shutdownd.service.in \
-       units/systemd-journald.service.in \
        units/systemd-kmsg-syslogd.service.in \
        units/systemd-modules-load.service.in \
        units/systemd-vconsole-setup.service.in \
@@ -512,36 +410,12 @@ EXTRA_DIST += \
        units/user@.service.in \
        systemd.pc.in \
        libsystemd-daemon.pc.in \
-       libsystemd-id128.pc.in \
-       libsystemd-journal.pc.in \
        src/libsystemd-daemon.sym \
-       src/libsystemd-id128.sym \
-       src/journal/libsystemd-journal.sym \
        introspect.awk \
        src/73-seat-late.rules.in \
        src/99-systemd.rules.in \
        man/custom-html.xsl
 
-if ENABLE_BINFMT
-EXTRA_DIST += \
-       units/systemd-binfmt.service.in
-endif
-
-if ENABLE_HOSTNAMED
-EXTRA_DIST += \
-       units/systemd-hostnamed.service.in
-endif
-
-if ENABLE_TIMEDATED
-EXTRA_DIST += \
-       units/systemd-timedated.service.in
-endif
-
-if ENABLE_LOCALED
-EXTRA_DIST += \
-       units/systemd-localed.service.in
-endif
-
 if TARGET_FEDORA
 dist_systemunit_DATA += \
        units/fedora/prefdm.service \
@@ -614,24 +488,7 @@ pkgconfigdata_DATA = \
        systemd.pc
 
 pkgconfiglib_DATA = \
-       libsystemd-daemon.pc \
-       libsystemd-id128.pc \
-       libsystemd-journal.pc
-
-if ENABLE_HOSTNAMED
-polkitpolicy_in_files += \
-       src/org.freedesktop.hostname1.policy.in
-endif
-
-if ENABLE_TIMEDATED
-polkitpolicy_in_files += \
-       src/org.freedesktop.timedate1.policy.in
-endif
-
-if ENABLE_LOCALED
-polkitpolicy_in_files += \
-       src/org.freedesktop.locale1.policy.in
-endif
+       libsystemd-daemon.pc
 
 # First passed through sed, followed by intltool
 polkitpolicy_in_in_files = \
@@ -783,12 +640,6 @@ EXTRA_DIST += \
        src/polkit.h \
        src/dbus-loop.h \
        src/spawn-agent.h \
-       src/journal/journal-def.h \
-       src/journal/journal-internal.h \
-       src/journal/journal-file.h \
-       src/journal/lookup3.h \
-       src/journal/compress.h \
-       src/journal/journal-rate-limit.h \
        src/acl-util.h
 
 MANPAGES = \
@@ -842,11 +693,6 @@ MANPAGES = \
        man/sd_seat_get_active.3 \
        man/sd_get_seats.3
 
-if ENABLE_BINFMT
-MANPAGES += \
-       man/binfmt.d.5
-endif
-
 MANPAGES_ALIAS = \
        man/reboot.8 \
        man/poweroff.8 \
@@ -1003,6 +849,85 @@ test_install_CFLAGS = \
 test_install_LDADD = \
        libsystemd-basic.la
 
+systemd_stdout_syslog_bridge_SOURCES = \
+       src/stdout-syslog-bridge.c \
+       src/tcpwrap.c
+
+systemd_stdout_syslog_bridge_LDADD = \
+       libsystemd-basic.la \
+       libsystemd-daemon.la \
+       $(LIBWRAP_LIBS)
+
+systemd_initctl_SOURCES = \
+       src/initctl.c \
+       src/dbus-common.c
+
+systemd_initctl_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(DBUS_CFLAGS)
+
+systemd_initctl_LDADD = \
+       libsystemd-basic.la \
+       libsystemd-daemon.la \
+       $(DBUS_LIBS)
+
+systemd_update_utmp_SOURCES = \
+       src/update-utmp.c \
+       src/dbus-common.c \
+       src/utmp-wtmp.c
+
+systemd_update_utmp_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(DBUS_CFLAGS) \
+       $(AUDIT_CFLAGS)
+
+systemd_update_utmp_LDADD = \
+       libsystemd-basic.la \
+       $(DBUS_LIBS) \
+       $(AUDIT_LIBS)
+
+systemd_random_seed_SOURCES = \
+       src/random-seed.c
+
+systemd_random_seed_CFLAGS = \
+       $(AM_CFLAGS)
+
+systemd_random_seed_LDADD = \
+       libsystemd-basic.la
+
+systemd_shutdownd_SOURCES = \
+       src/utmp-wtmp.c \
+       src/shutdownd.c
+
+systemd_shutdownd_CFLAGS = \
+       $(AM_CFLAGS)
+
+systemd_shutdownd_LDADD = \
+       libsystemd-basic.la \
+       libsystemd-daemon.la
+
+dist_pkgdata_DATA = \
+       src/kbd-model-map
+
+dist_noinst_SCRIPT = \
+       src/generate-kbd-model-map
+
+# ------------------------------------------------------------------------------
+libsystemd_id128_la_SOURCES = \
+       src/sd-id128.c
+
+libsystemd_id128_la_CFLAGS = \
+       $(AM_CFLAGS) \
+       -fvisibility=hidden
+
+libsystemd_id128_la_LDFLAGS = \
+       -shared \
+       -version-info $(LIBSYSTEMD_ID128_CURRENT):$(LIBSYSTEMD_ID128_REVISION):$(LIBSYSTEMD_ID128_AGE) \
+       -Wl,--version-script=$(top_srcdir)/src/libsystemd-id128.sym
+
+libsystemd_id128_la_LIBADD = \
+       libsystemd-basic.la
+
 test_id128_SOURCES = \
        src/test-id128.c \
        src/sd-id128.c
@@ -1013,29 +938,42 @@ test_id128_CFLAGS = \
 test_id128_LDADD = \
        libsystemd-basic.la
 
-test_journal_SOURCES = \
-       src/journal/test-journal.c \
-       src/journal/sd-journal.c \
-       src/journal/journal-file.c \
-       src/journal/lookup3.c \
-       src/journal/journal-send.c \
-       src/sd-id128.c
+noinst_PROGRAMS += \
+       test-id128
 
-test_journal_CFLAGS = \
-       $(AM_CFLAGS)
+pkginclude_HEADERS += \
+       src/sd-id128.h
 
-test_journal_LDADD = \
-       libsystemd-basic.la
+lib_LTLIBRARIES += \
+       libsystemd-id128.la
 
-if HAVE_XZ
-test_journal_SOURCES += \
-       src/journal/compress.c
-test_journal_CFLAGS += \
-       $(XZ_CFLAGS)
-test_journal_LDADD += \
-       $(XZ_LIBS)
-endif
+pkgconfiglib_DATA += \
+       libsystemd-id128.pc
+
+# move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
+libsystemd-id128-install-hook:
+       if test "$(libdir)" != "$(rootlibdir)"; then \
+               mkdir -p $(DESTDIR)$(rootlibdir) && \
+               so_img_name=$$(readlink $(DESTDIR)$(libdir)/libsystemd-id128.so) && \
+               so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
+               ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/libsystemd-id128.so && \
+               mv $(DESTDIR)$(libdir)/libsystemd-id128.so.* $(DESTDIR)$(rootlibdir); \
+       fi
+
+INSTALL_EXEC_HOOKS += \
+       libsystemd-id128-install-hook
+
+libsystemd-id128-uninstall-hook:
+       rm -f $(DESTDIR)$(rootlibdir)/libsystemd-id128.so*
+
+UNINSTALL_EXEC_HOOKS += \
+       libsystemd-id128-uninstall-hook
 
+EXTRA_DIST += \
+       libsystemd-id128.pc.in \
+       src/libsystemd-id128.sym
+
+# ------------------------------------------------------------------------------
 systemd_journald_SOURCES = \
        src/journal/journald.c \
        src/journal/sd-journal.c \
@@ -1087,65 +1025,154 @@ systemd_journalctl_LDADD += \
        $(XZ_LIBS)
 endif
 
-systemd_stdout_syslog_bridge_SOURCES = \
-       src/stdout-syslog-bridge.c \
-       src/tcpwrap.c
+test_journal_SOURCES = \
+       src/journal/test-journal.c \
+       src/journal/sd-journal.c \
+       src/journal/journal-file.c \
+       src/journal/lookup3.c \
+       src/journal/journal-send.c \
+       src/sd-id128.c
 
-systemd_stdout_syslog_bridge_LDADD = \
-       libsystemd-basic.la \
-       libsystemd-daemon.la \
-       $(LIBWRAP_LIBS)
+test_journal_LDADD = \
+       libsystemd-basic.la
 
-systemd_initctl_SOURCES = \
-       src/initctl.c \
-       src/dbus-common.c
+if HAVE_XZ
+test_journal_SOURCES += \
+       src/journal/compress.c
 
-systemd_initctl_CFLAGS = \
+test_journal_CFLAGS = \
+       $(XZ_CFLAGS)
+
+test_journal_LDADD += \
+       $(XZ_LIBS)
+endif
+
+libsystemd_journal_la_SOURCES = \
+       src/journal/sd-journal.c \
+       src/journal/journal-file.c \
+       src/journal/compress.c \
+       src/journal/lookup3.c \
+       src/journal/journal-send.c
+
+libsystemd_journal_la_CFLAGS = \
        $(AM_CFLAGS) \
-       $(DBUS_CFLAGS)
+       $(XZ_CFLAGS) \
+       -fvisibility=hidden
 
-systemd_initctl_LDADD = \
+libsystemd_journal_la_LDFLAGS = \
+       -shared \
+       -version-info $(LIBSYSTEMD_JOURNAL_CURRENT):$(LIBSYSTEMD_JOURNAL_REVISION):$(LIBSYSTEMD_JOURNAL_AGE) \
+       -Wl,--version-script=$(top_srcdir)/src/journal/libsystemd-journal.sym
+
+libsystemd_journal_la_LIBADD = \
        libsystemd-basic.la \
-       libsystemd-daemon.la \
-       $(DBUS_LIBS)
+       libsystemd-id128.la \
+       $(XZ_LIBS)
 
-systemd_update_utmp_SOURCES = \
-       src/update-utmp.c \
-       src/dbus-common.c \
-       src/utmp-wtmp.c
+# move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
+libsystemd-journal-install-hook:
+       if test "$(libdir)" != "$(rootlibdir)"; then \
+               mkdir -p $(DESTDIR)$(rootlibdir) && \
+               so_img_name=$$(readlink $(DESTDIR)$(libdir)/libsystemd-journal.so) && \
+               so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
+               ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/libsystemd-journal.so && \
+               mv $(DESTDIR)$(libdir)/libsystemd-journal.so.* $(DESTDIR)$(rootlibdir); \
+       fi
+
+INSTALL_EXEC_HOOKS += \
+       libsystemd-journal-install-hook
+
+libsystemd-journal-uninstall-hook:
+       rm -f $(DESTDIR)$(rootlibdir)/libsystemd-journal.so*
+
+UNINSTALL_EXEC_HOOKS += \
+       libsystemd-journal-uninstall-hook
+
+noinst_PROGRAMS += \
+       test-journal
+
+pkginclude_HEADERS += \
+       src/journal/sd-journal.h
+
+lib_LTLIBRARIES += \
+       libsystemd-journal.la
+
+rootlibexec_PROGRAMS += \
+       systemd-journald
+
+rootbin_PROGRAMS += \
+       systemd-journalctl
+
+dist_systemunit_DATA += \
+       units/systemd-journald.socket
+
+nodist_systemunit_DATA += \
+       units/systemd-journald.service
+
+pkgconfiglib_DATA += \
+       src/journal/libsystemd-journal.pc
+
+journal-install-data-hook:
+       ( cd $(DESTDIR)$(systemunitdir)/sockets.target.wants && \
+               rm -f systemd-journald.socket && \
+               $(LN_S) ../systemd-journald.socket )
+
+INSTALL_DATA_HOOKS += \
+       journal-install-data-hook
+
+EXTRA_DIST += \
+       src/journal/journal-def.h \
+       src/journal/journal-internal.h \
+       src/journal/journal-file.h \
+       src/journal/lookup3.h \
+       src/journal/compress.h \
+       src/journal/journal-rate-limit.h \
+       src/journal/libsystemd-journal.pc.in \
+       src/journal/libsystemd-journal.sym \
+       units/systemd-journald.service.in
+
+# ------------------------------------------------------------------------------
+if ENABLE_BINFMT
+systemd_binfmt_SOURCES = \
+       src/binfmt/binfmt.c
 
-systemd_update_utmp_CFLAGS = \
-       $(AM_CFLAGS) \
-       $(DBUS_CFLAGS) \
-       $(AUDIT_CFLAGS)
+systemd_binfmt_LDADD = \
+       libsystemd-basic.la
 
-systemd_update_utmp_LDADD = \
-       libsystemd-basic.la \
-       $(DBUS_LIBS) \
-       $(AUDIT_LIBS)
+rootlibexec_PROGRAMS += \
+       systemd-binfmt
 
-systemd_random_seed_SOURCES = \
-       src/random-seed.c
+dist_systemunit_DATA += \
+       units/proc-sys-fs-binfmt_misc.automount \
+       units/proc-sys-fs-binfmt_misc.mount
 
-systemd_random_seed_CFLAGS = \
-       $(AM_CFLAGS)
+nodist_systemunit_DATA += \
+       units/systemd-binfmt.service
 
-systemd_random_seed_LDADD = \
-       libsystemd-basic.la
+binfmt-install-data-hook:
+       $(MKDIR_P) -m 0755 \
+               $(DESTDIR)$(prefix)/lib/binfmt.d \
+               $(DESTDIR)$(sysconfdir)/binfmt.d
+       ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
+               rm -f systemd-binfmt.service \
+                       proc-sys-fs-binfmt_misc.automount && \
+               $(LN_S) ../systemd-binfmt.service systemd-binfmt.service && \
+               $(LN_S) ../proc-sys-fs-binfmt_misc.automount proc-sys-fs-binfmt_misc.automount )
 
-systemd_shutdownd_SOURCES = \
-       src/utmp-wtmp.c \
-       src/shutdownd.c
+INSTALL_DATA_HOOKS += \
+       binfmt-install-data-hook
 
-systemd_shutdownd_CFLAGS = \
-       $(AM_CFLAGS)
+MANPAGES += \
+       man/binfmt.d.5
 
-systemd_shutdownd_LDADD = \
-       libsystemd-basic.la \
-       libsystemd-daemon.la
+EXTRA_DIST += \
+       units/systemd-binfmt.service.in
+endif
 
+# ------------------------------------------------------------------------------
+if ENABLE_HOSTNAMED
 systemd_hostnamed_SOURCES = \
-       src/hostnamed.c \
+       src/hostname/hostnamed.c \
        src/dbus-common.c \
        src/polkit.c
 
@@ -1158,8 +1185,45 @@ systemd_hostnamed_LDADD = \
        libsystemd-daemon.la \
        $(DBUS_LIBS)
 
+rootlibexec_PROGRAMS += \
+       systemd-hostnamed
+
+nodist_systemunit_DATA += \
+       units/systemd-hostnamed.service
+
+dist_dbuspolicy_DATA += \
+       src/hostname/org.freedesktop.hostname1.conf
+
+dist_dbussystemservice_DATA += \
+       src/hostname/org.freedesktop.hostname1.service
+
+polkitpolicy_in_files += \
+       src/hostname/org.freedesktop.hostname1.policy.in
+
+dbusinterface_DATA += \
+       org.freedesktop.hostname1.xml
+
+org.freedesktop.hostname1.xml: systemd-hostnamed
+       $(AM_V_GEN)$(LIBTOOL) --mode=execute $(OBJCOPY) -O binary -j introspect.hostname1 $< $@.tmp && \
+               $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
+               $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
+
+hostnamed-install-data-hook:
+       ( cd $(DESTDIR)$(systemunitdir) && \
+               rm -f dbus-org.freedesktop.hostname1.service && \
+               $(LN_S) systemd-hostnamed.service dbus-org.freedesktop.hostname1.service )
+
+INSTALL_DATA_HOOKS += \
+       hostnamed-install-data-hook
+
+EXTRA_DIST += \
+       units/systemd-hostnamed.service.in
+endif
+
+# ------------------------------------------------------------------------------
+if ENABLE_LOCALED
 systemd_localed_SOURCES = \
-       src/localed.c \
+       src/locale/localed.c \
        src/dbus-common.c \
        src/polkit.c
 
@@ -1172,14 +1236,45 @@ systemd_localed_LDADD = \
        libsystemd-daemon.la \
        $(DBUS_LIBS)
 
-dist_pkgdata_DATA = \
-       src/kbd-model-map
+nodist_systemunit_DATA += \
+       units/systemd-localed.service
 
-dist_noinst_SCRIPT = \
-       src/generate-kbd-model-map
+rootlibexec_PROGRAMS += \
+       systemd-localed
+
+dist_dbuspolicy_DATA += \
+       src/locale/org.freedesktop.locale1.conf
+
+dist_dbussystemservice_DATA += \
+       src/locale/org.freedesktop.locale1.service
+
+polkitpolicy_in_files += \
+       src/locale/org.freedesktop.locale1.policy.in
+
+dbusinterface_DATA += \
+       org.freedesktop.locale1.xml
 
+org.freedesktop.locale1.xml: systemd-localed
+       $(AM_V_GEN)$(LIBTOOL) --mode=execute $(OBJCOPY) -O binary -j introspect.locale1 $< $@.tmp && \
+               $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
+               $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
+
+localed-install-data-hook:
+       ( cd $(DESTDIR)$(systemunitdir) && \
+               rm -f dbus-org.freedesktop.locale1.service && \
+               $(LN_S) systemd-localed.service dbus-org.freedesktop.locale1.service )
+
+INSTALL_DATA_HOOKS += \
+       localed-install-data-hook
+
+EXTRA_DIST += \
+       units/systemd-localed.service.in
+endif
+
+# ------------------------------------------------------------------------------
+if ENABLE_TIMEDATED
 systemd_timedated_SOURCES = \
-       src/timedated.c \
+       src/timedate/timedated.c \
        src/dbus-common.c \
        src/polkit.c
 
@@ -1192,6 +1287,41 @@ systemd_timedated_LDADD = \
        libsystemd-daemon.la \
        $(DBUS_LIBS)
 
+rootlibexec_PROGRAMS += \
+       systemd-timedated
+
+dist_dbussystemservice_DATA += \
+       src/timedate/org.freedesktop.timedate1.service
+
+dist_dbuspolicy_DATA += \
+       src/timedate/org.freedesktop.timedate1.conf
+
+nodist_systemunit_DATA += \
+       units/systemd-timedated.service
+
+polkitpolicy_in_files += \
+       src/timedate/org.freedesktop.timedate1.policy.in
+
+org.freedesktop.timedate1.xml: systemd-timedated
+       $(AM_V_GEN)$(LIBTOOL) --mode=execute $(OBJCOPY) -O binary -j introspect.timedate1 $< $@.tmp && \
+               $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
+               $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
+
+dbusinterface_DATA += \
+       org.freedesktop.timedate1.xml
+
+timedated-install-data-hook:
+       ( cd $(DESTDIR)$(systemunitdir) && \
+               rm -f dbus-org.freedesktop.timedate1.service  && \
+               $(LN_S) systemd-timedated.service dbus-org.freedesktop.timedate1.service )
+
+INSTALL_DATA_HOOKS += \
+       timedated-install-data-hook
+
+EXTRA_DIST += \
+       units/systemd-timedated.service.in
+endif
+
 # ------------------------------------------------------------------------------
 if ENABLE_LOGIND
 systemd_logind_SOURCES = \
@@ -1328,7 +1458,7 @@ pkgconfiglib_DATA += \
 polkitpolicy_in_files += \
        src/login/org.freedesktop.login1.policy.in
 
-logind-install-data:
+logind-install-data-hook:
        ( cd $(DESTDIR)$(systemunitdir) && \
                rm -f dbus-org.freedesktop.login1.service && \
                $(LN_S) systemd-logind.service dbus-org.freedesktop.login1.service)
@@ -1337,7 +1467,7 @@ logind-install-data:
                $(LN_S) ../systemd-logind.service systemd-logind.service )
 
 INSTALL_DATA_HOOKS += \
-       logind-install-data
+       logind-install-data-hook
 
 systemd_uaccess_SOURCES = \
        src/login/uaccess.c
@@ -1449,15 +1579,6 @@ systemd_sysctl_CFLAGS = \
 systemd_sysctl_LDADD = \
        libsystemd-basic.la
 
-systemd_binfmt_SOURCES = \
-       src/binfmt.c
-
-systemd_binfmt_CFLAGS = \
-       $(AM_CFLAGS)
-
-systemd_binfmt_LDADD = \
-       libsystemd-basic.la
-
 systemd_fsck_SOURCES = \
        src/fsck.c \
        src/dbus-common.c
@@ -1811,69 +1932,6 @@ libsystemd-daemon-install-hook:
 libsystemd-daemon-uninstall-hook:
        rm -f $(DESTDIR)$(rootlibdir)/libsystemd-daemon.so*
 
-libsystemd_id128_la_SOURCES = \
-       src/sd-id128.c
-
-libsystemd_id128_la_CFLAGS = \
-       $(AM_CFLAGS) \
-       -fvisibility=hidden
-
-libsystemd_id128_la_LDFLAGS = \
-       -shared \
-       -version-info $(LIBSYSTEMD_ID128_CURRENT):$(LIBSYSTEMD_ID128_REVISION):$(LIBSYSTEMD_ID128_AGE) \
-       -Wl,--version-script=$(top_srcdir)/src/libsystemd-id128.sym
-
-libsystemd_id128_la_LIBADD = \
-       libsystemd-basic.la
-
-# move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
-libsystemd-id128-install-hook:
-       if test "$(libdir)" != "$(rootlibdir)"; then \
-               mkdir -p $(DESTDIR)$(rootlibdir) && \
-               so_img_name=$$(readlink $(DESTDIR)$(libdir)/libsystemd-id128.so) && \
-               so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
-               ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/libsystemd-id128.so && \
-               mv $(DESTDIR)$(libdir)/libsystemd-id128.so.* $(DESTDIR)$(rootlibdir); \
-       fi
-
-libsystemd-id128-uninstall-hook:
-       rm -f $(DESTDIR)$(rootlibdir)/libsystemd-id128.so*
-
-libsystemd_journal_la_SOURCES = \
-       src/journal/sd-journal.c \
-       src/journal/journal-file.c \
-       src/journal/compress.c \
-       src/journal/lookup3.c \
-       src/journal/journal-send.c
-
-libsystemd_journal_la_CFLAGS = \
-       $(AM_CFLAGS) \
-       $(XZ_CFLAGS) \
-       -fvisibility=hidden
-
-libsystemd_journal_la_LDFLAGS = \
-       -shared \
-       -version-info $(LIBSYSTEMD_JOURNAL_CURRENT):$(LIBSYSTEMD_JOURNAL_REVISION):$(LIBSYSTEMD_JOURNAL_AGE) \
-       -Wl,--version-script=$(top_srcdir)/src/journal/libsystemd-journal.sym
-
-libsystemd_journal_la_LIBADD = \
-       libsystemd-basic.la \
-       libsystemd-id128.la \
-       $(XZ_LIBS)
-
-# move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
-libsystemd-journal-install-hook:
-       if test "$(libdir)" != "$(rootlibdir)"; then \
-               mkdir -p $(DESTDIR)$(rootlibdir) && \
-               so_img_name=$$(readlink $(DESTDIR)$(libdir)/libsystemd-journal.so) && \
-               so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
-               ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/libsystemd-journal.so && \
-               mv $(DESTDIR)$(libdir)/libsystemd-journal.so.* $(DESTDIR)$(rootlibdir); \
-       fi
-
-libsystemd-journal-uninstall-hook:
-       rm -f $(DESTDIR)$(rootlibdir)/libsystemd-journal.so*
-
 SED_PROCESS = \
        $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
        $(SED)  -e 's,@rootlibexecdir\@,$(rootlibexecdir),g' \
@@ -2028,21 +2086,6 @@ org.freedesktop.systemd1.%.xml: systemd
                $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
                $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
 
-org.freedesktop.hostname1.xml: systemd-hostnamed
-       $(AM_V_GEN)$(LIBTOOL) --mode=execute $(OBJCOPY) -O binary -j introspect.hostname1 $< $@.tmp && \
-               $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
-               $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
-
-org.freedesktop.locale1.xml: systemd-localed
-       $(AM_V_GEN)$(LIBTOOL) --mode=execute $(OBJCOPY) -O binary -j introspect.locale1 $< $@.tmp && \
-               $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
-               $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
-
-org.freedesktop.timedate1.xml: systemd-timedated
-       $(AM_V_GEN)$(LIBTOOL) --mode=execute $(OBJCOPY) -O binary -j introspect.timedate1 $< $@.tmp && \
-               $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
-               $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
-
 CLEANFILES += \
        $(dbusinterface_DATA)
 
@@ -2057,11 +2100,6 @@ systemd-install-data-hook:
                $(DESTDIR)$(systemshutdowndir) \
                $(DESTDIR)$(systemgeneratordir) \
                $(DESTDIR)$(usergeneratordir)
-if ENABLE_BINFMT
-       $(MKDIR_P) -m 0755 \
-               $(DESTDIR)$(prefix)/lib/binfmt.d \
-               $(DESTDIR)$(sysconfdir)/binfmt.d
-endif
        $(MKDIR_P) -m 0755 \
                $(DESTDIR)$(systemunitdir) \
                $(DESTDIR)$(userunitdir) \
@@ -2089,12 +2127,11 @@ endif
                rm -f user && \
                $(LN_S) $(pkgsysconfdir)/user user )
        ( cd $(DESTDIR)$(systemunitdir)/sockets.target.wants && \
-               rm -f systemd-initctl.socket systemd-stdout-syslog-bridge.socket systemd-shutdownd.socket syslog.socket systemd-journald.socket && \
+               rm -f systemd-initctl.socket systemd-stdout-syslog-bridge.socket systemd-shutdownd.socket syslog.socket && \
                $(LN_S) ../systemd-stdout-syslog-bridge.socket systemd-stdout-syslog-bridge.socket && \
                $(LN_S) ../systemd-initctl.socket systemd-initctl.socket && \
                $(LN_S) ../systemd-shutdownd.socket systemd-shutdownd.socket && \
-               $(LN_S) ../syslog.socket syslog.socket && \
-               $(LN_S) ../systemd-journald.socket )
+               $(LN_S) ../syslog.socket syslog.socket )
        ( cd $(DESTDIR)$(systemunitdir)/runlevel1.target.wants && \
                rm -f systemd-update-utmp-runlevel.service && \
                $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
@@ -2187,28 +2224,6 @@ endif
                $(LN_S) ../systemd-ask-password-console.path systemd-ask-password-console.path && \
                $(LN_S) ../systemd-kmsg-syslogd.service && \
                $(LN_S) ../cryptsetup.target cryptsetup.target )
-if ENABLE_BINFMT
-       ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
-               rm -f systemd-binfmt.service \
-                       proc-sys-fs-binfmt_misc.automount && \
-               $(LN_S) ../systemd-binfmt.service systemd-binfmt.service && \
-               $(LN_S) ../proc-sys-fs-binfmt_misc.automount proc-sys-fs-binfmt_misc.automount )
-endif
-if ENABLE_HOSTNAMED
-       ( cd $(DESTDIR)$(systemunitdir) && \
-               rm -f dbus-org.freedesktop.hostname1.service && \
-               $(LN_S) systemd-hostnamed.service dbus-org.freedesktop.hostname1.service )
-endif
-if ENABLE_TIMEDATED
-       ( cd $(DESTDIR)$(systemunitdir) && \
-               rm -f dbus-org.freedesktop.timedate1.service  && \
-               $(LN_S) systemd-timedated.service dbus-org.freedesktop.timedate1.service )
-endif
-if ENABLE_LOCALED
-       ( cd $(DESTDIR)$(systemunitdir) && \
-               rm -f dbus-org.freedesktop.locale1.service && \
-               $(LN_S) systemd-localed.service dbus-org.freedesktop.locale1.service )
-endif
        ( cd $(DESTDIR)$(systemunitdir)/basic.target.wants && \
                rm -f systemd-tmpfiles-clean.timer && \
                $(LN_S) ../systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.timer )