[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 2/2] rules.mak: Fix find-in-path
From: |
Cornelia Huck |
Subject: |
[Qemu-devel] [PATCH 2/2] rules.mak: Fix find-in-path |
Date: |
Wed, 14 Nov 2012 14:12:19 +0100 |
Whitespace needs to be stripped before building the path and in
the end to ensure we really get an empty string.
Signed-off-by: Cornelia Huck <address@hidden>
---
rules.mak | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/rules.mak b/rules.mak
index 1b173aa..66b1d79 100644
--- a/rules.mak
+++ b/rules.mak
@@ -55,9 +55,9 @@ set-vpath = $(if $1,$(foreach
PATTERN,$(VPATH_SUFFIXES),$(eval vpath $(PATTERN)
# 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), \
+find-in-path = $(strip $(if $(find-string /, $1), \
$(wildcard $1), \
- $(wildcard $(patsubst %, %/$1, $(subst :, ,$(PATH)))))
+ $(wildcard $(patsubst %, %/$(strip $1), $(subst :, ,$(PATH))))))
# Generate files with tracetool
TRACETOOL=$(PYTHON) $(SRC_PATH)/scripts/tracetool.py
--
1.7.12.4