Re: cifs: Fix tracing build error with O=

From: Masahiro Yamada
Date: Thu Jun 20 2019 - 08:02:13 EST

On Thu, Jun 20, 2019 at 4:58 PM Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> wrote:
> On Thu, Jun 20, 2019 at 06:54:42AM +0000, yamada.masahiro@xxxxxxxxxxxxx wrote:
> >
> > I cannot reproduce the build error on the latest Linus tree.
> >
> >
> > $ make O=build allmodconfig fs/cifs/
> >
> > perfectly works for me.
> I was trying to build just the fs/cifs directory with
> make O=build M=fs/cifs
> But I see now that this can't possibly work as M= only supports
> absolute paths. As M= is supposed to replace SUBDIRS=, what are
> we supposed to do to build just a directory?

Documentation/kbuild/kbuild.txt says
M= and KBUILD_EXTMOD (and older form SUBDIRS= too)
are for building external modules.

Yet, many people still wrongly use them to build
in-kernel directories just because they seem to work
(but do not really).

The similar question, and the answer is here:

Best Regards
Masahiro Yamada