2009-04-19 15:10:45 +00:00
|
|
|
|
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 \
|
2010-08-25 12:07:26 +00:00
|
|
|
virsh.pod \
|
2011-01-06 19:00:30 +00:00
|
|
|
libvirt-guests.init.sh \
|
2010-08-25 12:07:26 +00:00
|
|
|
libvirt-guests.sysconf
|
2009-09-16 11:01:53 +00:00
|
|
|
|
2009-09-16 13:42:57 +00:00
|
|
|
bin_SCRIPTS = virt-xml-validate virt-pki-validate
|
2009-09-16 11:01:53 +00:00
|
|
|
bin_PROGRAMS = virsh
|
|
|
|
|
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
|
|
|
dist_man1_MANS = virt-xml-validate.1 virt-pki-validate.1 virsh.1
|
2009-09-16 11:01:53 +00:00
|
|
|
|
2009-04-19 15:10:45 +00:00
|
|
|
|
|
|
|
virt-xml-validate: virt-xml-validate.in Makefile
|
2010-03-31 12:10:08 +00:00
|
|
|
$(AM_V_GEN)sed -e 's,@SCHEMADIR@,$(pkgdatadir)/schemas,' < $< > $@ \
|
|
|
|
|| (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
|
|
|
|
$(AM_V_GEN)$(POD2MAN) $< $(srcdir)/$@
|
2009-09-16 11:01:53 +00:00
|
|
|
|
2009-09-16 13:42:57 +00:00
|
|
|
virt-pki-validate: virt-pki-validate.in Makefile
|
2010-03-31 12:10:08 +00:00
|
|
|
$(AM_V_GEN)sed -e 's,@SYSCONFDIR@,$(sysconfdir),' < $< > $@ \
|
|
|
|
|| (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
|
|
|
|
$(AM_V_GEN)$(POD2MAN) $< $(srcdir)/$@
|
2009-09-16 11:01:53 +00:00
|
|
|
|
|
|
|
virsh_SOURCES = \
|
|
|
|
console.c console.h \
|
|
|
|
virsh.c
|
|
|
|
|
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 = \
|
2009-09-16 11:01:53 +00:00
|
|
|
-I$(top_srcdir)/gnulib/lib -I../gnulib/lib \
|
2009-10-01 14:55:09 +00:00
|
|
|
-I../include -I$(top_srcdir)/include \
|
Move all shared utility files to src/util/
* src/bridge.c, src/bridge.h, src/buf.c, src/buf.h, src/cgroup.c,
src/cgroup.h, src/conf.c, src/conf.h, src/event.c, src/event.h,
src/hash.c, src/hash.h, src/hostusb.c, src/hostusb.h,
src/iptables.c, src/iptables.h, src/logging.c, src/logging.h,
src/memory.c, src/memory.h, src/pci.c, src/pci.h, src/qparams.c,
src/qparams.h, src/stats_linux.c, src/stats_linux.h,
src/threads-pthread.c, src/threads-pthread.h, src/threads-win32.c,
src/threads-win32.h, src/threads.c, src/threads.h, src/util.c,
src/util.h, src/uuid.c, src/uuid.h, src/virterror.c,
src/virterror_internal.h, src/xml.c, src/xml.h: Move all files
into src/util/
* daemon/Makefile.am: Add -Isrc/util/ to build flags
* src/Makefile.am: Add -Isrc/util/ to build flags and update for
moved files
* src/libvirt_private.syms: Export cgroup APIs since they're now
in util rather than linking directly to drivers
* src/xen/xs_internal.c: Disable bogus virEventRemoveHandle call
when built under PROXY
* proxy/Makefile.am: Update for changed file locations. Remove
bogus build of event.c
* tools/Makefile.am, tests/Makefile.am: Add -Isrc/util/ to build flags
2009-09-16 15:28:46 +00:00
|
|
|
-I$(top_srcdir)/src \
|
|
|
|
-I$(top_srcdir)/src/util \
|
2010-11-11 23:59:12 +00:00
|
|
|
-I$(top_srcdir) \
|
2010-03-16 10:51:36 +00:00
|
|
|
$(WARN_CFLAGS) \
|
2009-09-16 11:01:53 +00:00
|
|
|
$(COVERAGE_CFLAGS) \
|
|
|
|
$(LIBXML_CFLAGS) \
|
|
|
|
$(READLINE_CFLAGS)
|
|
|
|
BUILT_SOURCES = virsh-net-edit.c virsh-pool-edit.c
|
|
|
|
|
|
|
|
virsh-net-edit.c: virsh.c Makefile.am
|
2010-03-31 12:10:08 +00:00
|
|
|
$(AM_V_GEN)rm -f $@-tmp && \
|
|
|
|
echo '/* Automatically generated from: $^ */' > $@-tmp && \
|
|
|
|
echo 'static int' >> $@-tmp && \
|
2009-09-16 11:01:53 +00:00
|
|
|
awk '/^cmdEdit/, /^}/' $< \
|
|
|
|
| sed -e 's/domain/network/g' \
|
|
|
|
-e 's/Domain/Network/g' \
|
|
|
|
-e 's/cmdEdit/cmdNetworkEdit/g' \
|
|
|
|
-e 's/dom/network/g' \
|
|
|
|
-e 's/int flags.*/int flags = 0;/g' \
|
2010-03-31 12:10:08 +00:00
|
|
|
>> $@-tmp && \
|
|
|
|
chmod a-w $@-tmp && \
|
|
|
|
rm -f $@ && \
|
2009-09-16 11:01:53 +00:00
|
|
|
mv $@-tmp $@
|
|
|
|
|
|
|
|
virsh-pool-edit.c: virsh.c Makefile.am
|
2010-03-31 12:10:08 +00:00
|
|
|
$(AM_V_GEN)rm -f $@-tmp && \
|
|
|
|
echo '/* Automatically generated from: $^ */' > $@-tmp && \
|
|
|
|
echo 'static int' >> $@-tmp && \
|
2009-09-16 11:01:53 +00:00
|
|
|
awk '/^cmdEdit/, /^}/' $< \
|
|
|
|
| sed -e 's/domain/pool/g' \
|
|
|
|
-e 's/vshCommandOptDomain/vshCommandOptPool/g' \
|
|
|
|
-e 's/Domain %s/Pool %s/g' \
|
|
|
|
-e 's/(ctl, cmd, NULL);/(ctl, cmd, "pool", NULL);/' \
|
|
|
|
-e 's/Domain/StoragePool/g' \
|
|
|
|
-e 's/cmdEdit/cmdPoolEdit/g' \
|
|
|
|
-e 's/\(virStoragePoolDefineXML.*\));/\1, 0);/' \
|
|
|
|
-e 's/dom/pool/g' \
|
|
|
|
-e 's/int flags.*/int flags = 0;/g' \
|
2010-03-31 12:10:08 +00:00
|
|
|
>> $@-tmp && \
|
|
|
|
chmod a-w $@-tmp && \
|
|
|
|
rm -f $@ && \
|
2009-09-16 11:01:53 +00:00
|
|
|
mv $@-tmp $@
|
|
|
|
|
|
|
|
|
|
|
|
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
|
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
|
|
|
$(AM_V_GEN)$(POD2MAN) $< $(srcdir)/$@
|
2009-04-19 15:10:45 +00:00
|
|
|
|
2010-08-25 12:07:26 +00:00
|
|
|
install-data-local: install-init
|
|
|
|
|
|
|
|
uninstall-local: uninstall-init
|
|
|
|
|
|
|
|
if LIBVIRT_INIT_SCRIPT_RED_HAT
|
|
|
|
install-init: libvirt-guests.init
|
|
|
|
mkdir -p $(DESTDIR)$(sysconfdir)/rc.d/init.d
|
|
|
|
$(INSTALL_SCRIPT) libvirt-guests.init \
|
|
|
|
$(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirt-guests
|
|
|
|
mkdir -p $(DESTDIR)$(sysconfdir)/sysconfig
|
2010-09-02 14:53:38 +00:00
|
|
|
$(INSTALL_DATA) $(srcdir)/libvirt-guests.sysconf \
|
2010-08-25 12:07:26 +00:00
|
|
|
$(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests
|
|
|
|
|
|
|
|
uninstall-init:
|
|
|
|
rm -f $(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirt-guests \
|
|
|
|
$(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests
|
|
|
|
|
|
|
|
BUILT_SOURCES += libvirt-guests.init
|
|
|
|
|
2011-01-06 19:00:30 +00:00
|
|
|
libvirt-guests.init: libvirt-guests.init.sh $(top_builddir)/config.status
|
2010-08-25 12:07:26 +00:00
|
|
|
$(AM_V_GEN)sed \
|
2011-01-04 18:13:56 +00:00
|
|
|
-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' \
|
2010-08-25 12:07:26 +00:00
|
|
|
< $< > $@-t && \
|
|
|
|
chmod a+x $@-t && \
|
|
|
|
mv $@-t $@
|
|
|
|
else
|
|
|
|
install-init:
|
|
|
|
uninstall-init:
|
|
|
|
libvirt-guests.init:
|
|
|
|
endif # LIBVIRT_INIT_SCRIPT_RED_HAT
|
|
|
|
|
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
|
|
|
|
2009-09-16 11:01:53 +00:00
|
|
|
DISTCLEANFILES = $(BUILT_SOURCES)
|