Re: [PATCH v1 01/18] gen_compile_commands: Allow the line prefix to still be cmd_

From: Masahiro Yamada
Date: Tue Oct 03 2023 - 10:31:59 EST


On Thu, Sep 28, 2023 at 11:26 PM Nicolas Schier <nicolas@xxxxxxxxx> wrote:
>
> On Mon, 25 Sep 2023 09:06:11 -0700, Ian Rogers wrote:
> > On Mon, Sep 25, 2023 at 8:49 AM Nick Desaulniers
> > <ndesaulniers@xxxxxxxxxx> wrote:
> > >
> > > On Fri, Sep 22, 2023 at 10:35 PM Ian Rogers <irogers@xxxxxxxxxx> wrote:
> > > >
> > > > Builds in tools still use the cmd_ prefix in .cmd files, so don't
> > > > require the saved part. Name the groups in the line pattern match so
> > >
> > > Is that something that can be changed in the tools/ Makefiles?
> > >
> > > I'm fine with this change, just curious where the difference comes
> > > from precisely.
> > > Reviewed-by: Nick Desaulniers <ndesaulniers@xxxxxxxxxx>
> >
> > I agree. The savedcmd_ change came from Masahiro in:
> > https://lore.kernel.org/lkml/20221229091501.916296-1-masahiroy@xxxxxxxxxx/
> > I was reluctant to change the build logic in tools/ because of the
> > potential to break things. Maybe Masahiro/Nicolas know of issues?
>
> I haven't seen any issues related to the introduction of savedcmd_; and
> roughly searching through tools/ I cannot find a rule that matches the
> pattern Masahiro described in commit 92215e7a801d ("kbuild: rename
> cmd_$@ to savedcmd_$@ in *.cmd files", 2022-12-29). For consistency,
> I'd like to see the build rules in tools/ re-use the ones from scripts/
> but as of now I don't see any necessity to introduce savedcmd in
> tools/, yet.
>
> Kind regards,
> Nicolas


tools/build/Build.include mimics scripts/Kbuild.include

That should be changed in the same way.


--
Best Regards
Masahiro Yamada