From patchwork Wed Nov 14 13:12:19 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cornelia Huck X-Patchwork-Id: 198903 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id A1DDF2C00B1 for ; Thu, 15 Nov 2012 00:12:45 +1100 (EST) Received: from localhost ([::1]:50535 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYclm-0001Ou-AI for incoming@patchwork.ozlabs.org; Wed, 14 Nov 2012 08:12:42 -0500 Received: from eggs.gnu.org ([208.118.235.92]:44600) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYclY-0001NU-BI for qemu-devel@nongnu.org; Wed, 14 Nov 2012 08:12:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TYclV-0002Nj-7W for qemu-devel@nongnu.org; Wed, 14 Nov 2012 08:12:28 -0500 Received: from e06smtp16.uk.ibm.com ([195.75.94.112]:38304) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYclU-0002NE-Uz for qemu-devel@nongnu.org; Wed, 14 Nov 2012 08:12:25 -0500 Received: from /spool/local by e06smtp16.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 14 Nov 2012 13:12:22 -0000 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp16.uk.ibm.com (192.168.101.146) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 14 Nov 2012 13:12:20 -0000 Received: from d06av05.portsmouth.uk.ibm.com (d06av05.portsmouth.uk.ibm.com [9.149.37.229]) by b06cxnps4074.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id qAEDCCOa58589218 for ; Wed, 14 Nov 2012 13:12:12 GMT Received: from d06av05.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av05.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id qAEDCK8N020208 for ; Wed, 14 Nov 2012 06:12:20 -0700 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d06av05.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id qAEDCJl8020164; Wed, 14 Nov 2012 06:12:19 -0700 From: Cornelia Huck To: qemu-devel , Paolo Bonzini , Anthony Liguori Date: Wed, 14 Nov 2012 14:12:19 +0100 Message-Id: <1352898739-57797-3-git-send-email-cornelia.huck@de.ibm.com> X-Mailer: git-send-email 1.7.12.4 In-Reply-To: <1352898739-57797-1-git-send-email-cornelia.huck@de.ibm.com> References: <1352898739-57797-1-git-send-email-cornelia.huck@de.ibm.com> x-cbid: 12111413-3548-0000-0000-000003ACD6D3 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 195.75.94.112 Subject: [Qemu-devel] [PATCH 2/2] rules.mak: Fix find-in-path X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 --- 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