aboutsummaryrefslogtreecommitdiff
path: root/rules.mak
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2010-10-21 10:18:40 +0200
committerBlue Swirl <blauwirbel@gmail.com>2010-10-23 14:47:13 +0000
commit2b2e59e6c95beff2248069b2b129ba8c92c5f4d3 (patch)
tree5da0de333e6c15f9a25f63cf8826e0cc7a79c007 /rules.mak
parent48118b020558bb4cde05894d9d8322a20cbb2f8d (diff)
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 <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'rules.mak')
-rw-r--r--rules.mak9
1 files changed, 9 insertions, 0 deletions
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