Re: [PATCH] Makefile: add $(srctree) to dependency of compile_commands.json target

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Aug 4, 2024 at 2:51 PM Alexandre Courbot <gnurou@xxxxxxxxx> wrote:
>
> On Sat, Aug 3, 2024 at 10:47 PM Masahiro Yamada <masahiroy@xxxxxxxxxx> wrote:
> >
> > On Sat, Aug 3, 2024 at 9:52 PM Alexandre Courbot <gnurou@xxxxxxxxx> 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





[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux