提交 7ff256ec 编写于 作者: D Daniel P. Berrange

Move virsh into tools/ directory

Move the virsh tool and its man page into the tools directory

* Makefile.am: Remove rules for virsh.1 man page
* virsh.1: Remove auto-generated file
* docs/Makefile.am: Remove rules for virsh.pod man page
* docs/virsh.pod: Move to tools/ directory
* src/Makefile.am, src/.gitignore: Remove rules for virsh
* src/console.c, src/console.h, src/*.ico, src/virsh_win_icon.rc,
  src/virsh.c: Move into tools/ directory
* tools/Makefile.am: Add rules for building virsh
* tools/.gitignore: Ignore virsh built files
* tests/virshtest.c, tests/int-overflow: Update for new
  virsh location
上级 e56c6a83
......@@ -13,7 +13,7 @@ EXTRA_DIST = \
libvirt.spec libvirt.spec.in \
mingw32-libvirt.spec.in \
libvirt.pc libvirt.pc.in \
$(man_MANS) autobuild.sh \
autobuild.sh \
.x-sc_avoid_if_before_free \
.x-sc_require_config_h_first \
.x-sc_prohibit_strcmp \
......@@ -23,8 +23,6 @@ EXTRA_DIST = \
Makefile.nonreentrant \
autogen.sh
man_MANS = virsh.1
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libvirt.pc
......
......@@ -72,15 +72,10 @@ EXTRA_DIST= \
$(dot_html) $(dot_html_in) $(gif) $(apihtml) $(apipng) \
$(xml) $(fig) $(png) \
$(patches) \
virsh.pod ChangeLog.awk
ChangeLog.awk
all: web $(top_builddir)/NEWS $(man_MANS)
virsh.1: virsh.pod
pod2man -c "Virtualization Support" -r "$(PACKAGE)-$(VERSION)" $(srcdir)/virsh.pod > $@-t
mv $@-t $@
cp $@ $(top_builddir)
api: libvirt-api.xml libvirt-refs.xml $(srcdir)/html/index.html
web: $(dot_html)
......
......@@ -5,7 +5,6 @@ Makefile.in
*.lo
*.loT
*.la
virsh
*.exe
*.gcda
*.gcno
......@@ -13,8 +12,6 @@ virsh
*.cov
libvirt_parthelper
libvirt_lxc
virsh-net-edit.c
virsh-pool-edit.c
libvirt.syms
*.i
*.s
......@@ -22,14 +22,7 @@ INCLUDES = \
confdir = $(sysconfdir)/libvirt/
conf_DATA = qemu.conf
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
EXTRA_DIST = $(conf_DATA) $(ICON_FILES)
EXTRA_DIST = $(conf_DATA)
lib_LTLIBRARIES = libvirt.la
......@@ -617,6 +610,8 @@ EXTRA_DIST += \
libvirt_bridge.syms \
libvirt_linux.syms
BUILT_SOURCES = libvirt.syms
libvirt.syms: libvirt_public.syms $(USED_SYM_FILES)
rm -f $@-tmp $@
printf '# WARNING: generated from the following:\n# $^\n\n' >$@-tmp
......@@ -662,82 +657,6 @@ libvirt_test_la_LIBADD = $(libvirt_la_LIBADD)
libvirt_test_la_LDFLAGS = $(test_LDFLAGS)
libvirt_test_la_CFLAGS = $(COVERAGE_CFLAGS)
bin_PROGRAMS = virsh
virsh_SOURCES = \
console.c console.h \
virsh.c
virsh_LDFLAGS = $(WARN_CFLAGS) $(COVERAGE_LDFLAGS)
virsh_LDADD = \
$(STATIC_BINARIES) \
$(WARN_CFLAGS) \
$(NUMACTL_LIBS) \
libvirt.la \
../gnulib/lib/libgnu.la \
$(VIRSH_LIBS)
virsh_CFLAGS = $(COVERAGE_CFLAGS) $(READLINE_CFLAGS) $(NUMACTL_CFLAGS)
BUILT_SOURCES = virsh-net-edit.c virsh-pool-edit.c libvirt.syms
virsh-net-edit.c: virsh.c Makefile.am
rm -f $@-tmp
echo '/* Automatically generated from: $^ */' > $@-tmp
echo 'static int' >> $@-tmp
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' \
>> $@-tmp
chmod a-w $@-tmp
rm -f $@
mv $@-tmp $@
virsh-pool-edit.c: virsh.c Makefile.am
rm -f $@-tmp
echo '/* Automatically generated from: $^ */' > $@-tmp
echo 'static int' >> $@-tmp
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' \
>> $@-tmp
chmod a-w $@-tmp
rm -f $@
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
$(WINDRES) \
--input-format rc --input $< \
--output-format coff --output $@
endif
libexec_PROGRAMS =
......
......@@ -14,7 +14,7 @@ mkdir "$t_" || fail=1
cd "$t_" || fail=1
echo "error: failed to get domain '4294967298'" > exp || fail=1
echo domname 4294967298 | $abs_top_builddir/src/virsh --quiet \
echo domname 4294967298 | $abs_top_builddir/tools/virsh --quiet \
--connect test://$abs_top_srcdir/docs/testnode.xml \
> /dev/null 2> err || fail=1
diff -u err exp || fail=1
......
......@@ -82,13 +82,13 @@ static int testCompareOutput(const char *expect_rel, const char *filter,
}
#endif
#define VIRSH_DEFAULT "../src/virsh", \
#define VIRSH_DEFAULT "../tools/virsh", \
"--connect", \
"test:///default"
static char *custom_uri;
#define VIRSH_CUSTOM "../src/virsh", \
#define VIRSH_CUSTOM "../tools/virsh", \
"--connect", \
custom_uri
......
virt-xml-validate
virt-xml-validate.1
*.1
Makefile
Makefile.in
virsh-net-edit.c
virsh-pool-edit.c
virsh
*.exe
.libs
.deps
bin_SCRIPTS = \
virt-xml-validate
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
EXTRA_DIST = $(ICON_FILES) virt-xml-validate.in virsh.pod
bin_SCRIPTS = virt-xml-validate
bin_PROGRAMS = virsh
man1_MANS = virt-xml-validate.1 virsh.1
virt-xml-validate: virt-xml-validate.in Makefile
sed -e 's,@SCHEMADIR@,$(pkgdatadir)/schemas,' < $< > $@ || (rm $@ && exit 1)
chmod +x $@
man1_MANS = virt-xml-validate.1
virt-xml-validate.1: virt-xml-validate
$(POD2MAN) $< $@
virsh_SOURCES = \
console.c console.h \
virsh.c
virsh_LDFLAGS = $(WARN_CFLAGS) $(COVERAGE_LDFLAGS)
virsh_LDADD = \
$(STATIC_BINARIES) \
$(WARN_CFLAGS) \
../src/libvirt.la \
../gnulib/lib/libgnu.la \
$(VIRSH_LIBS)
virsh_CFLAGS = \
-I$(top_srcdir)/gnulib/lib -I../gnulib/lib \
-I../include \
-I../src \
-DGETTEXT_PACKAGE=\"$(PACKAGE)\" \
-DLOCALEBASEDIR=\""$(datadir)/locale"\" \
$(COVERAGE_CFLAGS) \
$(LIBXML_CFLAGS) \
$(READLINE_CFLAGS)
BUILT_SOURCES = virsh-net-edit.c virsh-pool-edit.c
virsh-net-edit.c: virsh.c Makefile.am
rm -f $@-tmp
echo '/* Automatically generated from: $^ */' > $@-tmp
echo 'static int' >> $@-tmp
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' \
>> $@-tmp
chmod a-w $@-tmp
rm -f $@
mv $@-tmp $@
virsh-pool-edit.c: virsh.c Makefile.am
rm -f $@-tmp
echo '/* Automatically generated from: $^ */' > $@-tmp
echo 'static int' >> $@-tmp
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' \
>> $@-tmp
chmod a-w $@-tmp
rm -f $@
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
$(WINDRES) \
--input-format rc --input $< \
--output-format coff --output $@
endif
virsh.1: virsh.pod
$(POD2MAN) $< $@
EXTRA_DIST = virt-xml-validate.in
CLEANFILES = $(bin_SCRIPTS) $(man1_MANS)
%.1: %
pod2man -c "Virtualization Support" -r "$(PACKAGE)-$(VERSION)" $< $@
DISTCLEANFILES = $(BUILT_SOURCES)
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册