[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAK7LNAQu8a3RUmcAx2qT7Vb5FZVCwrVswvG9ybnUqc4BaUgmJQ@mail.gmail.com>
Date: Mon, 5 Aug 2024 15:14:05 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: Alexandre Courbot <gnurou@...il.com>
Cc: Nathan Chancellor <nathan@...nel.org>, Nicolas Schier <nicolas@...sle.eu>, linux-kbuild@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Makefile: add $(srctree) to dependency of
compile_commands.json target
On Sun, Aug 4, 2024 at 2:51 PM Alexandre Courbot <gnurou@...il.com> wrote:
>
> On Sat, Aug 3, 2024 at 10:47 PM Masahiro Yamada <masahiroy@...nel.org> wrote:
> >
> > On Sat, Aug 3, 2024 at 9:52 PM Alexandre Courbot <gnurou@...il.com> wrote:
> > >
> > > When trying to build the compile_commands.json target from an external
> > > module's directory, the following error is displayed:
> > >
> > > make[1]: *** No rule to make target 'scripts/clang-tools/gen_compile_commands.py',
> > > needed by 'compile_commands.json'. Stop.
> >
> >
> > Good catch.
> >
> > But, to reproduce this, O= option is also needed, right?
> >
> > e.g.
> >
> > $ make O=path/to/build/dir M=path/to/external/module/dir
>
> I am building the module as follows:
>
> $ make -C ../linux/build M=$PWD modules compile_commands.json
OK, this is equivalent to the command I gave.
You are building your external module
against the kernel built in a separate output directory.
--
Best Regards
Masahiro Yamada
Powered by blists - more mailing lists