chiark / gitweb /
bootchart: rename log.c to store.c to aovid confusion with src/shared/log.c
[elogind.git] / Makefile.am
index 9da3394c78308118e2bbbee9b91fe15ee6e1ee25..f0fe5872cd0be402aab12a5b56f67789bc07d36c 100644 (file)
@@ -32,16 +32,16 @@ SUBDIRS = . po
 .SECONDARY:
 
 LIBUDEV_CURRENT=3
-LIBUDEV_REVISION=1
+LIBUDEV_REVISION=2
 LIBUDEV_AGE=2
 
 LIBGUDEV_CURRENT=1
 LIBGUDEV_REVISION=3
 LIBGUDEV_AGE=1
 
-LIBSYSTEMD_LOGIN_CURRENT=3
-LIBSYSTEMD_LOGIN_REVISION=11
-LIBSYSTEMD_LOGIN_AGE=3
+LIBSYSTEMD_LOGIN_CURRENT=4
+LIBSYSTEMD_LOGIN_REVISION=0
+LIBSYSTEMD_LOGIN_AGE=4
 
 LIBSYSTEMD_DAEMON_CURRENT=0
 LIBSYSTEMD_DAEMON_REVISION=7
@@ -51,9 +51,9 @@ LIBSYSTEMD_ID128_CURRENT=0
 LIBSYSTEMD_ID128_REVISION=17
 LIBSYSTEMD_ID128_AGE=0
 
-LIBSYSTEMD_JOURNAL_CURRENT=7
-LIBSYSTEMD_JOURNAL_REVISION=1
-LIBSYSTEMD_JOURNAL_AGE=7
+LIBSYSTEMD_JOURNAL_CURRENT=8
+LIBSYSTEMD_JOURNAL_REVISION=0
+LIBSYSTEMD_JOURNAL_AGE=8
 
 # Dirs of external packages
 dbuspolicydir=@dbuspolicydir@
@@ -64,7 +64,7 @@ pamlibdir=@pamlibdir@
 pkgconfigdatadir=$(datadir)/pkgconfig
 pkgconfiglibdir=$(libdir)/pkgconfig
 polkitpolicydir=$(datadir)/polkit-1/actions
-bashcompletiondir=$(sysconfdir)/bash_completion.d
+bashcompletiondir=@bashcompletiondir@
 rpmmacrosdir=$(sysconfdir)/rpm
 sysvinitdir=$(SYSTEM_SYSVINIT_PATH)
 sysvrcnddir=$(SYSTEM_SYSVRCND_PATH)
@@ -104,16 +104,18 @@ UNINSTALL_EXEC_HOOKS =
 INSTALL_DATA_HOOKS =
 UNINSTALL_DATA_HOOKS =
 DISTCLEAN_LOCAL_HOOKS =
+CLEAN_LOCAL_HOOKS =
 pkginclude_HEADERS =
 noinst_LTLIBRARIES =
 lib_LTLIBRARIES =
 include_HEADERS =
+noinst_DATA =
 pkgconfiglib_DATA =
+polkitpolicy_in_in_files =
 polkitpolicy_in_files =
 polkitpolicy_files =
 dist_udevrules_DATA =
 nodist_udevrules_DATA =
-dist_man_MANS =
 dist_pkgsysconf_DATA =
 dist_pkgdata_DATA =
 dist_dbuspolicy_DATA =
@@ -259,6 +261,10 @@ AM_V_GPERF = $(AM_V_GPERF_$(V))
 AM_V_GPERF_ = $(AM_V_GPERF_$(AM_DEFAULT_VERBOSITY))
 AM_V_GPERF_0 = @echo "  GPERF   " $@;
 
+AM_V_LN = $(AM_V_LN_$(V))
+AM_V_LN_ = $(AM_V_LN_$(AM_DEFAULT_VERBOSITY))
+AM_V_LN_0 = @echo "  LN      " $@;
+
 # ------------------------------------------------------------------------------
 rootbin_PROGRAMS = \
        systemctl \
@@ -274,7 +280,14 @@ bin_PROGRAMS = \
        systemd-stdio-bridge \
        systemd-nspawn \
        systemd-detect-virt \
-       systemd-delta
+       systemd-delta \
+       systemd-analyze
+
+bin_SCRIPTS = \
+       src/kernel-install/kernel-install
+
+EXTRA_DIST += \
+       src/kernel-install/kernel-install
 
 rootlibexec_PROGRAMS = \
        systemd \
@@ -294,20 +307,23 @@ rootlibexec_PROGRAMS = \
 systemgenerator_PROGRAMS = \
        systemd-getty-generator \
        systemd-fstab-generator \
-       systemd-system-update-generator \
-       systemd-efi-boot-generator
+       systemd-system-update-generator
 
-dist_bin_SCRIPTS = \
-       src/analyze/systemd-analyze
+systemd_analyze_SOURCES = \
+       src/analyze/systemd-analyze.c
 
-EXTRA_DIST += \
-       src/analyze/systemd-analyze.in
+systemd_analyze_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(DBUS_CFLAGS)
 
-CLEANFILES += \
-       src/analyze/systemd-analyze
+systemd_analyze_LDADD = \
+       libsystemd-shared.la \
+       libsystemd-dbus.la
 
 dist_bashcompletion_DATA = \
-       shell-completion/systemd-bash-completion.sh
+       shell-completion/bash/journalctl \
+       shell-completion/bash/systemctl \
+       shell-completion/bash/udevadm
 
 dist_tmpfiles_DATA = \
        tmpfiles.d/systemd.conf \
@@ -370,7 +386,8 @@ dist_systemunit_DATA = \
        units/systemd-ask-password-console.path \
        units/systemd-udevd-control.socket \
        units/systemd-udevd-kernel.socket \
-       units/system-update.target
+       units/system-update.target \
+       units/initrd-switch-root.target
 
 nodist_systemunit_DATA = \
        units/getty@.service \
@@ -402,7 +419,11 @@ nodist_systemunit_DATA = \
        units/systemd-udevd.service \
        units/systemd-udev-trigger.service \
        units/systemd-udev-settle.service \
-       units/debug-shell.service
+       units/debug-shell.service \
+       units/initrd-parse-etc.service \
+       units/initrd-cleanup.service \
+       units/initrd-udevadm-cleanup-db.service \
+       units/initrd-switch-root.service
 
 dist_userunit_DATA = \
        units/user/default.target \
@@ -444,6 +465,10 @@ EXTRA_DIST += \
        units/systemd-hybrid-sleep.service.in \
        units/systemd-suspend.service.in \
        units/quotaon.service.in \
+       units/initrd-parse-etc.service.in \
+       units/initrd-cleanup.service.in \
+       units/initrd-udevadm-cleanup-db.service.in \
+       units/initrd-switch-root.service.in \
        introspect.awk \
        man/custom-html.xsl
 
@@ -484,33 +509,48 @@ include Makefile-man.am
 
 XML_FILES = \
        ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
+HTML_FILES = \
+       ${XML_FILES:.xml=.html}
+HTML_ALIAS = \
+       ${patsubst %.1,%.html,${patsubst %.3,%.html,${patsubst %.5,%.html,${patsubst %.7,%.html,${patsubst %.8,%.html,$(MANPAGES_ALIAS)}}}}}
 
 if ENABLE_MANPAGES
 man_MANS = \
        $(MANPAGES) \
        $(MANPAGES_ALIAS)
 
-noinst_DATA = \
-       ${XML_FILES:.xml=.html}
+noinst_DATA += \
+       $(HTML_FILES) \
+       $(HTML_ALIAS)
 
 CLEANFILES += \
-       $(MANPAGES) \
-       $(MANPAGES_ALIAS) \
-       ${XML_FILES:.xml=.html}
+       $(man_MANS) \
+       $(HTML_FILES) \
+       $(HTML_ALIAS)
+
+docs/html/man:
+       $(AM_V_at)$(MKDIR_P) $(dir $@)
+       $(AM_V_LN)$(LN_S) -f ../../man $@
+
+noinst_DATA += \
+       docs/html/man
+
+CLEANFILES += \
+       docs/html/man
 
 if HAVE_PYTHON
+man/index.html: man/systemd.index.html
+       $(AM_V_LN)$(LN_S) -f systemd.index.html $@
+
 noinst_DATA += \
        man/index.html
 
 CLEANFILES += \
-       man/index.html
-
-man/index.html:
-       $(AM_V_GEN)$(LN_S) systemd.index.html $@
+       man/index.html
 
 NON_INDEX_XML_FILES = $(filter-out man/systemd.index.xml,$(XML_FILES))
 
-XML_GLOB = $(wildcard $(top_srcdir)/man/*.xml $(top_srcdir)/man/*.xml.in)
+XML_GLOB = $(wildcard $(top_srcdir)/man/*.xml $(top_srcdir)/man/*.xml.in $(top_builddir)/man/*.xml)
 update-man-list: make-man-rules.py $(XML_GLOB)
        $(AM_V_GEN)$(PYTHON) $^ > $(top_srcdir)/Makefile-man.tmp
        $(AM_V_at)mv $(top_srcdir)/Makefile-man.tmp $(top_srcdir)/Makefile-man.am
@@ -529,15 +569,19 @@ EXTRA_DIST += \
        man/index.html \
        man/systemd.directives.xml
 
+CLEANFILES += \
+       man/systemd.index.xml \
+       man/systemd.directives.xml
+
 endif
 
 endif
 
 EXTRA_DIST += \
        $(XML_FILES) \
-       ${XML_FILES:.xml=.html} \
-       $(MANPAGES) \
-       $(MANPAGES_ALIAS) \
+       $(HTML_FILES) \
+       $(HTML_ALIAS) \
+       $(dist_MANS) \
        make-man-index.py \
        make-directive-index.py
 
@@ -620,6 +664,8 @@ libsystemd_shared_la_SOURCES = \
        src/shared/time-dst.h \
        src/shared/calendarspec.c \
        src/shared/calendarspec.h \
+       src/shared/fileio.c \
+       src/shared/fileio.h \
        src/shared/output-mode.h
 
 #-------------------------------------------------------------------------------
@@ -672,6 +718,8 @@ libsystemd_label_la_SOURCES = \
        src/shared/mkdir.h \
        src/shared/ask-password-api.c \
        src/shared/ask-password-api.h \
+       src/shared/fileio-label.c \
+       src/shared/fileio-label.h \
        src/shared/dev-setup.c \
        src/shared/dev-setup.h
 
@@ -822,6 +870,8 @@ libsystemd_core_la_SOURCES = \
        src/core/selinux-access.h \
        src/core/selinux-setup.c \
        src/core/selinux-setup.h \
+       src/core/smack-setup.c \
+       src/core/smack-setup.h \
        src/core/ima-setup.c \
        src/core/ima-setup.h \
        src/core/locale-setup.h \
@@ -842,6 +892,8 @@ libsystemd_core_la_SOURCES = \
        src/core/tcpwrap.h \
        src/core/cgroup-attr.c \
        src/core/cgroup-attr.h \
+       src/core/cgroup-semantics.c \
+       src/core/cgroup-semantics.h \
        src/core/securebits.h \
        src/core/initreq.h \
        src/core/special.h \
@@ -969,7 +1021,7 @@ dbusinterface_DATA += \
        org.freedesktop.systemd1.Swap.xml \
        org.freedesktop.systemd1.Path.xml
 
-polkitpolicy_in_in_files = \
+polkitpolicy_in_in_files += \
        src/core/org.freedesktop.systemd1.policy.in.in
 
 org.freedesktop.systemd1.%.xml: systemd
@@ -1001,8 +1053,7 @@ noinst_PROGRAMS += \
        test-cgroup \
        test-install \
        test-watchdog \
-       test-log \
-       test-efivars
+       test-log
 
 noinst_tests += \
        test-job-type \
@@ -1070,11 +1121,16 @@ test_hostname_SOURCES = \
 test_hostname_LDADD = \
        libsystemd-core.la
 
+if ENABLE_EFI
+noinst_PROGRAMS += \
+       test-efivars
+
 test_efivars_SOURCES = \
        src/test/test-efivars.c
 
 test_efivars_LDADD = \
        libsystemd-shared.la
+endif
 
 test_unit_name_SOURCES = \
        src/test/test-unit-name.c
@@ -1409,12 +1465,17 @@ systemd_system_update_generator_LDADD = \
        libsystemd-shared.la
 
 # ------------------------------------------------------------------------------
+if ENABLE_EFI
+systemgenerator_PROGRAMS +=  \
+       systemd-efi-boot-generator
+
 systemd_efi_boot_generator_SOURCES = \
        src/efi-boot-generator/efi-boot-generator.c
 
 systemd_efi_boot_generator_LDADD = \
        libsystemd-label.la \
        libsystemd-shared.la
+endif
 
 # ------------------------------------------------------------------------------
 systemd_rc_local_generator_SOURCES = \
@@ -1544,7 +1605,6 @@ libsystemd_daemon_la_CFLAGS = \
 
 libsystemd_daemon_la_LDFLAGS = \
        $(AM_LDFLAGS) \
-       -shared \
        -version-info $(LIBSYSTEMD_DAEMON_CURRENT):$(LIBSYSTEMD_DAEMON_REVISION):$(LIBSYSTEMD_DAEMON_AGE) \
        -Wl,--version-script=$(top_srcdir)/src/libsystemd-daemon/libsystemd-daemon.sym
 
@@ -1578,6 +1638,10 @@ EXTRA_DIST += \
 if ENABLE_GTK_DOC
 SUBDIRS += \
        docs/libudev
+
+noinst_DATA += \
+       docs/html/libudev \
+       docs/html/gudev
 endif
 
 include_HEADERS += \
@@ -1620,7 +1684,17 @@ EXTRA_DIST += \
        src/libudev/libudev.sym
 
 CLEANFILES += \
-       src/libudev/libudev.pc
+       src/libudev/libudev.pc \
+       docs/html/libudev \
+       docs/html/gudev
+
+docs/html/libudev:
+       $(AM_V_at)$(MKDIR_P) $(dir $@)
+       $(AM_V_LN)$(LN_S) -f ../libudev/html $@
+
+docs/html/gudev:
+       $(AM_V_at)$(MKDIR_P) $(dir $@)
+       $(AM_V_LN)$(LN_S) -f ../gudev/html $@
 
 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
 libudev-install-hook:
@@ -1711,7 +1785,7 @@ SYSINIT_TARGET_WANTS += \
        systemd-udevd.service \
        systemd-udev-trigger.service
 
-bin_PROGRAMS += \
+rootbin_PROGRAMS += \
        udevadm
 
 rootlibexec_PROGRAMS += \
@@ -1797,7 +1871,7 @@ udevadm_LDADD = \
 # Update hwdb on installation. Do not bother if installing
 # in DESTDIR, since this is likely for packaging purposes.
 hwdb-update-hook:
-       -test -n "$(DESTDIR)" || $(bindir)/udevadm hwdb --update
+       -test -n "$(DESTDIR)" || $(rootbindir)/udevadm hwdb --update
 
 INSTALL_DATA_HOOKS += \
        hwdb-update-hook
@@ -2245,7 +2319,6 @@ libsystemd_id128_la_CFLAGS = \
 
 libsystemd_id128_la_LDFLAGS = \
        $(AM_LDFLAGS) \
-       -shared \
        -version-info $(LIBSYSTEMD_ID128_CURRENT):$(LIBSYSTEMD_ID128_REVISION):$(LIBSYSTEMD_ID128_AGE) \
        -Wl,--version-script=$(top_srcdir)/src/libsystemd-id128/libsystemd-id128.sym
 
@@ -2291,6 +2364,18 @@ EXTRA_DIST += \
        src/libsystemd-id128/libsystemd-id128.pc.in \
        src/libsystemd-id128/libsystemd-id128.sym
 
+# ------------------------------------------------------------------------------
+
+rootlibexec_PROGRAMS += \
+       systemd-activate
+
+systemd_activate_SOURCES = \
+       src/activate/activate.c
+
+systemd_activate_LDADD = \
+       libsystemd-shared.la \
+       libsystemd-daemon.la
+
 # ------------------------------------------------------------------------------
 systemd_journald_SOURCES = \
        src/journal/journald.c \
@@ -2332,13 +2417,6 @@ journalctl_LDADD += \
        $(QRENCODE_LIBS)
 endif
 
-systemd_coredumpctl_SOURCES = \
-       src/journal/coredumpctl.c
-
-systemd_coredumpctl_LDADD = \
-       libsystemd-shared.la \
-       libsystemd-journal.la
-
 test_journal_SOURCES = \
        src/journal/test-journal.c
 
@@ -2436,7 +2514,6 @@ libsystemd_journal_la_CFLAGS = \
 
 libsystemd_journal_la_LDFLAGS = \
        $(AM_LDFLAGS) \
-       -shared \
        -version-info $(LIBSYSTEMD_JOURNAL_CURRENT):$(LIBSYSTEMD_JOURNAL_REVISION):$(LIBSYSTEMD_JOURNAL_AGE) \
        -Wl,--version-script=$(top_srcdir)/src/journal/libsystemd-journal.sym
 
@@ -2528,9 +2605,16 @@ libsystemd_journal_internal_la_LIBADD += \
        $(GCRYPT_LIBS)
 endif
 
-# move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
+# move lib from $(libdir) to $(rootlibdir) and update devel link, if
+# needed. Also, grant read access to new journal files to members of
+# "adm" and "wheel".
 libsystemd-journal-install-hook:
        libname=libsystemd-journal.so && $(move-to-rootlibdir)
+       -$(MKDIR_P) $(DESTDIR)/var/log/journal
+       -chown 0:0 $(DESTDIR)/var/log/journal
+       -chmod 755 $(DESTDIR)/var/log/journal
+       -setfacl -nm g:adm:rx,d:g:adm:rx $(DESTDIR)/var/log/journal/
+       -setfacl -nm g:wheel:rx,d:g:wheel:rx $(DESTDIR)/var/log/journal/
 
 libsystemd-journal-uninstall-hook:
        rm -f $(DESTDIR)$(rootlibdir)/libsystemd-journal.so*
@@ -2538,6 +2622,8 @@ libsystemd-journal-uninstall-hook:
 INSTALL_EXEC_HOOKS += libsystemd-journal-install-hook
 UNINSTALL_EXEC_HOOKS += libsystemd-journal-uninstall-hook
 
+# ------------------------------------------------------------------------------
+
 # Update catalog on installation. Do not bother if installing
 # in DESTDIR, since this is likely for packaging purposes.
 catalog-update-hook:
@@ -2582,7 +2668,6 @@ rootbin_PROGRAMS += \
        journalctl
 
 bin_PROGRAMS += \
-       systemd-coredumpctl \
        systemd-cat
 
 dist_systemunit_DATA += \
@@ -2674,6 +2759,19 @@ endif
 rootlibexec_PROGRAMS += \
        systemd-coredump
 
+systemd_coredumpctl_SOURCES = \
+       src/journal/coredumpctl.c
+
+systemd_coredumpctl_LDADD = \
+       libsystemd-shared.la \
+       libsystemd-journal.la
+
+bin_PROGRAMS += \
+       systemd-coredumpctl
+
+dist_bashcompletion_DATA += \
+       shell-completion/bash/systemd-coredumpctl
+
 sysctl_DATA = \
        sysctl.d/coredump.conf
 
@@ -2779,7 +2877,7 @@ if ENABLE_BOOTCHART
 systemd_bootchart_SOURCES = \
        src/bootchart/bootchart.c \
        src/bootchart/bootchart.h \
-       src/bootchart/log.c \
+       src/bootchart/store.c \
        src/bootchart/svg.c
 
 systemd_bootchart_LDADD = \
@@ -2886,6 +2984,7 @@ systemd_hostnamed_CFLAGS = \
        $(DBUS_CFLAGS)
 
 systemd_hostnamed_LDADD = \
+       libsystemd-label.la \
        libsystemd-shared.la \
        libsystemd-daemon.la \
        libsystemd-dbus.la
@@ -2931,6 +3030,9 @@ hostnamectl_LDADD = \
 bin_PROGRAMS += \
        hostnamectl
 
+dist_bashcompletion_DATA += \
+       shell-completion/bash/hostnamectl
+
 endif
 
 polkitpolicy_in_files += \
@@ -3004,6 +3106,9 @@ localectl_LDADD = \
 bin_PROGRAMS += \
        localectl
 
+dist_bashcompletion_DATA += \
+       shell-completion/bash/localectl
+
 endif
 
 polkitpolicy_in_files += \
@@ -3022,6 +3127,7 @@ systemd_timedated_CFLAGS = \
        $(DBUS_CFLAGS)
 
 systemd_timedated_LDADD = \
+       libsystemd-label.la \
        libsystemd-shared.la \
        libsystemd-daemon.la \
        libsystemd-dbus.la
@@ -3070,6 +3176,8 @@ timedatectl_LDADD = \
 bin_PROGRAMS += \
        timedatectl
 
+dist_bashcompletion_DATA += \
+       shell-completion/bash/timedatectl
 endif
 
 polkitpolicy_in_files += \
@@ -3078,6 +3186,24 @@ polkitpolicy_in_files += \
 EXTRA_DIST += \
        units/systemd-timedated.service.in
 
+# ------------------------------------------------------------------------------
+if ENABLE_EFI
+bootctl_SOURCES = \
+       src/boot/boot.h \
+       src/boot/boot-loader.h \
+       src/boot/bootctl.c \
+       src/boot/boot-loader.c \
+       src/boot/boot-efi.c
+
+bootctl_LDADD = \
+       libsystemd-shared.la \
+       libsystemd-id128.la \
+       libsystemd-daemon.la
+
+bin_PROGRAMS += \
+       bootctl
+endif
+
 # ------------------------------------------------------------------------------
 if HAVE_MYHOSTNAME
 libnss_myhostname_la_SOURCES = \
@@ -3174,6 +3300,9 @@ loginctl_LDADD = \
 rootbin_PROGRAMS += \
        loginctl
 
+dist_bashcompletion_DATA += \
+       shell-completion/bash/loginctl
+
 systemd_inhibit_SOURCES = \
        src/login/inhibit.c
 
@@ -3219,7 +3348,6 @@ libsystemd_login_la_CFLAGS = \
 
 libsystemd_login_la_LDFLAGS = \
        $(AM_LDFLAGS) \
-       -shared \
        -version-info $(LIBSYSTEMD_LOGIN_CURRENT):$(LIBSYSTEMD_LOGIN_REVISION):$(LIBSYSTEMD_LOGIN_AGE) \
        -Wl,--version-script=$(top_srcdir)/src/login/libsystemd-login.sym
 
@@ -3345,7 +3473,9 @@ EXTRA_DIST += \
 # ------------------------------------------------------------------------------
 if HAVE_PYTHON_DEVEL
 pkgpyexec_LTLIBRARIES = \
-       _journal.la
+       _journal.la \
+       id128.la \
+       _reader.la
 
 _journal_la_SOURCES = \
        src/python-systemd/_journal.c
@@ -3365,11 +3495,81 @@ _journal_la_LIBADD = \
        $(PYTHON_LIBS) \
        libsystemd-journal.la
 
+id128_la_SOURCES = \
+       src/python-systemd/id128.c \
+       src/python-systemd/id128-constants.h \
+       src/python-systemd/pyutil.c \
+       src/python-systemd/pyutil.h
+
+id128_la_CFLAGS = \
+       $(AM_CFLAGS) \
+        -fvisibility=default \
+       $(PYTHON_CFLAGS) \
+       -I$(top_builddir)/src/python-systemd
+
+id128_la_LDFLAGS = \
+       $(AM_LDFLAGS) \
+       -shared \
+       -module \
+       -avoid-version
+
+id128_la_LIBADD = \
+       $(PYTHON_LIBS) \
+       libsystemd-id128.la
+
+_reader_la_SOURCES = \
+       src/python-systemd/_reader.c \
+       src/python-systemd/pyutil.c \
+       src/python-systemd/pyutil.h
+
+_reader_la_CFLAGS = \
+       $(AM_CFLAGS) \
+        -fvisibility=default \
+       $(PYTHON_CFLAGS)
+
+_reader_la_LDFLAGS = \
+       $(AM_LDFLAGS) \
+       -shared \
+       -module \
+       -avoid-version
+
+_reader_la_LIBADD = \
+       $(PYTHON_LIBS) \
+       libsystemd-journal.la \
+       libsystemd-id128.la \
+       libsystemd-shared.la
+
 dist_pkgpyexec_PYTHON = \
        src/python-systemd/journal.py \
        src/python-systemd/__init__.py
+
+src/python-systemd/id128-constants.h: src/systemd/sd-messages.h Makefile
+       $(AM_V_at)$(MKDIR_P) $(dir $@)
+       $(AM_V_GEN)$(SED) -n -r 's/,//g; s/#define (SD_MESSAGE_[A-Z0-9_]+)\s.*/add_id(m, "\1", \1) JOINER/p' <$< >$@
+
+BUILT_SOURCES += \
+       src/python-systemd/id128-constants.h
+
+PAPER = $(shell cat /etc/papersize 2>/dev/null || echo a4)
+SPHINXOPTS = -D latex_paper_size=$(PAPER) -D version=$(VERSION) -D release=$(VERSION)
+sphinx-%:
+       $(AM_V_at)test -n "$(SPHINX_BUILD)" || { echo " *** sphinx-build is not available"; exit 1; }
+       $(AM_V_GEN)PYTHONPATH=$(DESTDIR)$(pyexecdir) LD_LIBRARY_PATH=$(DESTDIR)$(libdir) $(SPHINX_BUILD) -b $* $(SPHINXOPTS) $(top_srcdir)/src/python-systemd/docs $(top_builddir)/docs/html/python-systemd/
+       $(AM_V_at)echo Output has been generated in $(abs_top_builddir)/docs/html/python-systemd/
+
+destdir-sphinx: all
+       dir="$$(mktemp -d /tmp/systemd-install.XXXXXX)" && \
+               $(MAKE) DESTDIR="$$dir" install && \
+               $(MAKE) DESTDIR="$$dir" sphinx-html && \
+               rm -rf "$$dir"
+
 endif
 
+CLEAN_LOCAL_HOOKS += clean-sphinx
+
+clean-sphinx:
+       -rm -rf docs/html/python-systemd/
+
 # ------------------------------------------------------------------------------
 SED_PROCESS = \
        $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
@@ -3439,10 +3639,6 @@ src/%.policy.in: src/%.policy.in.in Makefile
        $(SED_PROCESS)
        $(AM_V_GEN)chmod +x $@
 
-src/analyze/systemd-analyze: %: %.in Makefile
-       $(SED_PROCESS)
-       $(AM_V_GEN)chmod +x $@
-
 src/%.c: src/%.gperf
        $(AM_V_at)$(MKDIR_P) $(dir $@)
        $(AM_V_GPERF)$(GPERF) < $< > $@
@@ -3459,9 +3655,11 @@ units/user/%: units/%.m4 Makefile
        $(AM_V_M4)$(MKDIR_P) $(dir $@)
        $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_USER=1 < $< > $@
 
+if ENABLE_POLKIT
 nodist_polkitpolicy_DATA = \
        $(polkitpolicy_files) \
        $(polkitpolicy_in_in_files:.policy.in.in=.policy)
+endif
 
 EXTRA_DIST += \
        $(polkitpolicy_in_files) \
@@ -3470,7 +3668,6 @@ EXTRA_DIST += \
 CLEANFILES += \
        $(nodist_systemunit_DATA) \
        $(nodist_userunit_DATA) \
-       $(nodist_man_MANS) \
        $(pkgconfigdata_DATA) \
        $(pkgconfiglib_DATA) \
        $(nodist_polkitpolicy_DATA)
@@ -3511,9 +3708,10 @@ man/%.8: man/%.xml
 man/%.html: man/%.xml man/custom-html.xsl
        $(XSLTPROC_PROCESS_HTML)
 
-CLEANFILES += \
-       $(dist_man_MANS) \
-       ${XML_FILES:.xml=.html}
+define html-alias
+       $(AM_V_LN)$(LN_S) $(notdir $<) $@
+endef
+
 endif
 
 # ------------------------------------------------------------------------------
@@ -3650,7 +3848,7 @@ install-data-hook: $(INSTALL_DATA_HOOKS)
 
 distclean-local: $(DISTCLEAN_LOCAL_HOOKS)
 
-clean-local:
+clean-local: $(CLEAN_LOCAL_HOOKS)
        rm -rf $(abs_srcdir)/install-tree
        rm -f $(abs_srcdir)/hwdb/usb.ids $(abs_srcdir)/hwdb/pci.ids $(abs_srcdir)/hwdb/oui.txt \
               $(abs_srcdir)/hwdb/iab.txt
@@ -3660,6 +3858,7 @@ DISTCHECK_CONFIGURE_FLAGS = \
        --with-dbussessionservicedir=$$dc_install_base/$(dbussessionservicedir) \
        --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
        --with-dbusinterfacedir=$$dc_install_base/$(dbusinterfacedir) \
+       --with-bashcompletiondir=$$dc_install_base/$(bashcompletiondir) \
        --with-pamlibdir=$$dc_install_base/$(pamlibdir) \
        --with-rootprefix=$$dc_install_base \
        --disable-split-usr
@@ -3692,17 +3891,19 @@ upload: all distcheck
        scp systemd-$(VERSION).tar.xz fdo:/srv/www.freedesktop.org/www/software/systemd/
        scp man/*.html tango:public/systemd-man/
 
-doc-sync: all
+www_target = www.freedesktop.org:/srv/www.freedesktop.org/www/software/systemd
+doc-sync: all destdir-sphinx
        gtkdoc-rebase --html-dir=docs/libudev/html --online
-       rsync -av --delete docs/libudev/html/ --omit-dir-times www.freedesktop.org:/srv/www.freedesktop.org/www/software/systemd/libudev/
+       rsync -av --delete docs/libudev/html/ --omit-dir-times $(www_target)/libudev/
        gtkdoc-rebase --html-dir=docs/gudev/html --online
-       rsync -av --delete docs/gudev/html/ --omit-dir-times www.freedesktop.org:/srv/www.freedesktop.org/www/software/systemd/gudev/
-       rsync -av --delete-excluded --include="*.html" --exclude="*" --omit-dir-times man/ www.freedesktop.org:/srv/www.freedesktop.org/www/software/systemd/man/
+       rsync -av --delete docs/gudev/html/ --omit-dir-times $(www_target)/gudev/
+       rsync -av --delete-excluded --include="*.html" --exclude="*" --omit-dir-times man/ $(www_target)/man/
+       rsync -av --delete --omit-dir-times docs/html/python-systemd/ $(www_target)/python-systemd/
 
 git-tag:
        git tag "v$(VERSION)" -m "systemd $(VERSION)"
 
 install-tree: all
        rm -rf $(abs_srcdir)/install-tree
-       make install DESTDIR=$(abs_srcdir)/install-tree
+       $(MAKE) install DESTDIR=$(abs_srcdir)/install-tree
        tree $(abs_srcdir)/install-tree