build: use common .in replacement mechanism
We had several different styles of .in conversion in our Makefiles:
ALLCAPS, @ALLCAPS@, @lower@, ::lower::
Canonicalize on one form, to make it easier to copy and paste
between .in files.
Also, we were using some non-portable sed constructs: \@ is an
undefined escape sequence (it happens to be @ itself in GNU sed,
but POSIX allows it to mean something else), as well as risky
behavior (failure to consistently quote things means a space
in $(sysconfdir) could throw things off; also, Autoconf recommends
using | rather than , or ! in the s||| operator, because | has to
be quoted in shell and is therefore less likely to appear in file
names than , or !).
Fix all of these uses to follow the same syntax.
* daemon/libvirtd.8.in: Switch to @var@.
* tools/virt-xml-validate.in: Likewise.
* tools/virt-pki-validate.in: Likewise.
* src/locking/virtlockd.init.in: Likewise.
* daemon/Makefile.am: Prefer | over ! in sed.
(libvirtd.8): Prefer consistent substitution.
(libvirtd.init, libvirtd.service): Avoid non-portable sed.
* tools/Makefile.am (libvirt-guests.sh, libvirt-guests.init)
(libvirt-guests.service): Likewise.
(virt-xml-validate, virt-pki-validate, virt-sanlock-cleanup):
Prefer consistent capitalization.
* src/Makefile.am (virtlockd.init, virtlockd.service)
(virtlockd.socket): Prefer consistent substitution.
2013-01-04 20:35:04 +00:00
|
|
|
## Copyright (C) 2005-2013 Red Hat, Inc.
|
2011-07-28 18:56:24 +00:00
|
|
|
## See COPYING.LIB for the License of this software
|
2009-04-19 15:10:45 +00:00
|
|
|
|
2011-07-28 12:55:21 +00:00
|
|
|
INCLUDES = \
|
2012-02-02 20:20:09 +00: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 12:55:21 +00:00
|
|
|
$(GETTEXT_CPPFLAGS)
|
|
|
|
|
2009-09-16 11:01:53 +00: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 12:07:26 +00:00
|
|
|
EXTRA_DIST = \
|
2010-12-21 15:58:03 +00:00
|
|
|
$(ICON_FILES) \
|
|
|
|
virt-xml-validate.in \
|
|
|
|
virt-pki-validate.in \
|
2011-06-14 08:29:00 +00:00
|
|
|
virt-sanlock-cleanup.in \
|
2011-06-29 03:54:35 +00:00
|
|
|
virt-sanlock-cleanup.8 \
|
2010-08-25 12:07:26 +00:00
|
|
|
virsh.pod \
|
2012-07-31 03:52:13 +00: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 11:01:53 +00:00
|
|
|
|
2011-10-11 21:10:17 +00:00
|
|
|
DISTCLEANFILES =
|
|
|
|
|
2009-09-16 13:42:57 +00:00
|
|
|
bin_SCRIPTS = virt-xml-validate virt-pki-validate
|
2012-01-10 17:31:21 +00:00
|
|
|
bin_PROGRAMS = virsh virt-host-validate
|
2012-10-21 02:29:51 +00:00
|
|
|
libexec_SCRIPTS = libvirt-guests.sh
|
2009-09-16 11:01:53 +00:00
|
|
|
|
2011-06-14 08:29:00 +00:00
|
|
|
if HAVE_SANLOCK
|
|
|
|
sbin_SCRIPTS = virt-sanlock-cleanup
|
2011-10-11 21:10:17 +00:00
|
|
|
DISTCLEANFILES += virt-sanlock-cleanup
|
2011-06-14 08:29:00 +00:00
|
|
|
endif
|
2009-09-16 11:01:53 +00: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
|
2011-06-14 08:29:00 +00:00
|
|
|
if HAVE_SANLOCK
|
|
|
|
dist_man8_MANS = virt-sanlock-cleanup.8
|
|
|
|
endif
|
2009-04-19 15:10:45 +00:00
|
|
|
|
|
|
|
virt-xml-validate: virt-xml-validate.in Makefile
|
build: use common .in replacement mechanism
We had several different styles of .in conversion in our Makefiles:
ALLCAPS, @ALLCAPS@, @lower@, ::lower::
Canonicalize on one form, to make it easier to copy and paste
between .in files.
Also, we were using some non-portable sed constructs: \@ is an
undefined escape sequence (it happens to be @ itself in GNU sed,
but POSIX allows it to mean something else), as well as risky
behavior (failure to consistently quote things means a space
in $(sysconfdir) could throw things off; also, Autoconf recommends
using | rather than , or ! in the s||| operator, because | has to
be quoted in shell and is therefore less likely to appear in file
names than , or !).
Fix all of these uses to follow the same syntax.
* daemon/libvirtd.8.in: Switch to @var@.
* tools/virt-xml-validate.in: Likewise.
* tools/virt-pki-validate.in: Likewise.
* src/locking/virtlockd.init.in: Likewise.
* daemon/Makefile.am: Prefer | over ! in sed.
(libvirtd.8): Prefer consistent substitution.
(libvirtd.init, libvirtd.service): Avoid non-portable sed.
* tools/Makefile.am (libvirt-guests.sh, libvirt-guests.init)
(libvirt-guests.service): Likewise.
(virt-xml-validate, virt-pki-validate, virt-sanlock-cleanup):
Prefer consistent capitalization.
* src/Makefile.am (virtlockd.init, virtlockd.service)
(virtlockd.socket): Prefer consistent substitution.
2013-01-04 20:35:04 +00:00
|
|
|
$(AM_V_GEN)sed -e 's|[@]schemadir@|$(pkgdatadir)/schemas|' < $< > $@ \
|
2010-03-31 12:10:08 +00:00
|
|
|
|| (rm $@ && exit 1) && chmod +x $@
|
2009-04-19 15:10:45 +00:00
|
|
|
|
build: don't require pod2man for tarball builds
Right now, 'man libvirtd' includes information that depends on
configure results, so it must be generated on the fly and live
in $(builddir); however, requiring pod2man on all end user
machines is overkill. Meanwhile, 'man virsh' doesn't mention
any configure results, so it can be built at 'make dist' time.
If that situation changes in the future, we can generate virsh.1
in the same way that we generate libvirtd.8.
* daemon/Makefile.am (libvirtd.8.in): New rule, to run pod2man in
advance of distribution.
(libvirtd.8): Use only sed from tarball.
(EXTRA_DIST): Ship new file.
(libvirtd.pod): Delete unused rule.
(man8_MANS): Let automake know which section to use.
(CLEANFILES, MAINTAINERCLEANFILES): Adjust to new files.
* tools/Makefile.am (dist_man1_MANS): Distribute pre-built man
pages, fine since they don't require any substitution.
(virt-xml-validate.1, virt-pki-validate.1): Change input source.
(virsh.1): Build into srcdir.
(CLEANFILES, MAINTAINERCLEANFILES): Adjust to new build style.
* daemon/.gitignore: Update.
Reported by Diego Elio Pettenò.
2011-02-16 22:43:24 +00:00
|
|
|
virt-xml-validate.1: virt-xml-validate.in
|
2012-10-26 15:06:54 +00:00
|
|
|
$(AM_V_GEN)$(POD2MAN) --name VIRT-XML-VALIDATE $< $(srcdir)/$@ \
|
|
|
|
&& if grep 'POD ERROR' $(srcdir)/$@ ; then \
|
2012-10-26 21:27:25 +00:00
|
|
|
rm $(srcdir)/$@; exit 1; fi
|
2009-09-16 11:01:53 +00:00
|
|
|
|
2009-09-16 13:42:57 +00:00
|
|
|
virt-pki-validate: virt-pki-validate.in Makefile
|
build: use common .in replacement mechanism
We had several different styles of .in conversion in our Makefiles:
ALLCAPS, @ALLCAPS@, @lower@, ::lower::
Canonicalize on one form, to make it easier to copy and paste
between .in files.
Also, we were using some non-portable sed constructs: \@ is an
undefined escape sequence (it happens to be @ itself in GNU sed,
but POSIX allows it to mean something else), as well as risky
behavior (failure to consistently quote things means a space
in $(sysconfdir) could throw things off; also, Autoconf recommends
using | rather than , or ! in the s||| operator, because | has to
be quoted in shell and is therefore less likely to appear in file
names than , or !).
Fix all of these uses to follow the same syntax.
* daemon/libvirtd.8.in: Switch to @var@.
* tools/virt-xml-validate.in: Likewise.
* tools/virt-pki-validate.in: Likewise.
* src/locking/virtlockd.init.in: Likewise.
* daemon/Makefile.am: Prefer | over ! in sed.
(libvirtd.8): Prefer consistent substitution.
(libvirtd.init, libvirtd.service): Avoid non-portable sed.
* tools/Makefile.am (libvirt-guests.sh, libvirt-guests.init)
(libvirt-guests.service): Likewise.
(virt-xml-validate, virt-pki-validate, virt-sanlock-cleanup):
Prefer consistent capitalization.
* src/Makefile.am (virtlockd.init, virtlockd.service)
(virtlockd.socket): Prefer consistent substitution.
2013-01-04 20:35:04 +00:00
|
|
|
$(AM_V_GEN)sed -e 's|[@]sysconfdir@|$(sysconfdir)|' < $< > $@ \
|
2010-03-31 12:10:08 +00:00
|
|
|
|| (rm $@ && exit 1) && chmod +x $@
|
2009-09-16 11:01:53 +00:00
|
|
|
|
build: don't require pod2man for tarball builds
Right now, 'man libvirtd' includes information that depends on
configure results, so it must be generated on the fly and live
in $(builddir); however, requiring pod2man on all end user
machines is overkill. Meanwhile, 'man virsh' doesn't mention
any configure results, so it can be built at 'make dist' time.
If that situation changes in the future, we can generate virsh.1
in the same way that we generate libvirtd.8.
* daemon/Makefile.am (libvirtd.8.in): New rule, to run pod2man in
advance of distribution.
(libvirtd.8): Use only sed from tarball.
(EXTRA_DIST): Ship new file.
(libvirtd.pod): Delete unused rule.
(man8_MANS): Let automake know which section to use.
(CLEANFILES, MAINTAINERCLEANFILES): Adjust to new files.
* tools/Makefile.am (dist_man1_MANS): Distribute pre-built man
pages, fine since they don't require any substitution.
(virt-xml-validate.1, virt-pki-validate.1): Change input source.
(virsh.1): Build into srcdir.
(CLEANFILES, MAINTAINERCLEANFILES): Adjust to new build style.
* daemon/.gitignore: Update.
Reported by Diego Elio Pettenò.
2011-02-16 22:43:24 +00:00
|
|
|
virt-pki-validate.1: virt-pki-validate.in
|
2012-10-26 15:06:54 +00:00
|
|
|
$(AM_V_GEN)$(POD2MAN) --name VIRT-PKI-VALIDATE $< $(srcdir)/$@ \
|
|
|
|
&& if grep 'POD ERROR' $(srcdir)/$@ ; then \
|
2012-10-26 21:27:25 +00:00
|
|
|
rm $(srcdir)/$@; exit 1; fi
|
2009-09-16 11:01:53 +00:00
|
|
|
|
2012-01-10 17:31:21 +00:00
|
|
|
virt-host-validate.1: virt-host-validate.c
|
2012-10-26 15:06:54 +00:00
|
|
|
$(AM_V_GEN)$(POD2MAN) --name VIRT-HOST-VALIDATE $< $(srcdir)/$@ \
|
|
|
|
&& if grep 'POD ERROR' $(srcdir)/$@ ; then \
|
2012-10-26 21:27:25 +00:00
|
|
|
rm $(srcdir)/$@; exit 1; fi
|
2012-01-10 17:31:21 +00:00
|
|
|
|
2011-06-14 08:29:00 +00:00
|
|
|
virt-sanlock-cleanup: virt-sanlock-cleanup.in Makefile
|
build: use common .in replacement mechanism
We had several different styles of .in conversion in our Makefiles:
ALLCAPS, @ALLCAPS@, @lower@, ::lower::
Canonicalize on one form, to make it easier to copy and paste
between .in files.
Also, we were using some non-portable sed constructs: \@ is an
undefined escape sequence (it happens to be @ itself in GNU sed,
but POSIX allows it to mean something else), as well as risky
behavior (failure to consistently quote things means a space
in $(sysconfdir) could throw things off; also, Autoconf recommends
using | rather than , or ! in the s||| operator, because | has to
be quoted in shell and is therefore less likely to appear in file
names than , or !).
Fix all of these uses to follow the same syntax.
* daemon/libvirtd.8.in: Switch to @var@.
* tools/virt-xml-validate.in: Likewise.
* tools/virt-pki-validate.in: Likewise.
* src/locking/virtlockd.init.in: Likewise.
* daemon/Makefile.am: Prefer | over ! in sed.
(libvirtd.8): Prefer consistent substitution.
(libvirtd.init, libvirtd.service): Avoid non-portable sed.
* tools/Makefile.am (libvirt-guests.sh, libvirt-guests.init)
(libvirt-guests.service): Likewise.
(virt-xml-validate, virt-pki-validate, virt-sanlock-cleanup):
Prefer consistent capitalization.
* src/Makefile.am (virtlockd.init, virtlockd.service)
(virtlockd.socket): Prefer consistent substitution.
2013-01-04 20:35:04 +00:00
|
|
|
$(AM_V_GEN)sed -e 's|[@]sysconfdir@|$(sysconfdir)|' \
|
|
|
|
-e 's|[@]localstatedir@|$(localstatedir)|' < $< > $@ \
|
2011-06-14 08:29:00 +00:00
|
|
|
|| (rm $@ && exit 1) && chmod +x $@
|
|
|
|
|
|
|
|
virt-sanlock-cleanup.8: virt-sanlock-cleanup.in
|
2012-10-26 15:06:54 +00:00
|
|
|
$(AM_V_GEN)$(POD2MAN) --name VIRT-SANLOCK-CLEANUP $< $(srcdir)/$@ \
|
|
|
|
&& if grep 'POD ERROR' $(srcdir)/$@ ; then \
|
2012-10-26 21:27:25 +00:00
|
|
|
rm $(srcdir)/$@; exit 1; fi
|
2011-06-14 08:29:00 +00: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 = \
|
|
|
|
$(WARN_LDFLAGS) \
|
|
|
|
$(COVERAGE_LDFLAGS) \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
virt_host_validate_LDADD = \
|
|
|
|
../src/libvirt.la \
|
|
|
|
../gnulib/lib/libgnu.la \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
virt_host_validate_CFLAGS = \
|
|
|
|
$(WARN_CFLAGS) \
|
|
|
|
$(COVERAGE_CFLAGS) \
|
|
|
|
$(NULL)
|
|
|
|
|
2009-09-16 11:01:53 +00:00
|
|
|
virsh_SOURCES = \
|
|
|
|
console.c console.h \
|
2012-08-18 03:16:04 +00:00
|
|
|
virsh.c virsh.h \
|
2012-08-18 04:00:42 +00:00
|
|
|
virsh-domain.c virsh-domain.h \
|
2012-08-20 13:46:38 +00:00
|
|
|
virsh-domain-monitor.c virsh-domain-monitor.h \
|
2012-08-20 20:01:45 +00:00
|
|
|
virsh-host.c virsh-host.h \
|
2012-08-20 20:30:53 +00:00
|
|
|
virsh-interface.c virsh-interface.h \
|
2012-08-20 21:43:25 +00:00
|
|
|
virsh-network.c virsh-network.h \
|
2012-08-20 22:23:10 +00:00
|
|
|
virsh-nodedev.c virsh-nodedev.h \
|
2012-08-20 22:56:03 +00:00
|
|
|
virsh-nwfilter.c virsh-nwfilter.h \
|
2012-08-20 22:56:53 +00:00
|
|
|
virsh-pool.c virsh-pool.h \
|
2012-08-20 23:14:37 +00:00
|
|
|
virsh-secret.c virsh-secret.h \
|
2012-08-20 23:29:03 +00:00
|
|
|
virsh-snapshot.c virsh-snapshot.h \
|
2012-08-20 23:41:24 +00:00
|
|
|
virsh-volume.c virsh-volume.h \
|
2012-08-18 03:16:04 +00:00
|
|
|
$(NULL)
|
2009-09-16 11:01:53 +00:00
|
|
|
|
2010-05-14 22:45:52 +00:00
|
|
|
virsh_LDFLAGS = $(WARN_LDFLAGS) $(COVERAGE_LDFLAGS)
|
2009-09-16 11:01:53 +00:00
|
|
|
virsh_LDADD = \
|
|
|
|
$(STATIC_BINARIES) \
|
|
|
|
$(WARN_CFLAGS) \
|
|
|
|
../src/libvirt.la \
|
2010-04-13 18:08:59 +00:00
|
|
|
../src/libvirt-qemu.la \
|
2009-09-16 11:01:53 +00:00
|
|
|
../gnulib/lib/libgnu.la \
|
2011-03-08 18:24:28 +00:00
|
|
|
$(LIBXML_LIBS) \
|
2009-09-16 11:01:53 +00:00
|
|
|
$(VIRSH_LIBS)
|
2010-05-14 22:45:52 +00:00
|
|
|
virsh_CFLAGS = \
|
2010-03-16 10:51:36 +00:00
|
|
|
$(WARN_CFLAGS) \
|
2009-09-16 11:01:53 +00:00
|
|
|
$(COVERAGE_CFLAGS) \
|
|
|
|
$(LIBXML_CFLAGS) \
|
|
|
|
$(READLINE_CFLAGS)
|
2012-05-17 15:08:53 +00:00
|
|
|
BUILT_SOURCES =
|
2009-09-16 11:01:53 +00: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 12:10:08 +00:00
|
|
|
$(AM_V_GEN)$(WINDRES) \
|
2009-09-16 11:01:53 +00:00
|
|
|
--input-format rc --input $< \
|
|
|
|
--output-format coff --output $@
|
|
|
|
endif
|
|
|
|
|
|
|
|
virsh.1: virsh.pod
|
2012-10-26 15:06:54 +00:00
|
|
|
$(AM_V_GEN)$(POD2MAN) $< $(srcdir)/$@ \
|
|
|
|
&& if grep 'POD ERROR' $(srcdir)/$@ ; then \
|
2012-10-26 21:27:25 +00: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 12:07:26 +00:00
|
|
|
|
2011-12-08 13:30:24 +00:00
|
|
|
uninstall-local: uninstall-init uninstall-systemd
|
2010-08-25 12:07:26 +00:00
|
|
|
|
2011-07-07 13:45:07 +00:00
|
|
|
install-sysconfig:
|
build: follow directory install conventions
Commit 4d9e51f6 fixed a 'make uninstall' failure, but failed
to follow other conventions already present in src/Makefile.am.
In particular, we prefer MKDIR_P over mkdir -p, and should
have a matching rmdir during uninstall for every directory
created during install (the idea being that uninstall in a
DESTDIR should be clean, while installation in the final
system should not fail with non-empty directories left behind).
* tools/Makefile.am (install-sysconfig, install-initscript)
(install-systemd): Use MKDIR_P.
(uninstall-sysconfig, uninstall-initscript, uninstall-systemd):
Also remove directories.
* daemon/Makefile.am (install-data-local, install-data-polkit)
(install-logrotate, install-sysconfig, install-sysctl)
(install-init-redhat, install-init-upstart, install-init-systemd)
(install-data-sasl): Use MKDIR_P.
(uninstall-data-polkit, uninstall-sysconfig, uninstall-sysctl)
(uninstall-init-redhat, uninstall-init-upstart)
(uninstall-init-systemd): Also remove directory.
(uninstall-logrotate): New rule.
(uninstall-local): Add uninstall-logrotate.
2011-12-09 18:06:19 +00:00
|
|
|
$(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig
|
2011-07-07 13:45:07 +00:00
|
|
|
$(INSTALL_DATA) $(srcdir)/libvirt-guests.sysconf \
|
|
|
|
$(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests
|
|
|
|
|
|
|
|
uninstall-sysconfig:
|
|
|
|
rm -f $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests
|
build: follow directory install conventions
Commit 4d9e51f6 fixed a 'make uninstall' failure, but failed
to follow other conventions already present in src/Makefile.am.
In particular, we prefer MKDIR_P over mkdir -p, and should
have a matching rmdir during uninstall for every directory
created during install (the idea being that uninstall in a
DESTDIR should be clean, while installation in the final
system should not fail with non-empty directories left behind).
* tools/Makefile.am (install-sysconfig, install-initscript)
(install-systemd): Use MKDIR_P.
(uninstall-sysconfig, uninstall-initscript, uninstall-systemd):
Also remove directories.
* daemon/Makefile.am (install-data-local, install-data-polkit)
(install-logrotate, install-sysconfig, install-sysctl)
(install-init-redhat, install-init-upstart, install-init-systemd)
(install-data-sasl): Use MKDIR_P.
(uninstall-data-polkit, uninstall-sysconfig, uninstall-sysctl)
(uninstall-init-redhat, uninstall-init-upstart)
(uninstall-init-systemd): Also remove directory.
(uninstall-logrotate): New rule.
(uninstall-local): Add uninstall-logrotate.
2011-12-09 18:06:19 +00:00
|
|
|
rmdir $(DESTDIR)$(sysconfdir)/sysconfig ||:
|
2011-07-07 13:45:07 +00:00
|
|
|
|
2012-10-21 02:29:51 +00:00
|
|
|
EXTRA_DIST += libvirt-guests.sh.in libvirt-guests.init.in
|
2011-07-07 13:45:07 +00:00
|
|
|
|
2011-12-08 13:30:24 +00:00
|
|
|
install-initscript: libvirt-guests.init
|
build: follow directory install conventions
Commit 4d9e51f6 fixed a 'make uninstall' failure, but failed
to follow other conventions already present in src/Makefile.am.
In particular, we prefer MKDIR_P over mkdir -p, and should
have a matching rmdir during uninstall for every directory
created during install (the idea being that uninstall in a
DESTDIR should be clean, while installation in the final
system should not fail with non-empty directories left behind).
* tools/Makefile.am (install-sysconfig, install-initscript)
(install-systemd): Use MKDIR_P.
(uninstall-sysconfig, uninstall-initscript, uninstall-systemd):
Also remove directories.
* daemon/Makefile.am (install-data-local, install-data-polkit)
(install-logrotate, install-sysconfig, install-sysctl)
(install-init-redhat, install-init-upstart, install-init-systemd)
(install-data-sasl): Use MKDIR_P.
(uninstall-data-polkit, uninstall-sysconfig, uninstall-sysctl)
(uninstall-init-redhat, uninstall-init-upstart)
(uninstall-init-systemd): Also remove directory.
(uninstall-logrotate): New rule.
(uninstall-local): Add uninstall-logrotate.
2011-12-09 18:06:19 +00:00
|
|
|
$(MKDIR_P) $(DESTDIR)$(sysconfdir)/rc.d/init.d
|
2010-08-25 12:07:26 +00: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 13:45:07 +00:00
|
|
|
rm -f $(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirt-guests
|
build: follow directory install conventions
Commit 4d9e51f6 fixed a 'make uninstall' failure, but failed
to follow other conventions already present in src/Makefile.am.
In particular, we prefer MKDIR_P over mkdir -p, and should
have a matching rmdir during uninstall for every directory
created during install (the idea being that uninstall in a
DESTDIR should be clean, while installation in the final
system should not fail with non-empty directories left behind).
* tools/Makefile.am (install-sysconfig, install-initscript)
(install-systemd): Use MKDIR_P.
(uninstall-sysconfig, uninstall-initscript, uninstall-systemd):
Also remove directories.
* daemon/Makefile.am (install-data-local, install-data-polkit)
(install-logrotate, install-sysconfig, install-sysctl)
(install-init-redhat, install-init-upstart, install-init-systemd)
(install-data-sasl): Use MKDIR_P.
(uninstall-data-polkit, uninstall-sysconfig, uninstall-sysctl)
(uninstall-init-redhat, uninstall-init-upstart)
(uninstall-init-systemd): Also remove directory.
(uninstall-logrotate): New rule.
(uninstall-local): Add uninstall-logrotate.
2011-12-09 18:06:19 +00:00
|
|
|
rmdir $(DESTDIR)$(sysconfdir)/rc.d/init.d ||:
|
2010-08-25 12:07:26 +00: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
|
2011-07-07 13:45:07 +00:00
|
|
|
else
|
|
|
|
install-init:
|
|
|
|
uninstall-init:
|
|
|
|
endif # LIBVIRT_INIT_SCRIPT_RED_HAT
|
|
|
|
|
2012-10-21 02:29:51 +00:00
|
|
|
libvirt-guests.sh: libvirt-guests.sh.in $(top_builddir)/config.status
|
build: use common .in replacement mechanism
We had several different styles of .in conversion in our Makefiles:
ALLCAPS, @ALLCAPS@, @lower@, ::lower::
Canonicalize on one form, to make it easier to copy and paste
between .in files.
Also, we were using some non-portable sed constructs: \@ is an
undefined escape sequence (it happens to be @ itself in GNU sed,
but POSIX allows it to mean something else), as well as risky
behavior (failure to consistently quote things means a space
in $(sysconfdir) could throw things off; also, Autoconf recommends
using | rather than , or ! in the s||| operator, because | has to
be quoted in shell and is therefore less likely to appear in file
names than , or !).
Fix all of these uses to follow the same syntax.
* daemon/libvirtd.8.in: Switch to @var@.
* tools/virt-xml-validate.in: Likewise.
* tools/virt-pki-validate.in: Likewise.
* src/locking/virtlockd.init.in: Likewise.
* daemon/Makefile.am: Prefer | over ! in sed.
(libvirtd.8): Prefer consistent substitution.
(libvirtd.init, libvirtd.service): Avoid non-portable sed.
* tools/Makefile.am (libvirt-guests.sh, libvirt-guests.init)
(libvirt-guests.service): Likewise.
(virt-xml-validate, virt-pki-validate, virt-sanlock-cleanup):
Prefer consistent capitalization.
* src/Makefile.am (virtlockd.init, virtlockd.service)
(virtlockd.socket): Prefer consistent substitution.
2013-01-04 20:35:04 +00: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 12:07:26 +00:00
|
|
|
mv $@-t $@
|
2012-10-21 02:29:51 +00:00
|
|
|
BUILT_SOURCES += libvirt-guests.sh
|
2011-07-07 13:45:07 +00:00
|
|
|
|
2012-10-21 02:29:51 +00:00
|
|
|
libvirt-guests.init: libvirt-guests.init.in libvirt-guests.sh
|
|
|
|
$(AM_V_GEN)sed \
|
build: use common .in replacement mechanism
We had several different styles of .in conversion in our Makefiles:
ALLCAPS, @ALLCAPS@, @lower@, ::lower::
Canonicalize on one form, to make it easier to copy and paste
between .in files.
Also, we were using some non-portable sed constructs: \@ is an
undefined escape sequence (it happens to be @ itself in GNU sed,
but POSIX allows it to mean something else), as well as risky
behavior (failure to consistently quote things means a space
in $(sysconfdir) could throw things off; also, Autoconf recommends
using | rather than , or ! in the s||| operator, because | has to
be quoted in shell and is therefore less likely to appear in file
names than , or !).
Fix all of these uses to follow the same syntax.
* daemon/libvirtd.8.in: Switch to @var@.
* tools/virt-xml-validate.in: Likewise.
* tools/virt-pki-validate.in: Likewise.
* src/locking/virtlockd.init.in: Likewise.
* daemon/Makefile.am: Prefer | over ! in sed.
(libvirtd.8): Prefer consistent substitution.
(libvirtd.init, libvirtd.service): Avoid non-portable sed.
* tools/Makefile.am (libvirt-guests.sh, libvirt-guests.init)
(libvirt-guests.service): Likewise.
(virt-xml-validate, virt-pki-validate, virt-sanlock-cleanup):
Prefer consistent capitalization.
* src/Makefile.am (virtlockd.init, virtlockd.service)
(virtlockd.socket): Prefer consistent substitution.
2013-01-04 20:35:04 +00:00
|
|
|
-e 's|[@]libexecdir[@]|$(libexecdir)|g' \
|
2012-10-21 02:29:51 +00:00
|
|
|
< $< > $@-t && \
|
|
|
|
chmod a+x $@-t && \
|
|
|
|
mv $@-t $@
|
2011-07-07 13:45:07 +00:00
|
|
|
|
|
|
|
|
|
|
|
EXTRA_DIST += libvirt-guests.service.in
|
2011-12-08 13:30:24 +00:00
|
|
|
SYSTEMD_UNIT_DIR = /lib/systemd/system
|
|
|
|
|
2011-07-07 13:45:07 +00:00
|
|
|
if LIBVIRT_INIT_SCRIPT_SYSTEMD
|
2012-10-21 02:29:51 +00:00
|
|
|
install-systemd: libvirt-guests.service install-sysconfig libvirt-guests.sh
|
build: follow directory install conventions
Commit 4d9e51f6 fixed a 'make uninstall' failure, but failed
to follow other conventions already present in src/Makefile.am.
In particular, we prefer MKDIR_P over mkdir -p, and should
have a matching rmdir during uninstall for every directory
created during install (the idea being that uninstall in a
DESTDIR should be clean, while installation in the final
system should not fail with non-empty directories left behind).
* tools/Makefile.am (install-sysconfig, install-initscript)
(install-systemd): Use MKDIR_P.
(uninstall-sysconfig, uninstall-initscript, uninstall-systemd):
Also remove directories.
* daemon/Makefile.am (install-data-local, install-data-polkit)
(install-logrotate, install-sysconfig, install-sysctl)
(install-init-redhat, install-init-upstart, install-init-systemd)
(install-data-sasl): Use MKDIR_P.
(uninstall-data-polkit, uninstall-sysconfig, uninstall-sysctl)
(uninstall-init-redhat, uninstall-init-upstart)
(uninstall-init-systemd): Also remove directory.
(uninstall-logrotate): New rule.
(uninstall-local): Add uninstall-logrotate.
2011-12-09 18:06:19 +00:00
|
|
|
$(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR)
|
2012-06-26 07:53:33 +00:00
|
|
|
$(INSTALL_DATA) libvirt-guests.service \
|
2011-12-08 13:30:24 +00:00
|
|
|
$(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirt-guests.service
|
2011-07-07 13:45:07 +00:00
|
|
|
|
2012-10-21 02:29:51 +00:00
|
|
|
uninstall-systemd: uninstall-sysconfig
|
2011-12-08 13:30:24 +00:00
|
|
|
rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirt-guests.service
|
build: follow directory install conventions
Commit 4d9e51f6 fixed a 'make uninstall' failure, but failed
to follow other conventions already present in src/Makefile.am.
In particular, we prefer MKDIR_P over mkdir -p, and should
have a matching rmdir during uninstall for every directory
created during install (the idea being that uninstall in a
DESTDIR should be clean, while installation in the final
system should not fail with non-empty directories left behind).
* tools/Makefile.am (install-sysconfig, install-initscript)
(install-systemd): Use MKDIR_P.
(uninstall-sysconfig, uninstall-initscript, uninstall-systemd):
Also remove directories.
* daemon/Makefile.am (install-data-local, install-data-polkit)
(install-logrotate, install-sysconfig, install-sysctl)
(install-init-redhat, install-init-upstart, install-init-systemd)
(install-data-sasl): Use MKDIR_P.
(uninstall-data-polkit, uninstall-sysconfig, uninstall-sysctl)
(uninstall-init-redhat, uninstall-init-upstart)
(uninstall-init-systemd): Also remove directory.
(uninstall-logrotate): New rule.
(uninstall-local): Add uninstall-logrotate.
2011-12-09 18:06:19 +00:00
|
|
|
rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) ||:
|
2011-07-07 13:45:07 +00:00
|
|
|
|
|
|
|
BUILT_SOURCES += libvirt-guests.service
|
|
|
|
|
2010-08-25 12:07:26 +00:00
|
|
|
else
|
2011-07-07 13:45:07 +00:00
|
|
|
install-systemd:
|
|
|
|
uninstall-systemd:
|
|
|
|
endif # LIBVIRT_INIT_SCRIPT_SYSTEMD
|
|
|
|
|
|
|
|
libvirt-guests.service: libvirt-guests.service.in $(top_builddir)/config.status
|
build: use common .in replacement mechanism
We had several different styles of .in conversion in our Makefiles:
ALLCAPS, @ALLCAPS@, @lower@, ::lower::
Canonicalize on one form, to make it easier to copy and paste
between .in files.
Also, we were using some non-portable sed constructs: \@ is an
undefined escape sequence (it happens to be @ itself in GNU sed,
but POSIX allows it to mean something else), as well as risky
behavior (failure to consistently quote things means a space
in $(sysconfdir) could throw things off; also, Autoconf recommends
using | rather than , or ! in the s||| operator, because | has to
be quoted in shell and is therefore less likely to appear in file
names than , or !).
Fix all of these uses to follow the same syntax.
* daemon/libvirtd.8.in: Switch to @var@.
* tools/virt-xml-validate.in: Likewise.
* tools/virt-pki-validate.in: Likewise.
* src/locking/virtlockd.init.in: Likewise.
* daemon/Makefile.am: Prefer | over ! in sed.
(libvirtd.8): Prefer consistent substitution.
(libvirtd.init, libvirtd.service): Avoid non-portable sed.
* tools/Makefile.am (libvirt-guests.sh, libvirt-guests.init)
(libvirt-guests.service): Likewise.
(virt-xml-validate, virt-pki-validate, virt-sanlock-cleanup):
Prefer consistent capitalization.
* src/Makefile.am (virtlockd.init, virtlockd.service)
(virtlockd.socket): Prefer consistent substitution.
2013-01-04 20:35:04 +00: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 13:45:07 +00:00
|
|
|
mv $@-t $@
|
2010-08-25 12:07:26 +00:00
|
|
|
|
2009-04-19 15:10:45 +00:00
|
|
|
|
build: don't require pod2man for tarball builds
Right now, 'man libvirtd' includes information that depends on
configure results, so it must be generated on the fly and live
in $(builddir); however, requiring pod2man on all end user
machines is overkill. Meanwhile, 'man virsh' doesn't mention
any configure results, so it can be built at 'make dist' time.
If that situation changes in the future, we can generate virsh.1
in the same way that we generate libvirtd.8.
* daemon/Makefile.am (libvirtd.8.in): New rule, to run pod2man in
advance of distribution.
(libvirtd.8): Use only sed from tarball.
(EXTRA_DIST): Ship new file.
(libvirtd.pod): Delete unused rule.
(man8_MANS): Let automake know which section to use.
(CLEANFILES, MAINTAINERCLEANFILES): Adjust to new files.
* tools/Makefile.am (dist_man1_MANS): Distribute pre-built man
pages, fine since they don't require any substitution.
(virt-xml-validate.1, virt-pki-validate.1): Change input source.
(virsh.1): Build into srcdir.
(CLEANFILES, MAINTAINERCLEANFILES): Adjust to new build style.
* daemon/.gitignore: Update.
Reported by Diego Elio Pettenò.
2011-02-16 22:43:24 +00:00
|
|
|
CLEANFILES = $(bin_SCRIPTS)
|
2010-11-17 17:38:59 +00:00
|
|
|
CLEANFILES += *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda *.i *.s
|
build: don't require pod2man for tarball builds
Right now, 'man libvirtd' includes information that depends on
configure results, so it must be generated on the fly and live
in $(builddir); however, requiring pod2man on all end user
machines is overkill. Meanwhile, 'man virsh' doesn't mention
any configure results, so it can be built at 'make dist' time.
If that situation changes in the future, we can generate virsh.1
in the same way that we generate libvirtd.8.
* daemon/Makefile.am (libvirtd.8.in): New rule, to run pod2man in
advance of distribution.
(libvirtd.8): Use only sed from tarball.
(EXTRA_DIST): Ship new file.
(libvirtd.pod): Delete unused rule.
(man8_MANS): Let automake know which section to use.
(CLEANFILES, MAINTAINERCLEANFILES): Adjust to new files.
* tools/Makefile.am (dist_man1_MANS): Distribute pre-built man
pages, fine since they don't require any substitution.
(virt-xml-validate.1, virt-pki-validate.1): Change input source.
(virsh.1): Build into srcdir.
(CLEANFILES, MAINTAINERCLEANFILES): Adjust to new build style.
* daemon/.gitignore: Update.
Reported by Diego Elio Pettenò.
2011-02-16 22:43:24 +00:00
|
|
|
MAINTAINERCLEANFILES = $(dist_man1_MANS)
|
2009-04-19 15:10:45 +00:00
|
|
|
|
2011-10-11 21:10:17 +00:00
|
|
|
DISTCLEANFILES += $(BUILT_SOURCES)
|