Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp427432rwr; Thu, 4 May 2023 22:29:15 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5ppivMmI0xVuWDsB8BGak+jQU9X7X6BlW1fKLt2hYH7TGE0hDVKIpNN/dlHGAbdVpZIvGF X-Received: by 2002:a17:902:b946:b0:1a6:b23c:3bf2 with SMTP id h6-20020a170902b94600b001a6b23c3bf2mr306537pls.10.1683264555507; Thu, 04 May 2023 22:29:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683264555; cv=none; d=google.com; s=arc-20160816; b=Y7uJOKnMRgoKc/rNsT2bSYiQc92P6VHNAZHqM4g8+l55HjJjSzrXlnS95AeyQkPj6D V6+6ZFaBZ8AXHlk5JSk9x1mXkA6j+efUNd2qjevp4W1Q94wDDtjZa1Z2SmUjLLsNbvX2 Z8Qi5EybEJ4InnnAMWtacWhB40OISy5DVDZPd3aCyBe2qQCtmCmk03FQV7Eutu36RaVb j58GLU7n7O1OdF3cVSqKF4B390TeaDG6h7MoNf34bTltOvHiUjzbKRBH8Ug10OgEivZf Vgl2rsvt2QEvA/QQhrrhNXH3uRiDCODIekoBoexgBvsegr3/iUFzS29di9ZPo8Jn7WC9 1VsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=0zXjXv+1G4ZybITig+7z1iUd7tADDrJ0Q9usvuq9MzE=; b=NQgjCopDCCvxBnhb9ypngFdg+SMRHtnxbAe4ZA70kdB+c1t29EyEatptppK9ntoiv3 UW23+hrIA/+EEZpBVShZJ3rQXF68REvz8kC5pVlhC6y8jEjdrNou+9MeEYkV5GakYWNR pZxIC356e2/6JanVBmzkWPbQvfHmZ8Xympl/Cqhp3zs4TuTQiCRvZPrhrd2un/FGfUSV 0elBK+Uc3rV6qmHlWoOgm8YEXdg3xwpGAcY981ent5l/5lb7l+gO8WW07KJmJY7TX2ui zhyouogk8aNIU3Vw2CL7/bXV8YlrSThRaJvLqoebZ3luWBNbaHiIAgCl4nmCCUJLCnNN wwMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XQ0cZ8tn; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lb15-20020a17090b4a4f00b0024e4036717csi5934498pjb.100.2023.05.04.22.29.01; Thu, 04 May 2023 22:29:15 -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=@kernel.org header.s=k20201202 header.b=XQ0cZ8tn; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229890AbjEEFOV (ORCPT + 99 others); Fri, 5 May 2023 01:14:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229514AbjEEFOT (ORCPT ); Fri, 5 May 2023 01:14:19 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB24D9005; Thu, 4 May 2023 22:14:18 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4B21163AEB; Fri, 5 May 2023 05:14:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A41D8C4339E; Fri, 5 May 2023 05:14:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1683263657; bh=d0ANg4G4/eCsbU4DJVo5bdh0nxpbJnnl6hG/u6KVZE8=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=XQ0cZ8tnrBD4Io+lEeZX7y9NWe0Gev9ptiv5YaXI1N5SgGxiAm8xrzQVP6soJ5fR/ +OJTHuK4oOzK3+xJuNodce0Glkn2wmp8aR04W/tZc2gBqhfnMISZkwDJQBzu4bOnr9 uyv7mCbAVsF8DfdMK5uinqhY7UDVA51RRzXbpEu+OSSLO4peVh+exsD6PkXS+fLEDw B4dg4wsXOwWdSEGrP+bSUOG9ifTZ7GfNBPpvdwwbki1z0HhdRAyiXGtw4JN/lSJxNt jV/+C8yYQFHbY8l1Lo1o0mPFcg1StH8ytrz+cSFIiS68W84eFeU9nmn/COxQ20FZCf 80x6pmEPrROcg== Received: by mail-oi1-f174.google.com with SMTP id 5614622812f47-3908c252609so767089b6e.1; Thu, 04 May 2023 22:14:17 -0700 (PDT) X-Gm-Message-State: AC+VfDzY5CCek4FDyPcj7qXDMVbht5yfiVni9D9wGji1cjcenc+3RR0h Y+4jCh1X2DbJpTy1Kzv++FxaKS4jcaikUr48JFI= X-Received: by 2002:a05:6808:243:b0:38e:2d19:5144 with SMTP id m3-20020a056808024300b0038e2d195144mr2524044oie.53.1683263656915; Thu, 04 May 2023 22:14:16 -0700 (PDT) MIME-Version: 1.0 References: <20230504201833.202494-1-darwi@linutronix.de> <20230504201833.202494-2-darwi@linutronix.de> <20230504213246.GB1666363@dev-arch.thelio-3990X> In-Reply-To: From: Masahiro Yamada Date: Fri, 5 May 2023 07:13:40 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v1 1/1] scripts/tags.sh: Fix gtags generation for O= kernel builds To: "Ahmed S. Darwish" Cc: Nathan Chancellor , Nick Desaulniers , Nicolas Schier , Thomas Gleixner , linux-kbuild@vger.kernel.org, LKML Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On Fri, May 5, 2023 at 12:00=E2=80=AFAM Ahmed S. Darwish wrote: > > Hi Nathan, > > On Thu, 04 May 2023, Nathan Chancellor wrote: > > > > On Thu, May 04, 2023 at 10:18:33PM +0200, Ahmed S. Darwish wrote: > ... > > > + suffixparams=3D > > > + if [ -v O ]; then > > > > I think > > > > if [ -n "$O" ]; then > > > > would match the style preferred by Kbuild (though that is usually for > > portability sake, which probably does not matter here since bash is > > explicitly requested). Perhaps not worth addressing if there is no othe= r > > reason for a v2. > > > > Thanks, I'll do it. I've just discovered that a v2 is necessary anyway. > > If O=3D has a "~", for example as in: > > make O=3D~/build/ gtags > > the snippet below: > > > > + suffixparams=3D"-C $tree $O" > > > + fi > > > + all_target_sources | gtags -i -f - $suffixparams > ^ > will fail since the "~" in the O=3D directory path won't get dereferenced > before getting passed to the gtags call (an eval is needed). > > I'll submit a v2 shortly. > > Kind regards, > > -- > Ahmed S. Darwish > Linutronix GmbH It is wrong to check whether you are building out of the source tree. See line 159 of the Makefile. BTW, this patch does not work for me. It spits a ton of "not found" warnings, then generates empty tags. $ make O=3Dbuild gtags make[1]: Entering directory '/home/masahiro/ref/linux/build' GEN gtags Warning: '../arch/x86/include/asm/vmalloc.h' not found. ignored. Warning: '../arch/x86/include/asm/pgtable-3level_types.h' not found. ignore= d. Warning: '../arch/x86/include/asm/paravirt.h' not found. ignored. Warning: '../arch/x86/include/asm/text-patching.h' not found. ignored. Warning: '../arch/x86/include/asm/softirq_stack.h' not found. ignored. Warning: '../arch/x86/include/asm/intel_ds.h' not found. ignored. Warning: '../arch/x86/include/asm/resctrl.h' not found. ignored. Warning: '../arch/x86/include/asm/setup_arch.h' not found. ignored. Warning: '../arch/x86/include/asm/simd.h' not found. ignored. Warning: '../arch/x86/include/asm/mmconfig.h' not found. ignored. Warning: '../arch/x86/include/asm/pgtable_types.h' not found. ignored. Warning: '../arch/x86/include/asm/mem_encrypt.h' not found. ignored. Warning: '../arch/x86/include/asm/dmi.h' not found. ignored. Warning: '../arch/x86/include/asm/thermal.h' not found. ignored. ... --=20 Best Regards Masahiro Yamada