--- a/Makefile.am
+++ b/Makefile.am
@@ -4560,12 +4560,6 @@ lib_LTLIBRARIES += \
 	libsystemd-id128.la \
 	libsystemd-daemon.la
 
-pkgconfiglib_DATA += \
-	src/compat-libs/libsystemd-journal.pc \
-	src/compat-libs/libsystemd-login.pc \
-	src/compat-libs/libsystemd-id128.pc \
-	src/compat-libs/libsystemd-daemon.pc
-
 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
 compat-lib-install-hook:
 	libname=libsystemd-login.so && $(move-to-rootlibdir)
@@ -4583,6 +4577,12 @@ INSTALL_EXEC_HOOKS += compat-lib-install
 UNINSTALL_EXEC_HOOKS += compat-lib-uninstall-hook
 endif
 
+pkgconfiglib_DATA += \
+	src/compat-libs/libsystemd-journal.pc \
+	src/compat-libs/libsystemd-login.pc \
+	src/compat-libs/libsystemd-id128.pc \
+	src/compat-libs/libsystemd-daemon.pc
+
 EXTRA_DIST += \
 	src/compat-libs/libsystemd-journal.pc.in \
 	src/compat-libs/libsystemd-login.pc.in \
