chiark / gitweb /
build-sys: add a makefile target to run all tests through valgrind
[elogind.git] / Makefile.am
index 9fa7944f37237af4ff4c97b3a23752f2c029c5fc..31dde6f03f4eb06a202753c55d824d2f6c2152b8 100644 (file)
@@ -34,28 +34,28 @@ SUBDIRS = . po
 # Keep the test-suite.log
 .PRECIOUS: $(TEST_SUITE_LOG) Makefile
 
-LIBUDEV_CURRENT=4
-LIBUDEV_REVISION=7
-LIBUDEV_AGE=3
+LIBUDEV_CURRENT=5
+LIBUDEV_REVISION=0
+LIBUDEV_AGE=4
 
 LIBGUDEV_CURRENT=1
 LIBGUDEV_REVISION=3
 LIBGUDEV_AGE=1
 
-LIBSYSTEMD_LOGIN_CURRENT=8
+LIBSYSTEMD_LOGIN_CURRENT=9
 LIBSYSTEMD_LOGIN_REVISION=1
-LIBSYSTEMD_LOGIN_AGE=8
+LIBSYSTEMD_LOGIN_AGE=9
 
 LIBSYSTEMD_DAEMON_CURRENT=0
 LIBSYSTEMD_DAEMON_REVISION=10
 LIBSYSTEMD_DAEMON_AGE=0
 
 LIBSYSTEMD_ID128_CURRENT=0
-LIBSYSTEMD_ID128_REVISION=24
+LIBSYSTEMD_ID128_REVISION=26
 LIBSYSTEMD_ID128_AGE=0
 
 LIBSYSTEMD_JOURNAL_CURRENT=11
-LIBSYSTEMD_JOURNAL_REVISION=1
+LIBSYSTEMD_JOURNAL_REVISION=3
 LIBSYSTEMD_JOURNAL_AGE=11
 
 # Dirs of external packages
@@ -64,6 +64,7 @@ dbussessionservicedir=@dbussessionservicedir@
 dbussystemservicedir=@dbussystemservicedir@
 dbusinterfacedir=@dbusinterfacedir@
 pamlibdir=@pamlibdir@
+pamconfdir=@pamconfdir@
 pkgconfigdatadir=$(datadir)/pkgconfig
 pkgconfiglibdir=$(libdir)/pkgconfig
 polkitpolicydir=$(datadir)/polkit-1/actions
@@ -82,9 +83,9 @@ userunitdir=$(prefix)/lib/systemd/user
 userpresetdir=$(prefix)/lib/systemd/user-preset
 tmpfilesdir=$(prefix)/lib/tmpfiles.d
 sysctldir=$(prefix)/lib/sysctl.d
-usergeneratordir=$(prefix)/lib/systemd/user-generators
 pkgincludedir=$(includedir)/systemd
 systemgeneratordir=$(rootlibexecdir)/system-generators
+usergeneratordir=$(prefix)/lib/systemd/user-generators
 systemshutdowndir=$(rootlibexecdir)/system-shutdown
 systemsleepdir=$(rootlibexecdir)/system-sleep
 systemunitdir=$(rootprefix)/lib/systemd/system
@@ -158,7 +159,7 @@ AM_CPPFLAGS = \
        -DSYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH=\"$(rootbindir)/systemd-tty-ask-password-agent\" \
        -DSYSTEMD_STDIO_BRIDGE_BINARY_PATH=\"$(bindir)/systemd-stdio-bridge\" \
        -DROOTPREFIX=\"$(rootprefix)\" \
-       -DRANDOM_SEED=\"$(localstatedir)/lib/random-seed\" \
+       -DRANDOM_SEED=\"$(localstatedir)/lib/systemd/random-seed\" \
        -DSYSTEMD_CRYPTSETUP_PATH=\"$(rootlibexecdir)/systemd-cryptsetup\" \
        -DSYSTEM_GENERATOR_PATH=\"$(systemgeneratordir)\" \
        -DUSER_GENERATOR_PATH=\"$(usergeneratordir)\" \
@@ -340,11 +341,19 @@ dist_bashcompletion_DATA = \
        shell-completion/bash/journalctl \
        shell-completion/bash/systemctl \
        shell-completion/bash/systemd-analyze \
+       shell-completion/bash/systemd-run \
        shell-completion/bash/udevadm \
        shell-completion/bash/kernel-install
 
 dist_zshcompletion_DATA = \
        shell-completion/zsh/_systemctl \
+       shell-completion/zsh/_journalctl \
+       shell-completion/zsh/_udevadm \
+       shell-completion/zsh/_kernel-install \
+       shell-completion/zsh/_systemd-nspawn \
+       shell-completion/zsh/_systemd-analyze \
+       shell-completion/zsh/_sd_hosts_or_user_at_host \
+       shell-completion/zsh/_systemd-delta \
        shell-completion/zsh/_systemd
 
 dist_sysctl_DATA = \
@@ -633,6 +642,8 @@ libsystemd_shared_la_SOURCES = \
        src/shared/list.h \
        src/shared/macro.h \
        src/shared/def.h \
+       src/shared/device-nodes.c \
+       src/shared/device-nodes.h \
        src/shared/sparse-endian.h \
        src/shared/util.c \
        src/shared/util.h \
@@ -706,7 +717,13 @@ libsystemd_shared_la_SOURCES = \
        src/shared/output-mode.h \
        src/shared/MurmurHash3.c \
        src/shared/MurmurHash3.h \
-       src/shared/refcnt.h
+       src/shared/acpi-fpdt.h \
+       src/shared/acpi-fpdt.c \
+       src/shared/boot-timestamps.h \
+       src/shared/boot-timestamps.c \
+       src/shared/refcnt.h \
+       src/shared/mkdir.c \
+       src/shared/mkdir.h
 
 #-------------------------------------------------------------------------------
 noinst_LTLIBRARIES += \
@@ -750,15 +767,12 @@ noinst_LTLIBRARIES += \
        libsystemd-label.la
 
 libsystemd_label_la_SOURCES = \
-       src/shared/cgroup-label.c \
        src/shared/socket-label.c \
        src/shared/label.c \
        src/shared/label.h \
        src/shared/selinux-util.c \
        src/shared/selinux-util.h \
-       src/shared/mkdir.c \
        src/shared/mkdir-label.c \
-       src/shared/mkdir.h \
        src/shared/ask-password-api.c \
        src/shared/ask-password-api.h \
        src/shared/fileio-label.c \
@@ -958,8 +972,8 @@ libsystemd_core_la_SOURCES = \
        src/core/syscall-list.h \
        src/core/audit-fd.c \
        src/core/audit-fd.h \
-       src/core/sync.c \
-       src/core/sync.h
+       src/core/async.c \
+       src/core/async.h
 
 if HAVE_KMOD
 libsystemd_core_la_SOURCES += \
@@ -1018,7 +1032,7 @@ BUILT_SOURCES += \
 
 src/core/syscall-list.txt: Makefile
        $(AM_V_at)$(MKDIR_P) $(dir $@)
-       $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include sys/syscall.h - < /dev/null | $(AWK) '/^#define[ \t]+__NR_[^ ]+[ \t]+[0-9(]/ { sub(/__NR_/, "", $$2); print $$2; }' > $@
+       $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include sys/syscall.h - < /dev/null | $(AWK) '/^#define[ \t]+__NR_[^ ]+[ \t]+[0-9(]/ { sub(/__NR_/, "", $$2); if ($$2 !~ /SYSCALL_BASE/) print $$2; }' > $@
 
 src/core/syscall-from-name.gperf: src/core/syscall-list.txt Makefile
        $(AM_V_at)$(MKDIR_P) $(dir $@)
@@ -1114,6 +1128,7 @@ tests += \
        test-strxcpyx \
        test-unit-name \
        test-unit-file \
+       test-utf8 \
        test-util \
        test-date \
        test-sleep \
@@ -1127,7 +1142,8 @@ tests += \
        test-time \
        test-hashmap \
        test-list \
-       test-tables
+       test-tables \
+       test-device-nodes
 
 EXTRA_DIST += \
        test/sched_idle_bad.service \
@@ -1136,6 +1152,15 @@ EXTRA_DIST += \
        test/sched_rr_ok.service \
        test/sched_rr_change.service
 
+EXTRA_DIST += \
+       src/test/test-helper.h
+
+test_device_nodes_SOURCES = \
+       src/test/test-device-nodes.c
+
+test_device_nodes_LDADD = \
+       libsystemd-shared.la
+
 test_engine_SOURCES = \
        src/test/test-engine.c
 
@@ -1184,12 +1209,12 @@ test_hostname_LDADD = \
 
 if ENABLE_EFI
 manual_tests += \
-       test-efivars
+       test-boot-timestamp
 
-test_efivars_SOURCES = \
-       src/test/test-efivars.c
+test_boot_timestamp_SOURCES = \
+       src/test/test-boot-timestamps.c
 
-test_efivars_LDADD = \
+test_boot_timestamp_LDADD = \
        libsystemd-shared.la
 endif
 
@@ -1213,6 +1238,15 @@ test_unit_file_CFLAGS = \
 test_unit_file_LDADD = \
        libsystemd-core.la
 
+test_utf8_SOURCES = \
+       src/test/test-utf8.c
+
+test_utf8_CFLAGS = \
+       $(AM_CFLAGS)
+
+test_utf8_LDADD = \
+       libsystemd-shared.la
+
 test_util_SOURCES = \
        src/test/test-util.c
 
@@ -1334,7 +1368,8 @@ test_cgroup_util_SOURCES = \
 
 test_cgroup_util_LDADD = \
        libsystemd-label.la \
-       libsystemd-shared.la
+       libsystemd-shared.la \
+       libsystemd-daemon.la
 
 test_env_replace_SOURCES = \
        src/test/test-env-replace.c
@@ -1529,12 +1564,15 @@ EXTRA_DIST += \
 # ------------------------------------------------------------------------------
 if ENABLE_TMPFILES
 systemd_tmpfiles_SOURCES = \
-       src/tmpfiles/tmpfiles.c
+       src/tmpfiles/tmpfiles.c \
+       src/shared/specifier.c \
+       src/shared/specifier.h
 
 systemd_tmpfiles_LDADD = \
        libsystemd-label.la \
        libsystemd-shared.la \
-       libsystemd-capability.la
+       libsystemd-capability.la \
+       libsystemd-id128-internal.la
 
 rootbin_PROGRAMS += \
        systemd-tmpfiles
@@ -1561,6 +1599,9 @@ SYSINIT_TARGET_WANTS += \
        systemd-tmpfiles-setup-dev.service \
        systemd-tmpfiles-setup.service
 
+dist_zshcompletion_DATA += \
+       shell-completion/zsh/_systemd-tmpfiles
+
 TIMERS_TARGET_WANTS += \
        systemd-tmpfiles-clean.timer
 
@@ -1694,6 +1735,26 @@ bin_PROGRAMS += \
        bootctl
 endif
 
+# ------------------------------------------------------------------------------
+if HAVE_BLKID
+systemgenerator_PROGRAMS +=  \
+       systemd-gpt-auto-generator
+
+systemd_gpt_auto_generator_SOURCES = \
+       src/gpt-auto-generator/gpt-auto-generator.c
+
+systemd_gpt_auto_generator_LDADD = \
+       libsystemd-label.la \
+       libsystemd-shared.la \
+       libsystemd-id128-internal.la \
+       libudev-private.la \
+       $(BLKID_LIBS)
+
+systemd_gpt_auto_generator_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(BLKID_CFLAGS)
+endif
+
 # ------------------------------------------------------------------------------
 systemd_rc_local_generator_SOURCES = \
        src/rc-local-generator/rc-local-generator.c
@@ -1874,6 +1935,7 @@ libsystemd_bus_la_SOURCES = \
        src/systemd/sd-bus.h \
        src/systemd/sd-bus-protocol.h \
        src/systemd/sd-memfd.h \
+       src/systemd/sd-bus-vtable.h \
        src/libsystemd-bus/sd-bus.c \
        src/libsystemd-bus/bus-control.c \
        src/libsystemd-bus/bus-control.h \
@@ -1895,6 +1957,8 @@ libsystemd_bus_la_SOURCES = \
        src/libsystemd-bus/bus-match.h \
        src/libsystemd-bus/bus-bloom.c \
        src/libsystemd-bus/bus-bloom.h \
+       src/libsystemd-bus/bus-introspect.c \
+       src/libsystemd-bus/bus-introspect.h \
        src/libsystemd-bus/kdbus.h \
        src/libsystemd-bus/sd-memfd.c
 
@@ -1920,7 +1984,9 @@ tests += \
        test-bus-kernel-bloom \
        test-bus-kernel-benchmark \
        test-bus-memfd \
-       test-bus-zero-copy
+       test-bus-zero-copy \
+       test-bus-introspect \
+       test-bus-objects
 
 noinst_PROGRAMS += \
        busctl
@@ -1970,6 +2036,18 @@ test_bus_server_LDADD = \
        libsystemd-bus.la \
        libsystemd-id128-internal.la
 
+test_bus_objects_SOURCES = \
+       src/libsystemd-bus/test-bus-objects.c
+
+test_bus_objects_CFLAGS = \
+       $(AM_CFLAGS) \
+       -pthread
+
+test_bus_objects_LDADD = \
+       libsystemd-shared.la \
+       libsystemd-bus.la \
+       libsystemd-id128-internal.la
+
 test_bus_match_SOURCES = \
        src/libsystemd-bus/test-bus-match.c
 
@@ -2034,6 +2112,16 @@ test_bus_zero_copy_LDADD = \
        libsystemd-shared.la \
        libsystemd-bus.la
 
+test_bus_introspect_SOURCES = \
+       src/libsystemd-bus/test-bus-introspect.c
+
+test_bus_introspect_CFLAGS = \
+       $(AM_CFLAGS)
+
+test_bus_introspect_LDADD = \
+       libsystemd-shared.la \
+       libsystemd-bus.la
+
 busctl_SOURCES = \
        src/libsystemd-bus/busctl.c
 
@@ -2082,6 +2170,7 @@ libudev_la_LIBADD = \
        libsystemd-shared.la \
        libsystemd-label.la \
        libsystemd-daemon-internal.la \
+       $(RT_LIBS) \
        libsystemd-id128-internal.la
 
 pkgconfiglib_DATA += \
@@ -2253,6 +2342,7 @@ libudev_core_la_LIBADD = \
        libudev-private.la \
        libsystemd-label.la \
        libsystemd-daemon-internal.la \
+       $(RT_LIBS) \
        libsystemd-shared.la \
        $(BLKID_LIBS) \
        $(KMOD_LIBS)
@@ -2286,7 +2376,10 @@ if HAVE_ACL
 libudev_core_la_SOURCES += \
        src/udev/udev-builtin-uaccess.c \
        src/login/logind-acl.c \
-       src/login/sd-login.c
+       src/login/sd-login.c \
+       src/systemd/sd-login.h \
+       src/login/login-shared.c \
+       src/login/login-shared.h
 
 libudev_core_la_LIBADD += \
        libsystemd-acl.la
@@ -2639,7 +2732,8 @@ libsystemd_id128_la_LDFLAGS = \
 libsystemd_id128_la_LIBADD = \
        libsystemd-shared.la \
        libsystemd-label.la \
-       libsystemd-daemon-internal.la
+       libsystemd-daemon-internal.la \
+       $(RT_LIBS)
 
 libsystemd_id128_internal_la_SOURCES = \
        $(libsystemd_id128_la_SOURCES)
@@ -2649,7 +2743,8 @@ test_id128_SOURCES = \
 
 test_id128_LDADD = \
        libsystemd-shared.la \
-       libsystemd-id128-internal.la
+       libsystemd-id128-internal.la \
+       libsystemd-daemon.la
 
 tests += \
        test-id128
@@ -2786,6 +2881,15 @@ test_journal_stream_LDADD = \
        libsystemd-journal-internal.la \
        libsystemd-id128-internal.la
 
+test_journal_init_SOURCES = \
+       src/journal/test-journal-init.c
+
+test_journal_init_LDADD = \
+       libsystemd-shared.la \
+       libsystemd-daemon-internal.la \
+       $(RT_LIBS) \
+       libsystemd-journal.la
+
 test_journal_verify_SOURCES = \
        src/journal/test-journal-verify.c
 
@@ -2812,6 +2916,10 @@ test_mmap_cache_LDADD = \
 test_catalog_SOURCES = \
        src/journal/test-catalog.c
 
+test_catalog_CFLAGS = \
+       $(AM_CFLAGS) \
+       -DCATALOG_DIR=\"$(abs_top_srcdir)/catalog\"
+
 test_catalog_LDADD = \
        libsystemd-shared.la \
        libsystemd-label.la \
@@ -2850,6 +2958,7 @@ libsystemd_journal_la_LIBADD = \
        libsystemd-shared.la \
        libsystemd-label.la \
        libsystemd-daemon-internal.la \
+       $(RT_LIBS) \
        libsystemd-id128-internal.la
 
 libsystemd_journal_internal_la_SOURCES = \
@@ -2976,6 +3085,7 @@ tests += \
        test-journal-syslog \
        test-journal-match \
        test-journal-stream \
+       test-journal-init \
        test-journal-verify \
        test-journal-interleaving \
        test-mmap-cache \
@@ -3095,7 +3205,9 @@ systemd_coredumpctl_SOURCES = \
 
 systemd_coredumpctl_LDADD = \
        libsystemd-shared.la \
-       libsystemd-journal.la
+       libsystemd-journal.la \
+       libsystemd-journal-internal.la \
+       libsystemd-id128-internal.la
 
 bin_PROGRAMS += \
        systemd-coredumpctl
@@ -3103,6 +3215,9 @@ bin_PROGRAMS += \
 dist_bashcompletion_DATA += \
        shell-completion/bash/systemd-coredumpctl
 
+dist_zshcompletion_DATA += \
+       shell-completion/zsh/_systemd-coredumpctl
+
 sysctl_DATA = \
        sysctl.d/50-coredump.conf
 
@@ -3268,6 +3383,26 @@ endif
 EXTRA_DIST += \
        units/systemd-random-seed.service.in
 
+# ------------------------------------------------------------------------------
+if ENABLE_BACKLIGHT
+rootlibexec_PROGRAMS += \
+       systemd-backlight
+
+nodist_systemunit_DATA += \
+       units/systemd-backlight@.service
+
+systemd_backlight_SOURCES = \
+       src/backlight/backlight.c
+
+systemd_backlight_LDADD = \
+       libsystemd-label.la \
+       libsystemd-shared.la \
+       libudev-private.la
+endif
+
+EXTRA_DIST += \
+       units/systemd-backlight@.service.in
+
 # ------------------------------------------------------------------------------
 if HAVE_LIBCRYPTSETUP
 rootlibexec_PROGRAMS += \
@@ -3363,6 +3498,9 @@ bin_PROGRAMS += \
 dist_bashcompletion_DATA += \
        shell-completion/bash/hostnamectl
 
+dist_zshcompletion_DATA += \
+       shell-completion/zsh/_hostnamectl
+
 endif
 
 polkitpolicy_in_files += \
@@ -3439,6 +3577,9 @@ bin_PROGRAMS += \
 dist_bashcompletion_DATA += \
        shell-completion/bash/localectl
 
+dist_zshcompletion_DATA += \
+       shell-completion/zsh/_localectl
+
 endif
 
 polkitpolicy_in_files += \
@@ -3508,6 +3649,9 @@ bin_PROGRAMS += \
 
 dist_bashcompletion_DATA += \
        shell-completion/bash/timedatectl
+
+dist_zshcompletion_DATA += \
+       shell-completion/zsh/_timedatectl
 endif
 
 polkitpolicy_in_files += \
@@ -3616,6 +3760,9 @@ dist_dbussystemservice_DATA += \
 dist_dbuspolicy_DATA += \
        src/machine/org.freedesktop.machine1.conf
 
+dist_zshcompletion_DATA += \
+       shell-completion/zsh/_machinectl
+
 SYSTEM_UNIT_ALIASES += \
        systemd-machined.service dbus-org.freedesktop.machine1.service
 
@@ -3640,15 +3787,8 @@ systemd_logind_LDADD = \
        libsystemd-logind-core.la \
        $(libsystemd_logind_core_la_LIBADD)
 
-if HAVE_ACL
-systemd_logind_SOURCES += \
-       src/login/logind-acl.c
-
-systemd_logind_LDADD += \
-       libsystemd-acl.la
-endif
-
 libsystemd_logind_core_la_SOURCES = \
+       src/login/logind-core.c \
        src/login/logind-dbus.c \
        src/login/logind-device.c \
        src/login/logind-device.h \
@@ -3660,6 +3800,8 @@ libsystemd_logind_core_la_SOURCES = \
        src/login/logind-seat.h \
        src/login/logind-session.c \
        src/login/logind-session.h \
+       src/login/logind-session-device.c \
+       src/login/logind-session-device.h \
        src/login/logind-user.c \
        src/login/logind-user.h \
        src/login/logind-inhibit.c \
@@ -3667,7 +3809,9 @@ libsystemd_logind_core_la_SOURCES = \
        src/login/logind-session-dbus.c \
        src/login/logind-seat-dbus.c \
        src/login/logind-user-dbus.c \
-       src/login/logind-acl.h
+       src/login/logind-acl.h \
+       src/login/login-shared.c \
+       src/login/login-shared.h
 
 libsystemd_logind_core_la_CFLAGS = \
        $(AM_CFLAGS) \
@@ -3682,6 +3826,14 @@ libsystemd_logind_core_la_LIBADD = \
        libsystemd-id128-internal.la \
        libudev.la
 
+if HAVE_ACL
+libsystemd_logind_core_la_SOURCES += \
+       src/login/logind-acl.c
+
+libsystemd_logind_core_la_LIBADD += \
+       libsystemd-acl.la
+endif
+
 noinst_LTLIBRARIES += \
        libsystemd-logind-core.la
 
@@ -3715,7 +3867,8 @@ dist_bashcompletion_DATA += \
        shell-completion/bash/loginctl
 
 dist_zshcompletion_DATA += \
-       shell-completion/zsh/_loginctl
+       shell-completion/zsh/_loginctl \
+       shell-completion/zsh/_systemd-inhibit
 
 systemd_inhibit_SOURCES = \
        src/login/inhibit.c
@@ -3738,6 +3891,13 @@ test_login_LDADD = \
        libsystemd-login-internal.la \
        libsystemd-shared.la
 
+test_login_shared_SOURCES = \
+       src/login/test-login-shared.c
+
+test_login_shared_LDADD = \
+       libsystemd-login-internal.la \
+       libsystemd-shared.la
+
 test_inhibit_SOURCES = \
        src/login/test-inhibit.c
 
@@ -3764,10 +3924,14 @@ manual_tests += \
        test-inhibit
 
 tests += \
-       test-login-tables
+       test-login-tables \
+       test-login-shared
 
 libsystemd_login_la_SOURCES = \
-       src/login/sd-login.c
+       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) \
@@ -3780,7 +3944,8 @@ libsystemd_login_la_LDFLAGS = \
 
 libsystemd_login_la_LIBADD = \
        libsystemd-shared.la \
-       libsystemd-daemon-internal.la
+       libsystemd-daemon-internal.la \
+       $(RT_LIBS)
 
 libsystemd_login_internal_la_SOURCES = \
        $(libsystemd_login_la_SOURCES)
@@ -3808,10 +3973,14 @@ pam_systemd_la_LIBADD = \
        libsystemd-dbus.la \
        libsystemd-shared.la \
        libsystemd-daemon-internal.la \
+       $(RT_LIBS) \
        $(PAM_LIBS)
 
 pamlib_LTLIBRARIES = \
        pam_systemd.la
+
+dist_pamconf_DATA = \
+       src/login/systemd-user
 endif
 
 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
@@ -3992,7 +4161,8 @@ _reader_la_LIBADD = \
        libsystemd-journal.la \
        libsystemd-id128.la \
        libsystemd-shared.la \
-       libsystemd-daemon-internal.la
+       libsystemd-daemon-internal.la \
+       $(RT_LIBS)
 
 login_la_SOURCES = \
        src/python-systemd/login.c \
@@ -4015,7 +4185,8 @@ login_la_LIBADD = \
        libsystemd-journal.la \
        libsystemd-login.la \
        libsystemd-shared.la \
-       libsystemd-daemon-internal.la
+       libsystemd-daemon-internal.la \
+       $(RT_LIBS)
 
 dist_pkgpyexec_PYTHON = \
        src/python-systemd/journal.py \
@@ -4052,6 +4223,11 @@ CLEAN_LOCAL_HOOKS += clean-sphinx
 clean-sphinx:
        -rm -rf docs/html/python-systemd/
 
+# Remove Python stuff, e.g. to force rebuilding for a different Python version.
+clean-python:
+       -rm -rf src/python-systemd/.libs src/python-systemd/*.l[ao]
+       -rm -f _daemon.la id128.la _journal.la login.la _reader.la
+
 # ------------------------------------------------------------------------------
 substitutions = \
        '|rootlibexecdir=$(rootlibexecdir)|' \
@@ -4072,10 +4248,12 @@ substitutions = \
        '|catalogdir=$(catalogdir)|' \
        '|tmpfilesdir=$(tmpfilesdir)|' \
        '|sysctldir=$(sysctldir)|' \
+       '|systemgeneratordir=$(systemgeneratordir)|' \
+       '|usergeneratordir=$(usergeneratordir)|' \
        '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
        '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
        '|PACKAGE_URL=$(PACKAGE_URL)|' \
-       '|RANDOM_SEED=$(localstatedir)/lib/random-seed|' \
+       '|RANDOM_SEED=$(localstatedir)/lib/systemd/random-seed|' \
        '|prefix=$(prefix)|' \
        '|exec_prefix=$(exec_prefix)|' \
        '|libdir=$(libdir)|' \
@@ -4358,6 +4536,7 @@ DISTCHECK_CONFIGURE_FLAGS = \
        --with-bashcompletiondir=$$dc_install_base/$(bashcompletiondir) \
        --with-zshcompletiondir=$$dc_install_base/$(zshcompletiondir) \
        --with-pamlibdir=$$dc_install_base/$(pamlibdir) \
+       --with-pamconfdir=$$dc_install_base/$(pamconfdir) \
        --with-rootprefix=$$dc_install_base \
        --disable-split-usr
 
@@ -4409,3 +4588,8 @@ install-tree: all
        rm -rf $(abs_srcdir)/install-tree
        $(MAKE) install DESTDIR=$(abs_srcdir)/install-tree
        tree $(abs_srcdir)/install-tree
+
+# Let's run all tests of the test suite, but under valgrind. Let's
+# exclude the one perl script we have in there
+valgrind-tests: $(TESTS)
+       for f in $(TESTS) ; do [ "$$f" == "$${f/.pl/}" ] && libtool --mode=execute valgrind --leak-check=full --error-exitcode=55 $(builddir)/$$f ; done