All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masahiro Yamada <yamada.masahiro@socionext.com>
To: Kieran Bingham <kbingham@kernel.org>
Cc: Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
	Michal Marek <michal.lkml@markovi.net>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/6] kbuild: allow Kbuild to start from any directory
Date: Tue, 2 Apr 2019 23:23:14 +0900	[thread overview]
Message-ID: <CAK7LNASXGWD02KJfZ0=me_Brp-E6T30huzuNMSzd3dGwrjTxzQ@mail.gmail.com> (raw)
In-Reply-To: <ad958d87-1e1e-2790-2f7e-380d4d9d67da@kernel.org>

Hi Kieran,


On Tue, Apr 2, 2019 at 1:41 PM Kieran Bingham <kbingham@kernel.org> wrote:
>
> Hi Yamada-san,
>
> Thank you for the patches,
>
> I like the direction this series is taking.
>
> Small spelling error spotted below...
> But as I've now gone through all of it I'll offer
>
> Reviewed-by: Kieran Bingham <kbingham@kernel.org>
>
>
> On 30/03/2019 12:04, Masahiro Yamada wrote:
> > Kbuild always runs in the top of the output directory.
> >
> > If Make starts in the source directory with O=, it relocates the
> > working directory to the location specified by O=.
> >
> > Also, users can start build from the output directory by using the
> > Makefile generated by scripts/mkmakefile.
> >
> > With a little more effort, Kbuild will be able to start from any
> > directory path.
> >
> > This commit allows to specify the source directory by using
> > the -f option.
> >
> > For example, you can do:
> >
> >   $ cd path/to/output/dir
> >   $ make -f path/to/source/dir/Makefile
> >
> > Or, for the equivalent behavior, you can do:
> >
> >   $ make O=path/to/output/dir -f path/to/source/dir/Makefile
> >
> > KBUILD_SRC is now deprecated.
> >
> > Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> > ---
> >
> >  Makefile | 87 +++++++++++++++++++++++++++++++++++++---------------------------
> >  1 file changed, 50 insertions(+), 37 deletions(-)
> >
> > diff --git a/Makefile b/Makefile
> > index 9cbd367..1b2a70e 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -96,56 +96,65 @@ endif
> >
> >  export quiet Q KBUILD_VERBOSE
> >
> > -# kbuild supports saving output files in a separate directory.
> > -# To locate output files in a separate directory two syntaxes are supported.
> > -# In both cases the working directory must be the root of the kernel src.
> > +# Kbuild will save output files in the current working directory.
> > +# This does not need to match to the root of the kernel source tree.
> > +#
> > +# For example, you can do this:
> > +#
> > +#  cd /dir/to/store/output/files; make -f /dir/to/kernel/source/Makefile
> > +#
> > +# If you want to save output files in a different location, there are
> > +# two syntaxes to specify it.
> > +#
> >  # 1) O=
> >  # Use "make O=dir/to/store/output/files/"
> >  #
> >  # 2) Set KBUILD_OUTPUT
> > -# Set the environment variable KBUILD_OUTPUT to point to the directory
> > -# where the output files shall be placed.
> > -# export KBUILD_OUTPUT=dir/to/store/output/files/
> > -# make
> > +# Set the environment variable KBUILD_OUTPUT to point to the output directory.
> > +# export KBUILD_OUTPUT=dir/to/store/output/files/; make
> >  #
> >  # The O= assignment takes precedence over the KBUILD_OUTPUT environment
> >  # variable.
> >
> > -# KBUILD_SRC is not intended to be used by the regular user (for now),
> > -# it is set on invocation of make with KBUILD_OUTPUT or O= specified.
> > -
> > -# OK, Make called in directory where kernel src resides
> > -# Do we want to locate output files in a separate directory?
> > +# Do we want to change the working directory?
> >  ifeq ("$(origin O)", "command line")
> >    KBUILD_OUTPUT := $(O)
> >  endif
> >
> > -ifneq ($(words $(subst :, ,$(CURDIR))), 1)
> > -  $(error main directory cannot contain spaces nor colons)
> > +ifneq ($(KBUILD_OUTPUT),)
> > +# Make's built-in functions such as $(abspath ...), $(realpath ...) cannot
> > +# expand a shell special character '~'. We use a bit tredious way to handle it.
>
> very minor, but I noticed while looking through the series ^^
>
> s/bit tredious/somewhat tedious/


Oops, 'tredious' is a typo.

As a non-native, I do not understand the difference
between 'a bit' and 'somewhat', but I will apply it.

Thanks.





-- 
Best Regards
Masahiro Yamada

  reply	other threads:[~2019-04-02 14:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-30 12:04 [PATCH 1/6] kbuild: pass $(MAKECMDGOALS) to sub-make as is Masahiro Yamada
2019-03-30 12:04 ` [PATCH 2/6] kbuild: allow Kbuild to start from any directory Masahiro Yamada
2019-04-02  4:41   ` Kieran Bingham
2019-04-02 14:23     ` Masahiro Yamada [this message]
2019-03-30 12:04 ` [PATCH 3/6] kbuild: mkmakefile: do not check the generated Makefile marker Masahiro Yamada
2019-03-30 12:04 ` [PATCH 4/6] kbuild: mkmakefile: generate a simple wrapper of top Makefile Masahiro Yamada
2019-04-02  8:02   ` Kieran Bingham
2019-03-30 12:04 ` [PATCH 5/6] kbuild: use $(srctree) instead of KBUILD_SRC to check out-of-tree build Masahiro Yamada
2019-03-30 12:04 ` [PATCH 6/6] memory: squash drivers/memory/Makefile.asm-offsets Masahiro Yamada
2019-04-07  9:21 ` [PATCH 1/6] kbuild: pass $(MAKECMDGOALS) to sub-make as is Masahiro Yamada

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAK7LNASXGWD02KJfZ0=me_Brp-E6T30huzuNMSzd3dGwrjTxzQ@mail.gmail.com' \
    --to=yamada.masahiro@socionext.com \
    --cc=kbingham@kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.lkml@markovi.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.