Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759408AbcJQU23 (ORCPT ); Mon, 17 Oct 2016 16:28:29 -0400 Received: from smtp03.smtpout.orange.fr ([80.12.242.125]:55850 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758097AbcJQU2K (ORCPT ); Mon, 17 Oct 2016 16:28:10 -0400 X-ME-Helo: belgarion.home X-ME-Date: Mon, 17 Oct 2016 22:28:08 +0200 X-ME-IP: 109.220.223.51 From: Robert Jarzmik To: Michal Marek Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, Robert Jarzmik Subject: [PATCH] tags: honor COMPILED_SOURCE with apart output directory Date: Mon, 17 Oct 2016 22:27:59 +0200 Message-Id: <1476736079-11963-1-git-send-email-robert.jarzmik@free.fr> X-Mailer: git-send-email 2.1.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 861 Lines: 31 When the kernel is compiled with an "O=" argument, the object files are not necessarily in the source tree, and more probably in another tree. In this situation, the current used check doesn't work, and COMPILED_SOURCE tags is broken with O= builds. This patch fixes it by looking for object files both in source tree and potential destination tree. Signed-off-by: Robert Jarzmik --- scripts/tags.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/tags.sh b/scripts/tags.sh index b3775a9604ea..c0220fa05617 100755 --- a/scripts/tags.sh +++ b/scripts/tags.sh @@ -106,7 +106,9 @@ all_compiled_sources() case "$i" in *.[cS]) j=${i/\.[cS]/\.o} - if [ -e $j ]; then + k=${i/"$tree"/"$O"\/} + k=${k/\.[cS]/\.o} + if [ -e $j -o -e "$k" ]; then echo $i fi ;; -- 2.1.4