qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

migration-test: Only generate a single target architecture

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=foo- -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 <quintela@redhat.com>
Message-Id: <20180913132313.11370-1-quintela@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

authored by

Juan Quintela and committed by
Dr. David Alan Gilbert
36bd9e3c 18613dc6

+14 -9
+14 -9
tests/migration/Makefile
··· 9 9 10 10 SRC_PATH = ../.. 11 11 12 + .PHONY: help $(TARGET_LIST) 13 + help: 14 + @echo "Create migration guest includes. We generate a binary." 15 + @echo "And then convert that binary to an include file that can be" 16 + @echo "run in a guest." 17 + @echo "Possible operations are:" 18 + @echo 19 + @echo " $(MAKE) clean Remove all intermediate files" 20 + @echo " $(MAKE) target Generate for that target" 21 + @echo " $(MAKE) CROSS_PREFIX=... target" 22 + @echo " Cross-compile than target" 23 + @echo " Possible targets are: $(TARGET_LIST)" 24 + 12 25 override define __note 13 26 /* This file is automatically generated from the assembly file in 14 27 * tests/migration/$@. Edit that file and then run "make all" ··· 18 31 endef 19 32 export __note 20 33 21 - find-arch-cross-cc = $(lastword $(shell grep -h "CROSS_CC_GUEST=" $(wildcard $(SRC_PATH)/$(patsubst i386,*86*,$(1))-softmmu/config-target.mak) /dev/null)) 22 - parse-cross-prefix = $(subst gcc,,$(patsubst cc,gcc,$(patsubst CROSS_CC_GUEST="%",%,$(call find-arch-cross-cc,$(1))))) 23 - gen-cross-prefix = $(patsubst %-,CROSS_PREFIX=%-,$(call parse-cross-prefix,$(1))) 24 - 25 - .PHONY: all $(TARGET_LIST) 26 - 27 - all: $(TARGET_LIST) 28 - 29 34 $(TARGET_LIST): 30 - $(MAKE) -C $@ $(call gen-cross-prefix,$@) 35 + $(MAKE) CROSS_PREFIX=$(CROSS_PREFIX) -C $@ 31 36 32 37 clean: 33 38 for target in $(TARGET_LIST); do \