chiark / gitweb /
build-sys: udev - create hwdb with make install
[elogind.git] / Makefile.am
index 43db5a529ef828f3bad24755613d0c926f883fd5..403b46b7210fe7a3c4620dedcf090421959bb74e 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
@@ -1955,6 +1955,14 @@ udevadm_LDADD = \
        libudev-core.la \
        libsystemd-shared.la
 
+# Update hwdb on installation. Do not bother if installing
+# in DESTDIR, since this is likely for packaging purposes.
+hwdb-update-hook:
+       -test -n "$(DESTDIR)" || udevadm hwdb --update
+
+INSTALL_DATA_HOOKS += \
+       hwdb-update-hook
+
 # ------------------------------------------------------------------------------
 TESTS += \
        test/udev-test.pl \
@@ -2714,6 +2722,14 @@ libsystemd-journal-uninstall-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:
+       -test -n "$(DESTDIR)" || journalctl --update-catalog
+
+INSTALL_DATA_HOOKS += \
+       catalog-update-hook
+
 noinst_PROGRAMS += \
        test-journal \
        test-journal-send \