tapset_DATA =
endif WITH_DTRACE_PROBES
RPC_PROBE_FILES =
-LOGROTATE_FILES_IN =
include security/Makefile.inc.am
include access/Makefile.inc.am
endif WITH_DTRACE_PROBES
-LOGROTATE_FILES := $(LOGROTATE_FILES_IN:remote/%.in=%)
-
-BUILT_SOURCES += $(LOGROTATE_FILES)
-
-%.logrotate: remote/%.logrotate.in
- $(AM_V_GEN)sed \
- -e 's|[@]localstatedir[@]|$(localstatedir)|g' \
- < $< > $@-t && \
- mv $@-t $@
-
-if WITH_LIBVIRTD
-install-logrotate: $(LOGROTATE_FILES)
- $(MKDIR_P) $(DESTDIR)$(sysconfdir)/logrotate.d/
- for f in $(LOGROTATE_FILES) ; \
- do \
- tgt=`echo $$f | sed -e 's/.logrotate//'`; \
- $(INSTALL_DATA) $$f \
- $(DESTDIR)$(sysconfdir)/logrotate.d/$$tgt; \
- done
-
-uninstall-logrotate:
- rm -f $(LOGROTATE_FILES:%.logrotate=$(DESTDIR)$(sysconfdir)/logrotate.d/%)
- rmdir $(DESTDIR)$(sysconfdir)/logrotate.d || :
-
-INSTALL_DATA_LOCAL += install-logrotate
-UNINSTALL_LOCAL += uninstall-logrotate
-endif WITH_LIBVIRTD
-
-
install-data-local: $(INSTALL_DATA_LOCAL) \
$(INSTALL_DATA_DIRS:%=install-data-%)
# vim: filetype=automake
-LOGROTATE_FILES_IN += \
- remote/libvirtd.qemu.logrotate.in \
- remote/libvirtd.lxc.logrotate.in \
- remote/libvirtd.libxl.logrotate.in \
- remote/libvirtd.logrotate.in \
- $(NULL)
-
if WITH_LIBVIRTD
if WITH_SYSCTL
libvirtd_socket_conflicts = ' '.join(libvirtd_socket_unit_files)
+logrotate_files = [
+ 'libvirtd.qemu',
+ 'libvirtd.lxc',
+ 'libvirtd.libxl',
+ 'libvirtd',
+]
+
if conf.has('WITH_REMOTE')
remote_driver_lib = static_library(
'virt_remote_driver',
virt_install_dirs += [
localstatedir / 'log' / 'libvirt',
]
+
+ logrotate_conf = configuration_data()
+ logrotate_conf.set('localstatedir', localstatedir)
+
+ foreach name : logrotate_files
+ log_file = configure_file(
+ input: '@0@.logrotate.in'.format(name),
+ output: '@0@.logrotate'.format(name),
+ configuration: logrotate_conf,
+ )
+ install_data(
+ log_file,
+ install_dir: sysconfdir / 'logrotate.d',
+ rename: [ name ],
+ )
+ endforeach
endif
endif