2014-01-17 14:11:58 +02:00
|
|
|
## Copyright (C) 2005-2014 Red Hat, Inc.
|
2013-05-14 17:42:12 -06:00
|
|
|
##
|
|
|
|
|
## 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/>.
|
2009-04-19 15:10:45 +00:00
|
|
|
|
2011-07-28 14:55:21 +02:00
|
|
|
INCLUDES = \
|
2012-02-02 13:20:09 -07:00
|
|
|
-I$(top_builddir)/include -I$(top_srcdir)/include \
|
|
|
|
|
-I$(top_builddir)/gnulib/lib -I$(top_srcdir)/gnulib/lib \
|
|
|
|
|
-I$(top_builddir)/src -I$(top_srcdir)/src \
|
|
|
|
|
-I$(top_srcdir)/src/util \
|
|
|
|
|
-I$(top_srcdir) \
|
2011-07-28 14:55:21 +02:00
|
|
|
$(GETTEXT_CPPFLAGS)
|
|
|
|
|
|
2013-08-20 11:20:46 +02:00
|
|
|
AM_LDFLAGS = \
|
|
|
|
|
$(RELRO_LDFLAGS) \
|
2013-08-13 13:49:05 +02:00
|
|
|
$(NO_INDIRECT_LDFLAGS) \
|
2013-08-20 11:20:46 +02:00
|
|
|
$(NULL)
|
|
|
|
|
|
2009-09-16 12:01:53 +01:00
|
|
|
POD2MAN = pod2man -c "Virtualization Support" -r "$(PACKAGE)-$(VERSION)"
|
|
|
|
|
|
|
|
|
|
ICON_FILES = \
|
|
|
|
|
libvirt_win_icon_16x16.ico \
|
|
|
|
|
libvirt_win_icon_32x32.ico \
|
|
|
|
|
libvirt_win_icon_48x48.ico \
|
|
|
|
|
libvirt_win_icon_64x64.ico \
|
|
|
|
|
virsh_win_icon.rc
|
|
|
|
|
|
2010-08-25 14:07:26 +02:00
|
|
|
EXTRA_DIST = \
|
2010-12-21 08:58:03 -07:00
|
|
|
$(ICON_FILES) \
|
2013-08-17 15:02:25 -04:00
|
|
|
$(conf_DATA) \
|
2010-12-21 08:58:03 -07:00
|
|
|
virt-xml-validate.in \
|
|
|
|
|
virt-pki-validate.in \
|
2011-06-14 09:29:00 +01:00
|
|
|
virt-sanlock-cleanup.in \
|
2011-06-28 21:54:35 -06:00
|
|
|
virt-sanlock-cleanup.8 \
|
2013-08-08 16:36:31 +01:00
|
|
|
virt-login-shell.pod \
|
2010-08-25 14:07:26 +02:00
|
|
|
virsh.pod \
|
2012-07-31 11:52:13 +08:00
|
|
|
libvirt-guests.sysconf \
|
|
|
|
|
virsh-edit.c \
|
|
|
|
|
virsh-domain.c \
|
|
|
|
|
virsh-domain-monitor.c \
|
|
|
|
|
virsh-host.c virsh-interface.c \
|
|
|
|
|
virsh-network.c virsh-nodedev.c \
|
|
|
|
|
virsh-nwfilter.c virsh-pool.c \
|
|
|
|
|
virsh-secret.c virsh-snapshot.c \
|
|
|
|
|
virsh-volume.c
|
|
|
|
|
|
|
|
|
|
|
2009-09-16 12:01:53 +01:00
|
|
|
|
2011-10-11 15:10:17 -06:00
|
|
|
DISTCLEANFILES =
|
|
|
|
|
|
2013-08-08 16:36:31 +01:00
|
|
|
confdir = $(sysconfdir)/libvirt
|
2013-08-30 13:58:59 -06:00
|
|
|
conf_DATA =
|
2013-08-08 16:36:31 +01:00
|
|
|
|
2009-09-16 14:42:57 +01:00
|
|
|
bin_SCRIPTS = virt-xml-validate virt-pki-validate
|
2013-08-30 13:58:59 -06:00
|
|
|
bin_PROGRAMS = virsh virt-host-validate
|
2012-10-20 22:29:51 -04:00
|
|
|
libexec_SCRIPTS = libvirt-guests.sh
|
2009-09-16 12:01:53 +01:00
|
|
|
|
2012-09-20 12:58:07 +01:00
|
|
|
if WITH_SANLOCK
|
2011-06-14 09:29:00 +01:00
|
|
|
sbin_SCRIPTS = virt-sanlock-cleanup
|
2011-10-11 15:10:17 -06:00
|
|
|
DISTCLEANFILES += virt-sanlock-cleanup
|
2013-09-03 20:39:16 -06:00
|
|
|
endif WITH_SANLOCK
|
2009-09-16 12:01:53 +01:00
|
|
|
|
2013-08-30 13:58:59 -06:00
|
|
|
if WITH_LXC
|
|
|
|
|
conf_DATA += virt-login-shell.conf
|
|
|
|
|
bin_PROGRAMS += virt-login-shell
|
2013-09-27 21:21:02 -06:00
|
|
|
else ! WITH_LXC
|
|
|
|
|
EXTRA_DIST += virt-login-shell.conf
|
|
|
|
|
endif ! WITH_LXC
|
2013-08-30 13:58:59 -06:00
|
|
|
|
|
|
|
|
|
2012-01-10 17:31:21 +00:00
|
|
|
dist_man1_MANS = \
|
|
|
|
|
virt-host-validate.1 \
|
|
|
|
|
virt-pki-validate.1 \
|
|
|
|
|
virt-xml-validate.1 \
|
|
|
|
|
virsh.1
|
2013-08-30 13:58:59 -06:00
|
|
|
if WITH_LXC
|
|
|
|
|
dist_man1_MANS += virt-login-shell.1
|
2013-09-27 21:21:02 -06:00
|
|
|
else ! WITH_LXC
|
|
|
|
|
EXTRA_DIST += virt-login-shell.1
|
|
|
|
|
endif ! WITH_LXC
|
2012-09-20 12:58:07 +01:00
|
|
|
if WITH_SANLOCK
|
2011-06-14 09:29:00 +01:00
|
|
|
dist_man8_MANS = virt-sanlock-cleanup.8
|
2013-09-03 20:39:16 -06:00
|
|
|
endif WITH_SANLOCK
|
2009-04-19 15:10:45 +00:00
|
|
|
|
|
|
|
|
virt-xml-validate: virt-xml-validate.in Makefile
|
2013-08-19 16:26:41 -06:00
|
|
|
$(AM_V_GEN)sed -e 's|[@]schemadir@|$(pkgdatadir)/schemas|g' \
|
|
|
|
|
-e 's|[@]VERSION@|$(VERSION)|g' \
|
|
|
|
|
< $< > $@ || (rm $@ && exit 1) && chmod +x $@
|
2009-04-19 15:10:45 +00:00
|
|
|
|
2013-01-29 11:32:41 +01:00
|
|
|
virt-xml-validate.1: virt-xml-validate.in $(top_srcdir)/configure.ac
|
2012-10-26 09:06:54 -06:00
|
|
|
$(AM_V_GEN)$(POD2MAN) --name VIRT-XML-VALIDATE $< $(srcdir)/$@ \
|
|
|
|
|
&& if grep 'POD ERROR' $(srcdir)/$@ ; then \
|
2012-10-26 15:27:25 -06:00
|
|
|
rm $(srcdir)/$@; exit 1; fi
|
2009-09-16 12:01:53 +01:00
|
|
|
|
2009-09-16 14:42:57 +01:00
|
|
|
virt-pki-validate: virt-pki-validate.in Makefile
|
2013-08-19 16:38:57 -06:00
|
|
|
$(AM_V_GEN)sed -e 's|[@]sysconfdir@|$(sysconfdir)|g' \
|
|
|
|
|
-e 's|[@]VERSION@|$(VERSION)|g' \
|
|
|
|
|
< $< > $@ || (rm $@ && exit 1) && chmod +x $@
|
2009-09-16 12:01:53 +01:00
|
|
|
|
2013-01-29 11:32:41 +01:00
|
|
|
virt-pki-validate.1: virt-pki-validate.in $(top_srcdir)/configure.ac
|
2012-10-26 09:06:54 -06:00
|
|
|
$(AM_V_GEN)$(POD2MAN) --name VIRT-PKI-VALIDATE $< $(srcdir)/$@ \
|
|
|
|
|
&& if grep 'POD ERROR' $(srcdir)/$@ ; then \
|
2012-10-26 15:27:25 -06:00
|
|
|
rm $(srcdir)/$@; exit 1; fi
|
2009-09-16 12:01:53 +01:00
|
|
|
|
2013-01-29 11:32:41 +01:00
|
|
|
virt-host-validate.1: virt-host-validate.c $(top_srcdir)/configure.ac
|
2012-10-26 09:06:54 -06:00
|
|
|
$(AM_V_GEN)$(POD2MAN) --name VIRT-HOST-VALIDATE $< $(srcdir)/$@ \
|
|
|
|
|
&& if grep 'POD ERROR' $(srcdir)/$@ ; then \
|
2012-10-26 15:27:25 -06:00
|
|
|
rm $(srcdir)/$@; exit 1; fi
|
2012-01-10 17:31:21 +00:00
|
|
|
|
2011-06-14 09:29:00 +01:00
|
|
|
virt-sanlock-cleanup: virt-sanlock-cleanup.in Makefile
|
2013-01-04 13:35:04 -07:00
|
|
|
$(AM_V_GEN)sed -e 's|[@]sysconfdir@|$(sysconfdir)|' \
|
|
|
|
|
-e 's|[@]localstatedir@|$(localstatedir)|' < $< > $@ \
|
2011-06-14 09:29:00 +01:00
|
|
|
|| (rm $@ && exit 1) && chmod +x $@
|
|
|
|
|
|
2013-01-29 11:32:41 +01:00
|
|
|
virt-sanlock-cleanup.8: virt-sanlock-cleanup.in $(top_srcdir)/configure.ac
|
2013-07-02 23:15:53 +02:00
|
|
|
$(AM_V_GEN)$(POD2MAN) --name VIRT-SANLOCK-CLEANUP --section=8 \
|
|
|
|
|
$< $(srcdir)/$@ \
|
2012-10-26 09:06:54 -06:00
|
|
|
&& if grep 'POD ERROR' $(srcdir)/$@ ; then \
|
2012-10-26 15:27:25 -06:00
|
|
|
rm $(srcdir)/$@; exit 1; fi
|
2011-06-14 09:29:00 +01:00
|
|
|
|
2012-01-10 17:31:21 +00:00
|
|
|
virt_host_validate_SOURCES = \
|
|
|
|
|
virt-host-validate.c \
|
|
|
|
|
virt-host-validate-common.c virt-host-validate-common.h \
|
|
|
|
|
virt-host-validate-qemu.c virt-host-validate-qemu.h \
|
|
|
|
|
virt-host-validate-lxc.c virt-host-validate-lxc.h \
|
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
|
|
virt_host_validate_LDFLAGS = \
|
2013-08-20 11:20:46 +02:00
|
|
|
$(AM_LDFLAGS) \
|
2013-04-03 11:32:15 +01:00
|
|
|
$(PIE_LDFLAGS) \
|
2012-01-10 17:31:21 +00:00
|
|
|
$(COVERAGE_LDFLAGS) \
|
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
|
|
virt_host_validate_LDADD = \
|
|
|
|
|
../src/libvirt.la \
|
|
|
|
|
../gnulib/lib/libgnu.la \
|
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
|
|
virt_host_validate_CFLAGS = \
|
2014-03-28 12:38:43 -06:00
|
|
|
$(LIBXML_CFLAGS) \
|
2012-01-10 17:31:21 +00:00
|
|
|
$(WARN_CFLAGS) \
|
2013-04-03 11:32:15 +01:00
|
|
|
$(PIE_CFLAGS) \
|
2012-01-10 17:31:21 +00:00
|
|
|
$(COVERAGE_CFLAGS) \
|
|
|
|
|
$(NULL)
|
|
|
|
|
|
2013-10-10 13:09:08 +01:00
|
|
|
# Since virt-login-shell will be setuid, we must do everything
|
|
|
|
|
# we can to avoid linking to other libraries. Many of them do
|
|
|
|
|
# unsafe things in functions marked __atttribute__((constructor)).
|
|
|
|
|
# This we statically link to a library containing only the minimal
|
|
|
|
|
# libvirt client code, not libvirt.so itself.
|
2013-08-08 16:36:31 +01:00
|
|
|
virt_login_shell_SOURCES = \
|
|
|
|
|
virt-login-shell.c
|
|
|
|
|
|
2013-08-20 11:20:46 +02:00
|
|
|
virt_login_shell_LDFLAGS = \
|
|
|
|
|
$(AM_LDFLAGS) \
|
|
|
|
|
$(COVERAGE_LDFLAGS) \
|
|
|
|
|
$(NULL)
|
2013-08-08 16:36:31 +01:00
|
|
|
virt_login_shell_LDADD = \
|
|
|
|
|
$(STATIC_BINARIES) \
|
|
|
|
|
$(PIE_LDFLAGS) \
|
2013-10-10 13:09:08 +01:00
|
|
|
../src/libvirt-setuid-rpc-client.la \
|
2013-08-08 16:36:31 +01:00
|
|
|
../gnulib/lib/libgnu.la
|
|
|
|
|
|
|
|
|
|
virt_login_shell_CFLAGS = \
|
2013-10-10 13:09:08 +01:00
|
|
|
-DLIBVIRT_SETUID_RPC_CLIENT \
|
2014-03-28 12:38:43 -06:00
|
|
|
$(LIBXML_CFLAGS) \
|
2013-08-08 16:36:31 +01:00
|
|
|
$(WARN_CFLAGS) \
|
|
|
|
|
$(PIE_CFLAGS) \
|
|
|
|
|
$(COVERAGE_CFLAGS)
|
|
|
|
|
|
2009-09-16 12:01:53 +01:00
|
|
|
virsh_SOURCES = \
|
2012-08-17 21:16:04 -06:00
|
|
|
virsh.c virsh.h \
|
2013-08-26 11:53:43 +02:00
|
|
|
virsh-console.c virsh-console.h \
|
2012-08-17 22:00:42 -06:00
|
|
|
virsh-domain.c virsh-domain.h \
|
2012-08-20 07:46:38 -06:00
|
|
|
virsh-domain-monitor.c virsh-domain-monitor.h \
|
2012-08-20 14:01:45 -06:00
|
|
|
virsh-host.c virsh-host.h \
|
2012-08-20 14:30:53 -06:00
|
|
|
virsh-interface.c virsh-interface.h \
|
2012-08-20 15:43:25 -06:00
|
|
|
virsh-network.c virsh-network.h \
|
2012-08-20 16:23:10 -06:00
|
|
|
virsh-nodedev.c virsh-nodedev.h \
|
2012-08-20 16:56:03 -06:00
|
|
|
virsh-nwfilter.c virsh-nwfilter.h \
|
2012-08-20 16:56:53 -06:00
|
|
|
virsh-pool.c virsh-pool.h \
|
2012-08-20 17:14:37 -06:00
|
|
|
virsh-secret.c virsh-secret.h \
|
2012-08-20 17:29:03 -06:00
|
|
|
virsh-snapshot.c virsh-snapshot.h \
|
2012-08-20 17:41:24 -06:00
|
|
|
virsh-volume.c virsh-volume.h \
|
2012-08-17 21:16:04 -06:00
|
|
|
$(NULL)
|
2009-09-16 12:01:53 +01:00
|
|
|
|
2013-08-20 11:20:46 +02:00
|
|
|
virsh_LDFLAGS = \
|
|
|
|
|
$(AM_LDFLAGS) \
|
|
|
|
|
$(COVERAGE_LDFLAGS) \
|
|
|
|
|
$(NULL)
|
2009-09-16 12:01:53 +01:00
|
|
|
virsh_LDADD = \
|
|
|
|
|
$(STATIC_BINARIES) \
|
2013-04-03 11:32:15 +01:00
|
|
|
$(PIE_LDFLAGS) \
|
2009-09-16 12:01:53 +01:00
|
|
|
../src/libvirt.la \
|
2012-12-21 16:51:33 +00:00
|
|
|
../src/libvirt-lxc.la \
|
2010-04-13 14:08:59 -04:00
|
|
|
../src/libvirt-qemu.la \
|
2009-09-16 12:01:53 +01:00
|
|
|
../gnulib/lib/libgnu.la \
|
2011-03-08 19:24:28 +01:00
|
|
|
$(LIBXML_LIBS) \
|
2009-09-16 12:01:53 +01:00
|
|
|
$(VIRSH_LIBS)
|
2010-05-14 16:45:52 -06:00
|
|
|
virsh_CFLAGS = \
|
2010-03-16 11:51:36 +01:00
|
|
|
$(WARN_CFLAGS) \
|
2013-04-03 11:32:15 +01:00
|
|
|
$(PIE_CFLAGS) \
|
2009-09-16 12:01:53 +01:00
|
|
|
$(COVERAGE_CFLAGS) \
|
|
|
|
|
$(LIBXML_CFLAGS) \
|
|
|
|
|
$(READLINE_CFLAGS)
|
2012-05-17 17:08:53 +02:00
|
|
|
BUILT_SOURCES =
|
2009-09-16 12:01:53 +01:00
|
|
|
|
|
|
|
|
if WITH_WIN_ICON
|
|
|
|
|
virsh_LDADD += virsh_win_icon.$(OBJEXT)
|
|
|
|
|
|
|
|
|
|
# Before you edit virsh_win_icon.rc, please note the following
|
|
|
|
|
# limitations of the resource file format:
|
|
|
|
|
#
|
|
|
|
|
# (1) '..' is not permitted in the icon filename field.
|
|
|
|
|
# (2) '-' is not permitted in the icon filename field.
|
|
|
|
|
# (3) Comments are not permitted in the file.
|
|
|
|
|
#
|
|
|
|
|
# Windows appears to choose the first <= 32x32 icon it finds
|
|
|
|
|
# in the resource file. Therefore you should list the available
|
|
|
|
|
# icons from largest to smallest, and make sure that the 32x32
|
|
|
|
|
# icon is the most legible.
|
|
|
|
|
#
|
|
|
|
|
# Windows .ICO is a special MS-only format. GIMP and other
|
|
|
|
|
# tools can write it. However there are several variations,
|
|
|
|
|
# and Windows seems to do its own colour quantization. More
|
|
|
|
|
# information is needed in this area.
|
|
|
|
|
|
|
|
|
|
virsh_win_icon.$(OBJEXT): virsh_win_icon.rc
|
2010-03-31 13:10:08 +01:00
|
|
|
$(AM_V_GEN)$(WINDRES) \
|
2009-09-16 12:01:53 +01:00
|
|
|
--input-format rc --input $< \
|
|
|
|
|
--output-format coff --output $@
|
2013-09-03 20:39:16 -06:00
|
|
|
endif WITH_WIN_ICON
|
2009-09-16 12:01:53 +01:00
|
|
|
|
2013-08-08 16:36:31 +01:00
|
|
|
virt-login-shell.1: virt-login-shell.pod $(top_srcdir)/configure.ac
|
|
|
|
|
$(AM_V_GEN)$(POD2MAN) $< $(srcdir)/$@ \
|
|
|
|
|
&& if grep 'POD ERROR' $(srcdir)/$@ ; then \
|
|
|
|
|
rm $(srcdir)/$@; exit 1; fi
|
|
|
|
|
|
2013-01-29 11:32:41 +01:00
|
|
|
virsh.1: virsh.pod $(top_srcdir)/configure.ac
|
2012-10-26 09:06:54 -06:00
|
|
|
$(AM_V_GEN)$(POD2MAN) $< $(srcdir)/$@ \
|
|
|
|
|
&& if grep 'POD ERROR' $(srcdir)/$@ ; then \
|
2012-10-26 15:27:25 -06:00
|
|
|
rm $(srcdir)/$@; exit 1; fi
|
2009-04-19 15:10:45 +00:00
|
|
|
|
2011-12-08 13:30:24 +00:00
|
|
|
install-data-local: install-init install-systemd
|
2010-08-25 14:07:26 +02:00
|
|
|
|
2011-12-08 13:30:24 +00:00
|
|
|
uninstall-local: uninstall-init uninstall-systemd
|
2010-08-25 14:07:26 +02:00
|
|
|
|
2011-07-07 14:45:07 +01:00
|
|
|
install-sysconfig:
|
2011-12-09 11:06:19 -07:00
|
|
|
$(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig
|
2011-07-07 14:45:07 +01:00
|
|
|
$(INSTALL_DATA) $(srcdir)/libvirt-guests.sysconf \
|
|
|
|
|
$(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests
|
|
|
|
|
|
|
|
|
|
uninstall-sysconfig:
|
|
|
|
|
rm -f $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests
|
2011-12-09 11:06:19 -07:00
|
|
|
rmdir $(DESTDIR)$(sysconfdir)/sysconfig ||:
|
2011-07-07 14:45:07 +01:00
|
|
|
|
2012-10-20 22:29:51 -04:00
|
|
|
EXTRA_DIST += libvirt-guests.sh.in libvirt-guests.init.in
|
2011-07-07 14:45:07 +01:00
|
|
|
|
2011-12-08 13:30:24 +00:00
|
|
|
install-initscript: libvirt-guests.init
|
2011-12-09 11:06:19 -07:00
|
|
|
$(MKDIR_P) $(DESTDIR)$(sysconfdir)/rc.d/init.d
|
2010-08-25 14:07:26 +02:00
|
|
|
$(INSTALL_SCRIPT) libvirt-guests.init \
|
|
|
|
|
$(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirt-guests
|
|
|
|
|
|
2011-12-08 13:30:24 +00:00
|
|
|
uninstall-initscript:
|
2011-07-07 14:45:07 +01:00
|
|
|
rm -f $(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirt-guests
|
2011-12-09 11:06:19 -07:00
|
|
|
rmdir $(DESTDIR)$(sysconfdir)/rc.d/init.d ||:
|
2010-08-25 14:07:26 +02:00
|
|
|
|
2011-12-08 13:30:24 +00:00
|
|
|
|
|
|
|
|
if LIBVIRT_INIT_SCRIPT_RED_HAT
|
|
|
|
|
BUILT_SOURCES += libvirt-guests.init
|
|
|
|
|
install-init: install-sysconfig install-initscript
|
|
|
|
|
uninstall-init: uninstall-sysconfig uninstall-initscript
|
2013-09-03 20:39:16 -06:00
|
|
|
else ! LIBVIRT_INIT_SCRIPT_RED_HAT
|
2011-07-07 14:45:07 +01:00
|
|
|
install-init:
|
|
|
|
|
uninstall-init:
|
2013-09-03 20:39:16 -06:00
|
|
|
endif ! LIBVIRT_INIT_SCRIPT_RED_HAT
|
2011-07-07 14:45:07 +01:00
|
|
|
|
2012-10-20 22:29:51 -04:00
|
|
|
libvirt-guests.sh: libvirt-guests.sh.in $(top_builddir)/config.status
|
2013-01-04 13:35:04 -07:00
|
|
|
$(AM_V_GEN)sed \
|
|
|
|
|
-e 's|[@]PACKAGE[@]|$(PACKAGE)|g' \
|
|
|
|
|
-e 's|[@]bindir[@]|$(bindir)|g' \
|
|
|
|
|
-e 's|[@]localedir[@]|$(localedir)|g' \
|
|
|
|
|
-e 's|[@]localstatedir[@]|$(localstatedir)|g' \
|
|
|
|
|
-e 's|[@]sbindir[@]|$(sbindir)|g' \
|
|
|
|
|
-e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \
|
|
|
|
|
< $< > $@-t && \
|
|
|
|
|
chmod a+x $@-t && \
|
2010-08-25 14:07:26 +02:00
|
|
|
mv $@-t $@
|
2012-10-20 22:29:51 -04:00
|
|
|
BUILT_SOURCES += libvirt-guests.sh
|
2011-07-07 14:45:07 +01:00
|
|
|
|
2012-10-20 22:29:51 -04:00
|
|
|
libvirt-guests.init: libvirt-guests.init.in libvirt-guests.sh
|
|
|
|
|
$(AM_V_GEN)sed \
|
2013-01-04 13:35:04 -07:00
|
|
|
-e 's|[@]libexecdir[@]|$(libexecdir)|g' \
|
2012-10-20 22:29:51 -04:00
|
|
|
< $< > $@-t && \
|
|
|
|
|
chmod a+x $@-t && \
|
|
|
|
|
mv $@-t $@
|
2011-07-07 14:45:07 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
EXTRA_DIST += libvirt-guests.service.in
|
2014-01-17 14:11:58 +02:00
|
|
|
SYSTEMD_UNIT_DIR = $(prefix)/lib/systemd/system
|
2011-12-08 13:30:24 +00:00
|
|
|
|
2011-07-07 14:45:07 +01:00
|
|
|
if LIBVIRT_INIT_SCRIPT_SYSTEMD
|
2012-10-20 22:29:51 -04:00
|
|
|
install-systemd: libvirt-guests.service install-sysconfig libvirt-guests.sh
|
2011-12-09 11:06:19 -07:00
|
|
|
$(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR)
|
2012-06-26 09:53:33 +02:00
|
|
|
$(INSTALL_DATA) libvirt-guests.service \
|
2011-12-08 13:30:24 +00:00
|
|
|
$(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirt-guests.service
|
2011-07-07 14:45:07 +01:00
|
|
|
|
2012-10-20 22:29:51 -04:00
|
|
|
uninstall-systemd: uninstall-sysconfig
|
2011-12-08 13:30:24 +00:00
|
|
|
rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirt-guests.service
|
2011-12-09 11:06:19 -07:00
|
|
|
rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) ||:
|
2011-07-07 14:45:07 +01:00
|
|
|
|
|
|
|
|
BUILT_SOURCES += libvirt-guests.service
|
|
|
|
|
|
2013-09-03 20:39:16 -06:00
|
|
|
else ! LIBVIRT_INIT_SCRIPT_SYSTEMD
|
2011-07-07 14:45:07 +01:00
|
|
|
install-systemd:
|
|
|
|
|
uninstall-systemd:
|
2013-09-03 20:39:16 -06:00
|
|
|
endif ! LIBVIRT_INIT_SCRIPT_SYSTEMD
|
2011-07-07 14:45:07 +01:00
|
|
|
|
|
|
|
|
libvirt-guests.service: libvirt-guests.service.in $(top_builddir)/config.status
|
2013-01-04 13:35:04 -07:00
|
|
|
$(AM_V_GEN)sed \
|
|
|
|
|
-e 's|[@]PACKAGE[@]|$(PACKAGE)|g' \
|
|
|
|
|
-e 's|[@]bindir[@]|$(bindir)|g' \
|
|
|
|
|
-e 's|[@]localedir[@]|$(localedir)|g' \
|
|
|
|
|
-e 's|[@]localstatedir[@]|$(localstatedir)|g' \
|
|
|
|
|
-e 's|[@]sbindir[@]|$(sbindir)|g' \
|
|
|
|
|
-e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \
|
|
|
|
|
-e 's|[@]libexecdir[@]|$(libexecdir)|g' \
|
|
|
|
|
< $< > $@-t && \
|
2011-07-07 14:45:07 +01:00
|
|
|
mv $@-t $@
|
2010-08-25 14:07:26 +02:00
|
|
|
|
2009-04-19 15:10:45 +00:00
|
|
|
|
2011-02-16 15:43:24 -07:00
|
|
|
CLEANFILES = $(bin_SCRIPTS)
|
2010-11-17 10:38:59 -07:00
|
|
|
CLEANFILES += *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda *.i *.s
|
2011-02-16 15:43:24 -07:00
|
|
|
MAINTAINERCLEANFILES = $(dist_man1_MANS)
|
2009-04-19 15:10:45 +00:00
|
|
|
|
2011-10-11 15:10:17 -06:00
|
|
|
DISTCLEANFILES += $(BUILT_SOURCES)
|