The make logic assumes that the SYSTEMD_UNIT_FILES var can be built from
SYSTEMD_UNIT_FILES_IN by simply dropping the directory prefix and the
.in suffix.
This won't work in future when a single .in unit file can be used to
generate multiple different units.
Reviewed-by: Andrea Bolognani <abologna(a)redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
src/Makefile.am | 2 +-
src/locking/Makefile.inc.am | 5 ++++-
src/logging/Makefile.inc.am | 5 ++++-
src/remote/Makefile.inc.am | 5 ++++-
4 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index b4544b12a7..5bbd85ecef 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -82,6 +82,7 @@ RPC_PROBE_FILES =
LOGROTATE_FILES_IN =
PODFILES =
MANINFILES =
+SYSTEMD_UNIT_FILES =
SYSTEMD_UNIT_FILES_IN =
SYSCONF_FILES =
sbin_PROGRAMS =
@@ -838,7 +839,6 @@ if WITH_LIBVIRTD
if LIBVIRT_INIT_SCRIPT_SYSTEMD
SYSTEMD_UNIT_DIR = $(prefix)/lib/systemd/system
-SYSTEMD_UNIT_FILES = $(notdir $(SYSTEMD_UNIT_FILES_IN:%.in=%))
BUILT_SOURCES += $(SYSTEMD_UNIT_FILES)
DISTCLEANFILES += $(SYSTEMD_UNIT_FILES)
diff --git a/src/locking/Makefile.inc.am b/src/locking/Makefile.inc.am
index bc1a05549a..37d0e79f40 100644
--- a/src/locking/Makefile.inc.am
+++ b/src/locking/Makefile.inc.am
@@ -77,12 +77,15 @@ MANINFILES += virtlockd.8.in
CLEANFILES += $(man8_MANS)
MAINTAINERCLEANFILES += $(MANINFILES)
-SYSTEMD_UNIT_FILES_IN += \
+VIRTLOCKD_UNIT_FILES_IN = \
locking/virtlockd.service.in \
locking/virtlockd.socket.in \
locking/virtlockd-admin.socket.in \
$(NULL)
+SYSTEMD_UNIT_FILES += $(notdir $(VIRTLOCKD_UNIT_FILES_IN:%.in=%))
+SYSTEMD_UNIT_FILES_IN += $(VIRTLOCKD_UNIT_FILES_IN)
+
lockdriverdir = $(libdir)/libvirt/lock-driver
lockdriver_LTLIBRARIES =
diff --git a/src/logging/Makefile.inc.am b/src/logging/Makefile.inc.am
index 18772fde2f..b952021d00 100644
--- a/src/logging/Makefile.inc.am
+++ b/src/logging/Makefile.inc.am
@@ -50,12 +50,15 @@ PODFILES += logging/virtlogd.pod
MANINFILES += virtlogd.8.in
SYSCONF_FILES += logging/virtlogd.sysconf
-SYSTEMD_UNIT_FILES_IN += \
+VIRTLOGD_UNIT_FILES_IN = \
logging/virtlogd.service.in \
logging/virtlogd.socket.in \
logging/virtlogd-admin.socket.in \
$(NULL)
+SYSTEMD_UNIT_FILES += $(notdir $(VIRTLOGD_UNIT_FILES_IN:%.in=%))
+SYSTEMD_UNIT_FILES_IN += $(VIRTLOGD_UNIT_FILES_IN)
+
if WITH_LIBVIRTD
sbin_PROGRAMS += virtlogd
diff --git a/src/remote/Makefile.inc.am b/src/remote/Makefile.inc.am
index 0e9c0b9e1b..c9c3c7203a 100644
--- a/src/remote/Makefile.inc.am
+++ b/src/remote/Makefile.inc.am
@@ -89,7 +89,7 @@ SYSCONF_FILES += remote/libvirtd.sysconf
PODFILES += remote/libvirtd.pod
MANINFILES += libvirtd.8.in
-SYSTEMD_UNIT_FILES_IN += \
+LIBVIRTD_UNIT_FILES_IN = \
remote/libvirtd.service.in \
remote/libvirtd.socket.in \
remote/libvirtd-ro.socket.in \
@@ -99,6 +99,9 @@ SYSTEMD_UNIT_FILES_IN += \
remote/virt-guest-shutdown.target.in \
$(NULL)
+SYSTEMD_UNIT_FILES += $(notdir $(LIBVIRTD_UNIT_FILES_IN:%.in=%))
+SYSTEMD_UNIT_FILES_IN += $(LIBVIRTD_UNIT_FILES_IN)
+
REMOTE_PROTOCOL = $(srcdir)/remote/remote_protocol.x
LXC_PROTOCOL = $(srcdir)/remote/lxc_protocol.x
QEMU_PROTOCOL = $(srcdir)/remote/qemu_protocol.x
--
2.21.0