chiark / gitweb /
build-sys: fix catalog-update-hook with older systemd
[elogind.git] / Makefile.am
index 3c590094d35e3b3b2ae02886cfdcc8fc2f40ac0c..21e803f48b395777792bb157543de0237095de8c 100644 (file)
@@ -1481,7 +1481,7 @@ systemd_detect_virt_LDADD = \
        libsystemd-shared.la
 
 systemd-detect-virt-install-hook:
-       $(SETCAP) cap_dac_override,cap_sys_ptrace=ep $(DESTDIR)$(bindir)/systemd-detect-virt ||:
+       -$(SETCAP) cap_dac_override,cap_sys_ptrace=ep $(DESTDIR)$(bindir)/systemd-detect-virt
 
 INSTALL_EXEC_HOOKS += \
        systemd-detect-virt-install-hook
@@ -1893,7 +1893,6 @@ libudev_core_la_SOURCES = \
        src/udev/udev-rules.c \
        src/udev/udev-ctrl.c \
        src/udev/udev-builtin.c \
-       src/udev/udev-builtin-blkid.c \
        src/udev/udev-builtin-btrfs.c \
        src/udev/udev-builtin-firmware.c \
        src/udev/udev-builtin-hwdb.c \
@@ -1920,6 +1919,11 @@ libudev_core_la_CPPFLAGS = \
        $(AM_CPPFLAGS) \
        -DFIRMWARE_PATH="$(FIRMWARE_PATH)"
 
+if HAVE_BLKID
+libudev_core_la_SOURCES += \
+       src/udev/udev-builtin-blkid.c
+endif
+
 if HAVE_ACL
 libudev_core_la_SOURCES += \
        src/udev/udev-builtin-uaccess.c \
@@ -2710,6 +2714,17 @@ libsystemd-journal-uninstall-hook:
 UNINSTALL_EXEC_HOOKS += \
        libsystemd-journal-uninstall-hook
 
+# Update catalog on installation / deinstallation. Do not bother if installing
+# in DESTDIR, since this is likely for packaging purposes.
+# Ignore failure, since there are other reasons why it might not work,
+# like running under distcheck.
+catalog-update-hook:
+       -test -n "$(DESTDIR)" || journalctl --update-catalog
+
+INSTALL_DATA_HOOKS += \
+       catalog-update-hook
+
+
 noinst_PROGRAMS += \
        test-journal \
        test-journal-send \