From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45033) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gAgaq-00056R-I8 for qemu-devel@nongnu.org; Thu, 11 Oct 2018 15:25:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gAgan-0001pI-C0 for qemu-devel@nongnu.org; Thu, 11 Oct 2018 15:25:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34948) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gAgan-0001ol-5C for qemu-devel@nongnu.org; Thu, 11 Oct 2018 15:25:53 -0400 From: "Dr. David Alan Gilbert (git)" Date: Thu, 11 Oct 2018 20:25:13 +0100 Message-Id: <20181011192513.63634-8-dgilbert@redhat.com> In-Reply-To: <20181011192513.63634-1-dgilbert@redhat.com> References: <20181011192513.63634-1-dgilbert@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 7/7] migration-test: Only generate a single target architecture List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, quintela@redhat.com Cc: wei@redhat.com, thuth@redhat.com, i.maximets@samsung.com, den@openvz.org From: Juan Quintela Several changes: - We only allow generate header "inside" the tree. Why? Because we need to connit the result, so it makes no sense to generate them on the build dir. - We only generate a single target each time. Getting all the cross-compilers correctly is an impossible task. So know you do: make -C tests/migration $target (native) make CROSS_PREFIX=3Dfoo- -C tests/migratiion $target (cross) And you are done. - If we are building out of tree, we have no data about if we are cross-compile or whatever. So instead of guess what is happening, just do what I pointed on previous point. Signed-off-by: Juan Quintela Message-Id: <20180913132313.11370-1-quintela@redhat.com> Signed-off-by: Dr. David Alan Gilbert --- tests/migration/Makefile | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/tests/migration/Makefile b/tests/migration/Makefile index ff726ed7dd..13e99b1692 100644 --- a/tests/migration/Makefile +++ b/tests/migration/Makefile @@ -9,6 +9,19 @@ TARGET_LIST =3D i386 aarch64 s390x =20 SRC_PATH =3D ../.. =20 +.PHONY: help $(TARGET_LIST) +help: + @echo "Create migration guest includes. We generate a binary." + @echo "And then convert that binary to an include file that can be" + @echo "run in a guest." + @echo "Possible operations are:" + @echo + @echo " $(MAKE) clean Remove all intermediate files" + @echo " $(MAKE) target Generate for that target" + @echo " $(MAKE) CROSS_PREFIX=3D... target" + @echo " Cross-compile than target" + @echo " Possible targets are: $(TARGET_LIST)" + override define __note /* This file is automatically generated from the assembly file in * tests/migration/$@. Edit that file and then run "make all" @@ -18,16 +31,8 @@ override define __note endef export __note =20 -find-arch-cross-cc =3D $(lastword $(shell grep -h "CROSS_CC_GUEST=3D" $(= wildcard $(SRC_PATH)/$(patsubst i386,*86*,$(1))-softmmu/config-target.mak= ) /dev/null)) -parse-cross-prefix =3D $(subst gcc,,$(patsubst cc,gcc,$(patsubst CROSS_C= C_GUEST=3D"%",%,$(call find-arch-cross-cc,$(1))))) -gen-cross-prefix =3D $(patsubst %-,CROSS_PREFIX=3D%-,$(call parse-cross-= prefix,$(1))) - -.PHONY: all $(TARGET_LIST) - -all: $(TARGET_LIST) - $(TARGET_LIST): - $(MAKE) -C $@ $(call gen-cross-prefix,$@) + $(MAKE) CROSS_PREFIX=3D$(CROSS_PREFIX) -C $@ =20 clean: for target in $(TARGET_LIST); do \ --=20 2.19.0