[Qemu-devel] [RFC PATCH 3/3] tests/vm: expose BUILD_TARGET, TARGET_LIST and EXTRA_CONFIGURE_OPTS

Alex Bennée posted 3 patches 6 years, 9 months ago
[Qemu-devel] [RFC PATCH 3/3] tests/vm: expose BUILD_TARGET, TARGET_LIST and EXTRA_CONFIGURE_OPTS
Posted by Alex Bennée 6 years, 9 months ago
Now the underlying basevm support passes these along we can expose
some additional variables to our Makefile to allow more customised
tweaking of the build. For example:

  make vm-build-freebsd TARGET_LIST=aarch64-softmmu \
    EXTRA_CONFIGURE_OPTS="--disable-tools --disable-docs" \
    BUILD_TARGET=check-softfloat

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/vm/Makefile.include | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include
index a98fb3027f..6be53aa297 100644
--- a/tests/vm/Makefile.include
+++ b/tests/vm/Makefile.include
@@ -18,6 +18,11 @@ vm-test:
 	@echo ""
 	@echo "  vm-build-all                    - Build QEMU in all VMs"
 	@echo "  vm-clean-all                    - Clean up VM images"
+	@echo
+	@echo "Special variables:"
+	@echo "    BUILD_TARGET=foo		 - override the build target"
+	@echo "    TARGET_LIST=a,b,c    	 - Override target list in builds."
+	@echo '    EXTRA_CONFIGURE_OPTS="..."'
 
 vm-build-all: $(addprefix vm-build-, $(IMAGES))
 
@@ -45,6 +50,9 @@ vm-build-%: tests/vm/%.img
 		$(if $(J),--jobs $(J)) \
 		$(if $(V),--verbose) \
 		--image "$<" \
-		--build-qemu $(SRC_PATH), \
+		$(if $(BUILD_TARGET),--build-target $(BUILD_TARGET)) \
+		--build-qemu $(SRC_PATH) -- \
+		$(if $(TARGET_LIST),--target-list=$(TARGET_LIST)) \
+		$(if $(EXTRA_CONFIGURE_OPTS),$(EXTRA_CONFIGURE_OPTS)), \
 		"  VM-BUILD $*")
 
-- 
2.17.1


Re: [Qemu-devel] [RFC PATCH 3/3] tests/vm: expose BUILD_TARGET, TARGET_LIST and EXTRA_CONFIGURE_OPTS
Posted by Philippe Mathieu-Daudé 6 years, 9 months ago
On 1/21/19 6:15 PM, Alex Bennée wrote:
> Now the underlying basevm support passes these along we can expose
> some additional variables to our Makefile to allow more customised
> tweaking of the build. For example:
> 
>   make vm-build-freebsd TARGET_LIST=aarch64-softmmu \
>     EXTRA_CONFIGURE_OPTS="--disable-tools --disable-docs" \
>     BUILD_TARGET=check-softfloat
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  tests/vm/Makefile.include | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include
> index a98fb3027f..6be53aa297 100644
> --- a/tests/vm/Makefile.include
> +++ b/tests/vm/Makefile.include
> @@ -18,6 +18,11 @@ vm-test:
>  	@echo ""
>  	@echo "  vm-build-all                    - Build QEMU in all VMs"
>  	@echo "  vm-clean-all                    - Clean up VM images"
> +	@echo
> +	@echo "Special variables:"
> +	@echo "    BUILD_TARGET=foo		 - override the build target"
> +	@echo "    TARGET_LIST=a,b,c    	 - Override target list in builds."
> +	@echo '    EXTRA_CONFIGURE_OPTS="..."'
>  
>  vm-build-all: $(addprefix vm-build-, $(IMAGES))
>  
> @@ -45,6 +50,9 @@ vm-build-%: tests/vm/%.img
>  		$(if $(J),--jobs $(J)) \
>  		$(if $(V),--verbose) \
>  		--image "$<" \
> -		--build-qemu $(SRC_PATH), \
> +		$(if $(BUILD_TARGET),--build-target $(BUILD_TARGET)) \
> +		--build-qemu $(SRC_PATH) -- \
> +		$(if $(TARGET_LIST),--target-list=$(TARGET_LIST)) \
> +		$(if $(EXTRA_CONFIGURE_OPTS),$(EXTRA_CONFIGURE_OPTS)), \
>  		"  VM-BUILD $*")
>  

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>