[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK7LNAQ5Ay2iTyNwJ957S77ipdP1uLR3vehK+SEh17f3v0B_nw@mail.gmail.com>
Date: Sun, 10 Nov 2024 10:36:09 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: Nicolas Schier <nicolas@...sle.eu>
Cc: linux-kbuild@...r.kernel.org, Miguel Ojeda <ojeda@...nel.org>,
rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org,
Nathan Chancellor <nathan@...nel.org>
Subject: Re: [PATCH 19/23] kbuild: support building external modules in a
separate build directory
On Fri, Oct 4, 2024 at 4:47 AM Nicolas Schier <nicolas@...sle.eu> wrote:
> > @@ -109,6 +109,9 @@ executed to make module versioning work.
> > directory where the external module (kbuild file) is
> > located.
> >
> > + MO=$BUILD_DIR
> > + Speficies a separate output directory for the external module.
>
> s/Speficies/Specifies/
Thanks, I will fix.
>
> > +
> > 2.3 Targets
> > ===========
> >
> > diff --git a/Makefile b/Makefile
> > index 9fbf7ef6e394..b654baa0763a 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -134,6 +134,10 @@ ifeq ("$(origin M)", "command line")
> > KBUILD_EXTMOD := $(M)
> > endif
> >
> > +ifeq ("$(origin MO)", "command line")
> > + KBUILD_EXTMOD_OUTPUT := $(MO)
> > +endif
> > +
> > $(if $(word 2, $(KBUILD_EXTMOD)), \
> > $(error building multiple external modules is not supported))
>
> Should we also check against multiple output directories?
I do not think so.
When a directory path contains a space,
it should be treated as-is, in general.
However, GNU Make is not good at handling spaces in files paths.
So, this will fail eventually (with a little more obscure way).
$ make O=build M=fs/btrfs MO='/tmp/AA BB/btffs'
Makefile:214: *** failed to create output directory "/tmp/AA BB/btffs". Stop.
> > -export building_out_of_srctree srctree VPATH
> > +ifeq ($(realpath $(_vpath)),$(CURDIR))
>
> Just a style consistency question: 'ifeq (,)' with a space after ',' (as a few
> lines above) or without as used here?
Maybe, we should keep consistency.
But, this line will be removed in v2.
--
Best Regards
Masahiro Yamada
Powered by blists - more mailing lists