Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp6574947ybx; Mon, 11 Nov 2019 11:11:34 -0800 (PST) X-Google-Smtp-Source: APXvYqzpNqUyiqK4QgcBa2Rl8xVCA+Lm23z4zEYwrKoHZS/gEF/duSvgPYVoFiW+hg+T81Psdyn3 X-Received: by 2002:a05:6402:7cd:: with SMTP id u13mr27787880edy.246.1573499494352; Mon, 11 Nov 2019 11:11:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573499494; cv=none; d=google.com; s=arc-20160816; b=KbBRCtXwmnOVVT4LU849BmJf5bCQLoVdd2u2iR46CSuSiI9qujB/j9xMJ/Nuc7USXl HLXqUkm6to7+23P1aa8AzlZ0NSlFb1h3dguTU4OaJASAyjoOVBrJy/dEol5yfFOBViTg RhM/fCHOJA4JPfZYP1g2cE6/JJjdPj7NoCazuODXaURKNZKy5AoSFeZWhe0PCRwZ/EJK UTIVEG1/fml1xSsnzTOnA23lHGY/kpKwGGq3F36UOK5Y/sq0aGBgTDirs/Y2E4TXAqif D8tYPInkFbxX5Onp4PvuHQcQDlmOPo7IoKk9K6HiqbaJOyrQDFDb2lgeAbZpk+yiFjUf r/LA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=aG1TKZ8l4UIytsITXUOVHHZPuveK9+vr6TNQJRYShEA=; b=WNIJRGcg3sFmWzR4tlMkD3a9Wo+OwF6CQ4nFeJg0Irtx0MP2B4Cg2UmAmdU4GX2bgi khD21I1RuPs1fJUFc3mCwK7wq6FL+KJgTAIVVFTz00hn8JXxUwEG5+GiwyqB2RQ7RMEO Jg/Y5fFhhL21+uhcSMFWxSgja3t4oKYuiJiR1m7LaSrGEW5w6OMamcD71xobz7JTO1ty yrl4cmSt+VRfEIH+A/btFch09HwkbHbA8VnWBRTLroHdmAelftWPxBBHz/HFFHxsr9TM XLtamVzrn1/Qi709l4xjHU8b13X03NoSBtcoblC5i77On4Duds+FaKAk7CelxX2HRbO6 D5BA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="uq9S/CcG"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e21si10169063ejt.77.2019.11.11.11.11.10; Mon, 11 Nov 2019 11:11:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="uq9S/CcG"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728568AbfKKSfj (ORCPT + 99 others); Mon, 11 Nov 2019 13:35:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:53536 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728413AbfKKSff (ORCPT ); Mon, 11 Nov 2019 13:35:35 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AA079214E0; Mon, 11 Nov 2019 18:35:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573497335; bh=6VIKjkADuQVWzy7sSUCb36dA36xQEKAE3RYlBg5BnCQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uq9S/CcGv/2CbRY1du1SC2fhlfhi13wycmboyNaqpTtNF7u0Oq4dEea+WtKfRf/YK Uqhym80QjLCoJwAtiq1+/Y379t24ClWx+2Iy6ZeF0DX42HKOcJ4nNzROky156SAMvn dR7v3fmjpdAZzlBB/+IgfqdJ0/Pxln8HBj6l8vqc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Shuah Khan , Bartosz Golaszewski Subject: [PATCH 4.14 019/105] tools: gpio: Use !building_out_of_srctree to determine srctree Date: Mon, 11 Nov 2019 19:27:49 +0100 Message-Id: <20191111181433.608041362@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191111181421.390326245@linuxfoundation.org> References: <20191111181421.390326245@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Shuah Khan commit 4a6a6f5c4aeedb72db871d60bfcca89835f317aa upstream. make TARGETS=gpio kselftest fails with: Makefile:23: tools/build/Makefile.include: No such file or directory When the gpio tool make is invoked from tools Makefile, srctree is cleared and the current logic check for srctree equals to empty string to determine srctree location from CURDIR. When the build in invoked from selftests/gpio Makefile, the srctree is set to "." and the same logic used for srctree equals to empty is needed to determine srctree. Check building_out_of_srctree undefined as the condition for both cases to fix "make TARGETS=gpio kselftest" build failure. Cc: stable@vger.kernel.org Signed-off-by: Shuah Khan Signed-off-by: Bartosz Golaszewski Signed-off-by: Greg Kroah-Hartman --- tools/gpio/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- a/tools/gpio/Makefile +++ b/tools/gpio/Makefile @@ -3,7 +3,11 @@ include ../scripts/Makefile.include bindir ?= /usr/bin -ifeq ($(srctree),) +# This will work when gpio is built in tools env. where srctree +# isn't set and when invoked from selftests build, where srctree +# is set to ".". building_out_of_srctree is undefined for in srctree +# builds +ifndef building_out_of_srctree srctree := $(patsubst %/,%,$(dir $(CURDIR))) srctree := $(patsubst %/,%,$(dir $(srctree))) endif