[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 009/150] tests/vm: check for Python YAML parser in the Makefile
From: |
Paolo Bonzini |
Subject: |
[PULL 009/150] tests/vm: check for Python YAML parser in the Makefile |
Date: |
Tue, 18 Aug 2020 10:08:04 -0400 |
No need to do it in the configure file if it is only used for a help message.
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configure | 9 ---------
tests/vm/Makefile.include | 6 +++++-
2 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/configure b/configure
index 1c17a0f27f..625c14c500 100755
--- a/configure
+++ b/configure
@@ -959,13 +959,6 @@ do
fi
done
-# Check for existence of python3 yaml, needed to
-# import yaml config files into vm-build.
-python_yaml="no"
-if $(python3 -c "import yaml" 2> /dev/null); then
- python_yaml="yes"
-fi
-
: ${smbd=${SMBD-/usr/sbin/smbd}}
# Default objcc to clang if available, otherwise use CC
@@ -6844,7 +6837,6 @@ if test "$docs" != "no"; then
echo "sphinx-build $sphinx_build"
fi
echo "genisoimage $genisoimage"
-echo "python_yaml $python_yaml"
echo "slirp support $slirp $(echo_version $slirp $slirp_version)"
if test "$slirp" != "no" ; then
echo "smbd $smbd"
@@ -7945,7 +7937,6 @@ echo "PYTHON=$python" >> $config_host_mak
echo "SPHINX_BUILD=$sphinx_build" >> $config_host_mak
echo "SPHINX_WERROR=$sphinx_werror" >> $config_host_mak
echo "GENISOIMAGE=$genisoimage" >> $config_host_mak
-echo "PYTHON_YAML=$python_yaml" >> $config_host_mak
echo "CC=$cc" >> $config_host_mak
if $iasl -h > /dev/null 2>&1; then
echo "IASL=$iasl" >> $config_host_mak
diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include
index a599d1994d..61f893ffdc 100644
--- a/tests/vm/Makefile.include
+++ b/tests/vm/Makefile.include
@@ -17,6 +17,10 @@ IMAGE_FILES := $(patsubst %, $(IMAGES_DIR)/%.img, $(IMAGES))
.PRECIOUS: $(IMAGE_FILES)
+ifneq ($(PYTHON),)
+HAVE_PYTHON_YAML = $(shell $(PYTHON) -c "import yaml" 2> /dev/null && echo yes)
+endif
+
# 'vm-help' target was historically named 'vm-test'
vm-help vm-test:
@echo "vm-help: Test QEMU in preconfigured virtual machines"
@@ -56,7 +60,7 @@ endif
@echo " QEMU_LOCAL=1 - Use QEMU binary local to this
build."
@echo " QEMU=/path/to/qemu - Change path to QEMU binary"
@echo " QEMU_IMG=/path/to/qemu-img - Change path to qemu-img tool"
-ifeq ($(PYTHON_YAML),yes)
+ifeq ($(HAVE_PYTHON_YAML),yes)
@echo " QEMU_CONFIG=/path/conf.yml - Change path to VM
configuration .yml file."
else
@echo " (install python3-yaml to enable support for yaml file to
configure a VM.)"
--
2.26.2
- [PULL 002/150] optionrom: simplify Makefile, (continued)
- [PULL 002/150] optionrom: simplify Makefile, Paolo Bonzini, 2020/08/18
- [PULL 005/150] meson: rename included C source files to .c.inc, Paolo Bonzini, 2020/08/18
- [PULL 011/150] nsis: use "make DESTDIR=" instead of "make prefix=", Paolo Bonzini, 2020/08/18
- [PULL 014/150] configure: prepare CFLAGS/CXXFLAGS/LDFLAGS for Meson, Paolo Bonzini, 2020/08/18
- [PULL 004/150] trace: switch position of headers to what Meson requires, Paolo Bonzini, 2020/08/18
- [PULL 008/150] tests/vm: do not pollute configure with --efi-aarch64, Paolo Bonzini, 2020/08/18
- [PULL 013/150] configure: expand path variables for meson configure, Paolo Bonzini, 2020/08/18
- [PULL 012/150] configure: do not include $(...) variables in config-host.mak, Paolo Bonzini, 2020/08/18
- [PULL 010/150] tests/docker: add test script for static linux-user builds, Paolo Bonzini, 2020/08/18
- [PULL 015/150] tests/vm: include setuptools, Paolo Bonzini, 2020/08/18
- [PULL 009/150] tests/vm: check for Python YAML parser in the Makefile,
Paolo Bonzini <=
- [PULL 017/150] configure: generate Meson cross file, Paolo Bonzini, 2020/08/18
- [PULL 018/150] build-sys hack: link with whole .fa archives, Paolo Bonzini, 2020/08/18
- [PULL 016/150] configure: integrate Meson in the build system, Paolo Bonzini, 2020/08/18
- [PULL 020/150] meson: move summary to meson.build, Paolo Bonzini, 2020/08/18
- [PULL 021/150] meson: enable pie, Paolo Bonzini, 2020/08/18
- [PULL 022/150] meson: use coverage option, Paolo Bonzini, 2020/08/18
- [PULL 019/150] build-sys: add meson submodule, Paolo Bonzini, 2020/08/18
- [PULL 028/150] contrib/libvhost-user: convert to Meson, Paolo Bonzini, 2020/08/18
- [PULL 029/150] tools/virtiofsd: convert to Meson, Paolo Bonzini, 2020/08/18
- [PULL 027/150] meson: add version.o, Paolo Bonzini, 2020/08/18