chiark / gitweb /
build-sys: don't hard code bash-completion directory
[elogind.git] / Makefile.am
index 6e5f5af9ac04a009281e2eabbb4971ea07fc9bfe..f18cccd070d36ba935f84da93058670ac002cf18 100644 (file)
@@ -64,14 +64,13 @@ 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)
 varlogdir=$(localstatedir)/log
 systemdstatedir=$(localstatedir)/lib/systemd
 catalogstatedir=$(systemdstatedir)/catalog
-hwdb_bin=/etc/udev/hwdb.bin
 
 # Our own, non-special dirs
 pkgsysconfdir=$(sysconfdir)/systemd
@@ -110,6 +109,7 @@ noinst_LTLIBRARIES =
 lib_LTLIBRARIES =
 include_HEADERS =
 pkgconfiglib_DATA =
+polkitpolicy_in_in_files =
 polkitpolicy_in_files =
 polkitpolicy_files =
 dist_udevrules_DATA =
@@ -138,7 +138,6 @@ AM_CPPFLAGS = \
        -DUSER_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/user\" \
        -DUSER_DATA_UNIT_PATH=\"$(userunitdir)\" \
        -DCATALOG_PATH=\"$(catalogstatedir)\" \
-       -DHWDB_BIN=\"$(hwdb_bin)\" \
        -DSYSTEMD_CGROUP_AGENT_PATH=\"$(rootlibexecdir)/systemd-cgroups-agent\" \
        -DSYSTEMD_BINARY_PATH=\"$(rootlibexecdir)/systemd\" \
        -DSYSTEMD_SHUTDOWN_BINARY_PATH=\"$(rootlibexecdir)/systemd-shutdown\" \
@@ -276,7 +275,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 \
@@ -296,20 +302,24 @@ 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/systemd-coredumpctl \
+       shell-completion/bash/udevadm
 
 dist_tmpfiles_DATA = \
        tmpfiles.d/systemd.conf \
@@ -372,7 +382,12 @@ 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-parse-etc.service \
+       units/initrd-cleanup.service \
+       units/initrd-switch-root.target \
+       units/initrd-udevadm-cleanup-db.service \
+       units/initrd-switch-root.service
 
 nodist_systemunit_DATA = \
        units/getty@.service \
@@ -501,9 +516,18 @@ CLEANFILES += \
        ${XML_FILES:.xml=.html}
 
 if HAVE_PYTHON
+noinst_DATA += \
+       man/index.html
+
+CLEANFILES += \
+       man/index.html
+
+man/index.html:
+       $(AM_V_GEN)$(LN_S) systemd.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
@@ -519,6 +543,7 @@ man/systemd.directives.xml: make-directive-index.py $(filter-out man/systemd.dir
 
 EXTRA_DIST += \
        man/systemd.index.xml \
+       man/index.html \
        man/systemd.directives.xml
 
 endif
@@ -565,6 +590,8 @@ libsystemd_shared_la_SOURCES = \
        src/shared/fdset.h \
        src/shared/strv.c \
        src/shared/strv.h \
+       src/shared/env-util.c \
+       src/shared/env-util.h \
        src/shared/strbuf.c \
        src/shared/strbuf.h \
        src/shared/strxcpyx.c \
@@ -610,10 +637,10 @@ 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
 
-libsystemd_shared_la_LIBADD = libsystemd-daemon.la
-
 #-------------------------------------------------------------------------------
 noinst_LTLIBRARIES += \
        libsystemd-dbus.la
@@ -664,6 +691,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
 
@@ -834,6 +863,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 \
@@ -847,7 +878,9 @@ libsystemd_core_la_SOURCES = \
        src/core/syscall-list.c \
        src/core/syscall-list.h \
        src/core/audit-fd.c \
-       src/core/audit-fd.h
+       src/core/audit-fd.h \
+       src/core/sync.c \
+       src/core/sync.h
 
 if HAVE_KMOD
 libsystemd_core_la_SOURCES += \
@@ -867,7 +900,8 @@ libsystemd_core_la_CFLAGS = \
        $(LIBWRAP_CFLAGS) \
        $(PAM_CFLAGS) \
        $(AUDIT_CFLAGS) \
-       $(KMOD_CFLAGS)
+       $(KMOD_CFLAGS) \
+       -pthread
 
 libsystemd_core_la_LIBADD = \
        libsystemd-capability.la \
@@ -958,7 +992,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
@@ -990,13 +1024,14 @@ noinst_PROGRAMS += \
        test-cgroup \
        test-install \
        test-watchdog \
-       test-log \
-       test-efivars
+       test-log
 
 noinst_tests += \
        test-job-type \
        test-env-replace \
+       test-strbuf \
        test-strv \
+       test-strxcpyx \
        test-unit-name \
        test-unit-file \
        test-util \
@@ -1057,11 +1092,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
@@ -1155,6 +1195,12 @@ test_env_replace_SOURCES = \
 test_env_replace_LDADD = \
        libsystemd-shared.la
 
+test_strbuf_SOURCES = \
+       src/test/test-strbuf.c
+
+test_strbuf_LDADD = \
+       libsystemd-shared.la
+
 test_strv_SOURCES = \
        src/test/test-strv.c
 
@@ -1162,6 +1208,12 @@ test_strv_LDADD = \
        libsystemd-shared.la \
        libsystemd-id128-internal.la
 
+test_strxcpyx_SOURCES = \
+       src/test/test-strxcpyx.c
+
+test_strxcpyx_LDADD = \
+       libsystemd-shared.la
+
 test_install_SOURCES = \
        src/test/test-install.c
 
@@ -1384,12 +1436,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 = \
@@ -1509,6 +1566,9 @@ systemd_tty_ask_password_agent_LDADD = \
 libsystemd_daemon_la_SOURCES = \
        src/libsystemd-daemon/sd-daemon.c
 
+libsystemd_daemon_internal_la_SOURCES = \
+        $(libsystemd_daemon_la_SOURCES)
+
 libsystemd_daemon_la_CFLAGS = \
        $(AM_CFLAGS) \
        -fvisibility=hidden \
@@ -1516,7 +1576,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
 
@@ -1536,6 +1595,9 @@ UNINSTALL_EXEC_HOOKS += libsystemd-daemon-uninstall-hook
 lib_LTLIBRARIES += \
        libsystemd-daemon.la
 
+noinst_LTLIBRARIES += \
+        libsystemd-daemon-internal.la
+
 pkgconfiglib_DATA += \
        src/libsystemd-daemon/libsystemd-daemon.pc
 
@@ -1577,7 +1639,9 @@ libudev_la_LDFLAGS = \
        -Wl,--version-script=$(top_srcdir)/src/libudev/libudev.sym
 
 libudev_la_LIBADD = \
-       libsystemd-shared.la
+       libsystemd-shared.la \
+       libsystemd-daemon-internal.la \
+       libsystemd-id128-internal.la
 
 pkgconfiglib_DATA += \
        src/libudev/libudev.pc
@@ -1701,8 +1765,7 @@ libudev_core_la_SOURCES = \
        src/udev/udev-builtin-input_id.c \
        src/udev/udev-builtin-net_id.c \
        src/udev/udev-builtin-path_id.c \
-       src/udev/udev-builtin-usb_id.c \
-       src/libsystemd-daemon/sd-daemon.c
+       src/udev/udev-builtin-usb_id.c
 
 libudev_core_la_CFLAGS = \
        $(AM_CFLAGS) \
@@ -1712,6 +1775,7 @@ libudev_core_la_CFLAGS = \
 libudev_core_la_LIBADD = \
        libudev-private.la \
        libsystemd-label.la \
+       libsystemd-daemon-internal.la \
        libsystemd-shared.la \
        $(BLKID_LIBS) \
        $(KMOD_LIBS)
@@ -1770,7 +1834,7 @@ INSTALL_DATA_HOOKS += \
        hwdb-update-hook
 
 hwdb-remove-hook:
-       -test -n "$(DESTDIR)" || rm -f $(HWDB_BIN)
+       -test -n "$(DESTDIR)" || rm -f /etc/udev/hwdb.bin
 
 # ------------------------------------------------------------------------------
 TESTS += \
@@ -2212,7 +2276,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
 
@@ -2258,6 +2321,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 \
@@ -2403,13 +2478,13 @@ 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
 
 libsystemd_journal_la_LIBADD = \
        libsystemd-shared.la \
        libsystemd-label.la \
+       libsystemd-daemon-internal.la \
        libsystemd-id128-internal.la
 
 libsystemd_journal_internal_la_SOURCES = \
@@ -2504,6 +2579,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:
@@ -2852,6 +2929,7 @@ systemd_hostnamed_CFLAGS = \
        $(DBUS_CFLAGS)
 
 systemd_hostnamed_LDADD = \
+       libsystemd-label.la \
        libsystemd-shared.la \
        libsystemd-daemon.la \
        libsystemd-dbus.la
@@ -2897,6 +2975,9 @@ hostnamectl_LDADD = \
 bin_PROGRAMS += \
        hostnamectl
 
+dist_bashcompletion_DATA += \
+       shell-completion/bash/hostnamectl
+
 endif
 
 polkitpolicy_in_files += \
@@ -2970,6 +3051,9 @@ localectl_LDADD = \
 bin_PROGRAMS += \
        localectl
 
+dist_bashcompletion_DATA += \
+       shell-completion/bash/localectl
+
 endif
 
 polkitpolicy_in_files += \
@@ -2988,6 +3072,7 @@ systemd_timedated_CFLAGS = \
        $(DBUS_CFLAGS)
 
 systemd_timedated_LDADD = \
+       libsystemd-label.la \
        libsystemd-shared.la \
        libsystemd-daemon.la \
        libsystemd-dbus.la
@@ -3036,6 +3121,8 @@ timedatectl_LDADD = \
 bin_PROGRAMS += \
        timedatectl
 
+dist_bashcompletion_DATA += \
+       shell-completion/bash/timedatectl
 endif
 
 polkitpolicy_in_files += \
@@ -3044,6 +3131,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 = \
@@ -3140,6 +3245,9 @@ loginctl_LDADD = \
 rootbin_PROGRAMS += \
        loginctl
 
+dist_bashcompletion_DATA += \
+       shell-completion/bash/loginctl
+
 systemd_inhibit_SOURCES = \
        src/login/inhibit.c
 
@@ -3185,7 +3293,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
 
@@ -3311,7 +3418,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
@@ -3331,11 +3440,75 @@ _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
 endif
 
+PAPER = $(shell cat /etc/papersize 2>/dev/null || echo a4)
+SPHINXOPTS = -D latex_paper_size=$(PAPER)
+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)/man/python-systemd/
+       $(AM_V_at)echo Output has been generated in $(abs_top_builddir)/man/python-systemd/
+
+destdir-sphinx: all
+       dir="`mktemp -d /tmp/systemd-install.XXXXXX`" && \
+               $(MAKE) DESTDIR="$$dir" install && \
+               $(MAKE) DESTDIR="$$dir" sphinx-html && \
+               rm -rf "$$dir"
+
 # ------------------------------------------------------------------------------
 SED_PROCESS = \
        $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
@@ -3345,6 +3518,8 @@ SED_PROCESS = \
                -e 's,@SYSTEMCTL\@,$(rootbindir)/systemctl,g' \
                -e 's,@SYSTEMD_NOTIFY\@,$(rootbindir)/systemd-notify,g' \
                -e 's,@pkgsysconfdir\@,$(pkgsysconfdir),g' \
+               -e 's,@SYSTEM_CONFIG_UNIT_PATH\@,$(pkgsysconfdir)/system,g' \
+               -e 's,@USER_CONFIG_UNIT_PATH\@,$(pkgsysconfdir)/user,g' \
                -e 's,@pkgdatadir\@,$(pkgdatadir),g' \
                -e 's,@systemunitdir\@,$(systemunitdir),g' \
                -e 's,@userunitdir\@,$(userunitdir),g' \
@@ -3403,10 +3578,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) < $< > $@
@@ -3423,9 +3594,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) \
@@ -3624,6 +3797,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
@@ -3656,17 +3830,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 man/python-systemd/ $(www_target)/man/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