+++ /dev/null
-## Process this file with automake to produce Makefile.in
-
-## Copyright (C) 2005-2015 Red Hat, Inc.
-##
-## This library is free software; you can redistribute it and/or
-## modify it under the terms of the GNU Lesser General Public
-## License as published by the Free Software Foundation; either
-## version 2.1 of the License, or (at your option) any later version.
-##
-## This library is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-## Lesser General Public License for more details.
-##
-## You should have received a copy of the GNU Lesser General Public
-## License along with this library. If not, see
-## <http://www.gnu.org/licenses/>.
-
-CLEANFILES =
-
-DISTCLEANFILES =
-EXTRA_DIST = \
- libvirtd.logrotate.in \
- libvirtd.qemu.logrotate.in \
- libvirtd.lxc.logrotate.in \
- libvirtd.libxl.logrotate.in \
- libvirtd.uml.logrotate.in \
- $(NULL)
-
-BUILT_SOURCES =
-
-if WITH_LIBVIRTD
-
-
-
-install-data-local: install-logrotate
- $(MKDIR_P) $(DESTDIR)$(localstatedir)/log/libvirt \
- $(DESTDIR)$(localstatedir)/run/libvirt \
- $(DESTDIR)$(localstatedir)/lib/libvirt
-
-uninstall-local:: uninstall-logrotate
- rmdir $(DESTDIR)$(localstatedir)/log/libvirt || :
- rmdir $(DESTDIR)$(localstatedir)/run/libvirt || :
- rmdir $(DESTDIR)$(localstatedir)/lib/libvirt || :
-
-LOGROTATE_CONFS = libvirtd.qemu.logrotate libvirtd.lxc.logrotate \
- libvirtd.libxl.logrotate libvirtd.uml.logrotate \
- libvirtd.logrotate
-
-BUILT_SOURCES += $(LOGROTATE_CONFS)
-
-libvirtd.logrotate: libvirtd.logrotate.in
- $(AM_V_GEN)sed \
- -e 's|[@]localstatedir[@]|$(localstatedir)|g' \
- < $< > $@-t && \
- mv $@-t $@
-
-libvirtd.qemu.logrotate: libvirtd.qemu.logrotate.in
- $(AM_V_GEN)sed \
- -e 's|[@]localstatedir[@]|$(localstatedir)|g' \
- < $< > $@-t && \
- mv $@-t $@
-
-libvirtd.lxc.logrotate: libvirtd.lxc.logrotate.in
- $(AM_V_GEN)sed \
- -e 's|[@]localstatedir[@]|$(localstatedir)|g' \
- < $< > $@-t && \
- mv $@-t $@
-
-libvirtd.libxl.logrotate: libvirtd.libxl.logrotate.in
- $(AM_V_GEN)sed \
- -e 's|[@]localstatedir[@]|$(localstatedir)|g' \
- < $< > $@-t && \
- mv $@-t $@
-
-libvirtd.uml.logrotate: libvirtd.uml.logrotate.in
- $(AM_V_GEN)sed \
- -e 's|[@]localstatedir[@]|$(localstatedir)|g' \
- < $< > $@-t && \
- mv $@-t $@
-
-install-logrotate: $(LOGROTATE_CONFS)
- $(MKDIR_P) $(DESTDIR)$(localstatedir)/log/libvirt/qemu/ \
- $(DESTDIR)$(localstatedir)/log/libvirt/lxc/ \
- $(DESTDIR)$(localstatedir)/log/libvirt/uml/ \
- $(DESTDIR)$(sysconfdir)/logrotate.d/
- $(INSTALL_DATA) libvirtd.logrotate \
- $(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd
- $(INSTALL_DATA) libvirtd.qemu.logrotate \
- $(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.qemu
- $(INSTALL_DATA) libvirtd.lxc.logrotate \
- $(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.lxc
- $(INSTALL_DATA) libvirtd.libxl.logrotate \
- $(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.libxl
- $(INSTALL_DATA) libvirtd.uml.logrotate \
- $(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.uml
-
-uninstall-logrotate:
- rm -f $(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd \
- $(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.qemu \
- $(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.lxc \
- $(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.libxl \
- $(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.uml
- rmdir $(DESTDIR)$(localstatedir)/log/libvirt/qemu || :
- rmdir $(DESTDIR)$(localstatedir)/log/libvirt/lxc || :
- rmdir $(DESTDIR)$(localstatedir)/log/libvirt/uml || :
- rmdir $(DESTDIR)$(sysconfdir)/logrotate.d || :
-
-else ! WITH_LIBVIRTD
-install-data-local:
-uninstall-local::
-endif ! WITH_LIBVIRTD
-
-
-CLEANFILES += $(BUILT_SOURCES)
-CLEANFILES += *.cov *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda
EXTRA_DIST += $(SYSVINIT_FILES_IN)
+LOGROTATE_FILES_IN = \
+ remote/libvirtd.qemu.logrotate.in \
+ remote/libvirtd.lxc.logrotate.in \
+ remote/libvirtd.libxl.logrotate.in \
+ remote/libvirtd.uml.logrotate.in \
+ remote/libvirtd.logrotate.in \
+ $(NULL)
+
+EXTRA_DIST += $(LOGROTATE_FILES_IN)
+
if WITH_LIBVIRTD
+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 $@
+
+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 || :
+
if WITH_SYSCTL
# Use $(prefix)/lib rather than $(libdir), since man sysctl.d insists on
# /usr/lib/sysctl.d/ even when libdir is /usr/lib64
uninstall-sysctl::
install-init::
uninstall-init::
+install-logrotate::
+uninstall-logrotate::
endif ! WITH_LIBVIRTD
# This is needed for clients too, so can't wrap in
install-data-local: install-init install-systemd install-upstart \
- install-sysctl install-polkit install-sasl
+ install-sysctl install-polkit install-sasl \
+ install-logrotate
if WITH_LIBVIRTD
+ $(MKDIR_P) "$(DESTDIR)$(localstatedir)/log/libvirt"
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/lockd"
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/lockd/files"
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/run/libvirt/lockd"
if WITH_LXC
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/lxc"
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/run/libvirt/lxc"
+ $(MKDIR_P) "$(DESTDIR)$(localstatedir)/log/libvirt/lxc"
endif WITH_LXC
if WITH_LIBXL
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/libxl"
if WITH_UML
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/uml"
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/run/libvirt/uml"
+ $(MKDIR_P) "$(DESTDIR)$(localstatedir)/log/libvirt/uml"
endif WITH_UML
if WITH_XEN
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/xen"
endif WITH_NETWORK
uninstall-local:: uninstall-init uninstall-systemd uninstall-upstart \
- uninstall-sysctl uninstall-polkit uninstall-sasl
+ uninstall-sysctl uninstall-polkit uninstall-sasl \
+ uninstall-logrotate
if WITH_LIBVIRTD
+ rmdir "$(DESTDIR)$(localstatedir)/log/libvirt" ||:
rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/lockd/files" ||:
rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/lockd" ||:
rmdir "$(DESTDIR)$(localstatedir)/run/libvirt/lockd" ||:
if WITH_LXC
rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/lxc" ||:
rmdir "$(DESTDIR)$(localstatedir)/run/libvirt/lxc" ||:
+ rmdir "$(DESTDIR)$(localstatedir)/log/libvirt/lxc" ||:
endif WITH_LXC
if WITH_LIBXL
rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/libxl" ||:
if WITH_UML
rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/uml" ||:
rmdir "$(DESTDIR)$(localstatedir)/run/libvirt/uml" ||:
+ rmdir "$(DESTDIR)$(localstatedir)/log/libvirt/uml" ||:
endif WITH_UML
if WITH_XEN
rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/xen" ||: