Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp326130pxb; Mon, 16 Aug 2021 06:22:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyHfhS7xGrfLG3MpEqO59FOzi/6cJlknWIQ1rLw322PpwAbkuErVzmHuR5hjJSFs0fRX2fg X-Received: by 2002:a05:6402:2348:: with SMTP id r8mr16193500eda.184.1629120174524; Mon, 16 Aug 2021 06:22:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629120174; cv=none; d=google.com; s=arc-20160816; b=RL9/rPGEtvYH4TE59yGjE0QAByeR/ImU+0F5FPk6Y2mGHt0TtbJfQe+67Z6LK3y8Nq U4MF9JuaEYRc1lBO3VRs+mbOPJgGNlspm6+t8lKqMvP+P3tnCZevF1iePcT5ihh2+M42 NUY/rH1b7TiSUXAEu/4+yqvsqOQmS9hm+hrE/fA2AQY8AFtOER5cwzdZo6hu3nBhFVk9 y06baIWeYsueGwjpal8NIuOn2KXQ1tTxXH5jq3KCezRx/vF5oyFkgtVpv5W/uK/Et2CA syr5NdtZAXyh+/ALMJ3qxNStuHDderzl4baIbpiHOn/tcDzmuelNMAd6ErqFIndsU9E8 j/uA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=T3hBC5HEj8MZ+AOkNDt0m3k4JxZfCp/zLG/EJBytdBA=; b=olrVAvSXtOZ4cOEbfles9FHImDFat9/xBeHiB5ttq2TE8x9+47WT2pKW1qHnsGeKIe srVppT4b7F/lJWFGytHl0Gq6QoPt43kAK4xmW5WNGCFEXvPq5IFiIebA5zC6UPeryZ2f u2dEFflMX/RMi2A7dosioY2Sas+NdEuaxfp/tk+KKWcVmroY42EJYlO7ym+Pr/JcJfyK /NEYmKzlGjqLzGNYY5gJp3A3R4XvVztNtGg7nDBIVr+IkUT+yMG6iuCUSYEL4FD0kSnt 21wZ8QqwGm++DBP3f5BxWBwjkPeZ0T+o1k9brELb0pTXPJXeicZBZa0uWymqNWrKAmJh Ou5g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id by17si10577896edb.481.2021.08.16.06.22.31; Mon, 16 Aug 2021 06:22:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239925AbhHPNTS (ORCPT + 99 others); Mon, 16 Aug 2021 09:19:18 -0400 Received: from foss.arm.com ([217.140.110.172]:44114 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238575AbhHPNHq (ORCPT ); Mon, 16 Aug 2021 09:07:46 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9F6251FB; Mon, 16 Aug 2021 06:07:13 -0700 (PDT) Received: from e121896.arm.com (unknown [10.57.41.204]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 945273F66F; Mon, 16 Aug 2021 06:07:12 -0700 (PDT) From: James Clark To: acme@kernel.org, jolsa@kernel.org, linux-perf-users@vger.kernel.org Cc: James Clark , linux-kernel@vger.kernel.org Subject: [PATCH] tools build: Fix feature detect clean for out of source builds Date: Mon, 16 Aug 2021 14:07:05 +0100 Message-Id: <20210816130705.1331868-1-james.clark@arm.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently the clean target when using O= isn't cleaning the feature detect output. This is because O= and OUTPUT= are set to canonical paths. For example in tools/perf/Makefile: FULL_O := $(shell cd $(PWD); readlink -f $(O) || echo $(O)) This means that OUTPUT ends in a / and most usages prepend it to a file without adding an extra /. This line that was changed adds an extra / before the 'feature' folder but not to the end, resulting in a clean command like this: rm -f /tmp/build//featuretest-all.bin ... After the change the clean command looks like this: rm -f /tmp/build/feature/test-all.bin ... Signed-off-by: James Clark --- tools/build/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/build/Makefile b/tools/build/Makefile index 5ed41b96fcde..6f11e6fc9ffe 100644 --- a/tools/build/Makefile +++ b/tools/build/Makefile @@ -32,7 +32,7 @@ all: $(OUTPUT)fixdep # Make sure there's anything to clean, # feature contains check for existing OUTPUT -TMP_O := $(if $(OUTPUT),$(OUTPUT)/feature,./) +TMP_O := $(if $(OUTPUT),$(OUTPUT)feature/,./) clean: $(call QUIET_CLEAN, fixdep) -- 2.28.0