Received: by 2002:a05:6358:98a5:b0:11e:80f4:e92 with SMTP id q37csp23773rwa; Thu, 4 May 2023 13:48:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4r3EbHG6XIKFvecNnQDbeV/zlOonhlw3EYFKahg+BaVDFIm/QxPkosz8NU+fIiBbSZ8ofb X-Received: by 2002:a17:90a:c217:b0:24e:1b19:867f with SMTP id e23-20020a17090ac21700b0024e1b19867fmr3380557pjt.37.1683233302854; Thu, 04 May 2023 13:48:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683233302; cv=none; d=google.com; s=arc-20160816; b=qij7G+DRk9XikjmERYEfD9YRZLqTLbTtKJQUpMPcTC+RObKwNYt5jDzKAAtIm+MNJH 7EbaJf58gz80qC10ZdnHjIXxuJwLcnflqod1bXdMwl1oWKrutzL2+jb4EqUl4O3d8uwO K6ZNNEGDb3d0rQ/TZxFHoLsb4xP+kxwKMfmnm5GhNmFA68HUac/52XTxcnTn3f+wu88y QhheWCrfpiESySnzNsyAJA1wGGLp+wFYRwbmQFXKrv3OZQdztb6e1fqOXmZDZ0rInvhz +xx6OSkR9JO+b1LkQxzV4yADRmXzX/UzcgriTpRSTLL2D6ZFTDUy+45FATAg2E4HSB99 BdvQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:dkim-signature :dkim-signature:from; bh=XQ86TMvno5qeng6U0rCVgoMQaGJVwnTJIy9oD2h9Q1A=; b=j+U+DKsHVv4J8jeme3WbHuhQ8d1BjIiBaR39B9Yz8Xlf4Fw6SF3eDLi6HP4oAMdcq7 DrmsdbEGlB7oMnuuce4Et2Rtm67/tZs+Gp2FQTzqm+Tz7CP5qRQfqxme9AFFNBZybblm yLAitxyc8ku8EazVCzx9WJE91R+AT8L+p7bEIJjUpL+qiAcp0+TlVRr8DIUr2WhOV75d troNGS1iQ0ATIohuhXa8MUg7CSNPGB9tmNliPPLG3MYgQhqJ55wSFGkoo9eH+LzzEOuU GN798Tqk1tNyU2c4fsHt2eBYASjjmLpzDX9BjUUopGCbsLmDAkdbTGEqNWu3frdQoaz9 43Sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="BEE9oUQ/"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id my13-20020a17090b4c8d00b002475916f319si18354369pjb.148.2023.05.04.13.48.10; Thu, 04 May 2023 13:48:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="BEE9oUQ/"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230434AbjEDUbb (ORCPT + 99 others); Thu, 4 May 2023 16:31:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230084AbjEDUbO (ORCPT ); Thu, 4 May 2023 16:31:14 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D70D518DCA; Thu, 4 May 2023 13:20:03 -0700 (PDT) From: "Ahmed S. Darwish" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1683231558; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XQ86TMvno5qeng6U0rCVgoMQaGJVwnTJIy9oD2h9Q1A=; b=BEE9oUQ/E2WZ1iOrhE5rFNn7EV5qH7DX8gPHCT11aJrUiXf3PxrF/5hqFdCeg9DOvCYFlm BKBTKhA9ABi4/TqM6rNfDfSRx2JGaBERFCwFZXC5kGnnvCap+TLx3LcNgMgq8Y/ymRxfUd vt7bOcG1QerPAeaEpEGYWq/74wVc0vaicLN8zg600580VpDNhhXjduFGMTxf1G9SYfq1jA Hpy//bDtkaLjtEuzlrhRaar6+4it0UgzSVtU+dp5u/PMBq5cYdcpNeVLK6yKGh3AzjHhrg 6cuwfvo95TTjBjcUYQJqJ8TeIMe3+JhImTMO8FEFu0acu/GaiEdgNFW9rgvrEg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1683231558; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XQ86TMvno5qeng6U0rCVgoMQaGJVwnTJIy9oD2h9Q1A=; b=M4w+POcjZb2xIsQOBUzBJeslZ2v85/wkjHh+e8SvBtE9m4SbvpmFev6+6JmT61ROUnd4AX 10NbKaqPaMOxfuBQ== To: Masahiro Yamada , Nathan Chancellor , Nick Desaulniers , Nicolas Schier Cc: Thomas Gleixner , linux-kbuild@vger.kernel.org, LKML , "Ahmed S. Darwish" Subject: [PATCH v1 1/1] scripts/tags.sh: Fix gtags generation for O= kernel builds Date: Thu, 4 May 2023 22:18:33 +0200 Message-Id: <20230504201833.202494-2-darwi@linutronix.de> In-Reply-To: <20230504201833.202494-1-darwi@linutronix.de> References: <20230504201833.202494-1-darwi@linutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org gtags considers any file outside of its current working directory "outside the source tree" and refuses to index it. For O= kernel builds, scripts/tags.sh invokes gtags with the current working directory set to ${O}. This leads to gtags ignoring the entire kernel source and generating an empty index. For O= builds, set gtags' working directory to the kernel source tree and explicitly set its output path through parameters instead. Signed-off-by: Ahmed S. Darwish --- scripts/tags.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/tags.sh b/scripts/tags.sh index ea31640b2671..1a6db535503b 100755 --- a/scripts/tags.sh +++ b/scripts/tags.sh @@ -131,7 +131,14 @@ docscope() dogtags() { - all_target_sources | gtags -i -f - + # gtags refuses to index any file outside of the current working + # directory. For O= builds, set the current working directory to + # the kernel source tree and the output tags dir to ${O}. + suffixparams= + if [ -v O ]; then + suffixparams="-C $tree $O" + fi + all_target_sources | gtags -i -f - $suffixparams } # Basic regular expressions with an optional /kind-spec/ for ctags and -- 2.30.2