qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Cornelia Huck <cornelia.huck@de.ibm.com>
To: qemu-devel <qemu-devel@nongnu.org>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Anthony Liguori <aliguori@us.ibm.com>
Subject: [Qemu-devel] [PATCH 2/2] rules.mak: Fix find-in-path
Date: Wed, 14 Nov 2012 14:12:19 +0100	[thread overview]
Message-ID: <1352898739-57797-3-git-send-email-cornelia.huck@de.ibm.com> (raw)
In-Reply-To: <1352898739-57797-1-git-send-email-cornelia.huck@de.ibm.com>

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 <cornelia.huck@de.ibm.com>
---
 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

      parent reply	other threads:[~2012-11-14 13:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-14 13:12 [Qemu-devel] [PATCH 0/2] 'make test' build fixes Cornelia Huck
2012-11-14 13:12 ` [Qemu-devel] [PATCH 1/2] tests/tcg: test_path is not i386 only Cornelia Huck
2012-11-14 13:12 ` Cornelia Huck [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1352898739-57797-3-git-send-email-cornelia.huck@de.ibm.com \
    --to=cornelia.huck@de.ibm.com \
    --cc=aliguori@us.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).