From 2b2e59e6c95beff2248069b2b129ba8c92c5f4d3 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 21 Oct 2010 10:18:40 +0200 Subject: rewrite i386 tests Makefile 1) compute path to i386 compiler from configure. If it is found, run the i386 tests. I use macros so that this approach could be applied for other arches as well. 2) provide an easily extensible way to add tests Most tests fail, but at least "make test" does something meaningful. Signed-off-by: Paolo Bonzini Signed-off-by: Blue Swirl --- rules.mak | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'rules.mak') diff --git a/rules.mak b/rules.mak index c843a131e8..6dac7773d5 100644 --- a/rules.mak +++ b/rules.mak @@ -42,6 +42,15 @@ cc-option = $(if $(shell $(CC) $1 $2 -S -o /dev/null -xc /dev/null \ VPATH_SUFFIXES = %.c %.h %.S %.m %.mak %.texi set-vpath = $(if $1,$(foreach PATTERN,$(VPATH_SUFFIXES),$(eval vpath $(PATTERN) $1))) +# find-in-path +# Usage: $(call find-in-path, prog) +# Looks in the PATH if the argument contains no slash, else only considers one +# specific directory. Returns an # empty string if the program doesn't exist +# there. +find-in-path = $(if $(find-string /, $1), \ + $(wildcard $1), \ + $(wildcard $(patsubst %, %/$1, $(subst :, ,$(PATH))))) + # Generate timestamp files for .h include files %.h: %.h-timestamp -- cgit v1.2.1