diff options
Diffstat (limited to 'tests/migration/Makefile')
-rw-r--r-- | tests/migration/Makefile | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/migration/Makefile b/tests/migration/Makefile new file mode 100644 index 0000000000..dc3b551976 --- /dev/null +++ b/tests/migration/Makefile @@ -0,0 +1,35 @@ +# +# Copyright (c) 2018 Red Hat, Inc. and/or its affiliates +# +# This work is licensed under the terms of the GNU GPL, version 2 or later. +# See the COPYING file in the top-level directory. +# + +TARGET_LIST = i386 + +SRC_PATH = ../.. + +override define __note +/* This file is automatically generated from the assembly file in + * tests/migration/$@. Edit that file and then run "make all" + * inside tests/migration to update, and then remember to send both + * the header and the assembler differences in your patch submission. + */ +endef +export __note + +find-arch-cross-cc = $(lastword $(shell grep -h "CROSS_CC_GUEST=" $(wildcard $(SRC_PATH)/$(patsubst i386,*86*,$(1))-softmmu/config-target.mak) /dev/null)) +parse-cross-prefix = $(subst gcc,,$(patsubst cc,gcc,$(patsubst CROSS_CC_GUEST="%",%,$(call find-arch-cross-cc,$(1))))) +gen-cross-prefix = $(patsubst %-,CROSS_PREFIX=%-,$(call parse-cross-prefix,$(1))) + +.PHONY: all $(TARGET_LIST) + +all: $(TARGET_LIST) + +$(TARGET_LIST): + $(MAKE) -C $@ $(call gen-cross-prefix,$@) + +clean: + for target in $(TARGET_LIST); do \ + $(MAKE) -C $$target clean; \ + done |