All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Pantelis Antoniou <pantelis.antoniou@konsulko.com>,
	devicetree@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
	Linux-MIPS <linux-mips@linux-mips.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Michal Marek <michal.lkml@markovi.net>,
	Michal Marek <mmarek@suse.com>
Subject: Re: [PATCH 1/2] kbuild: create built-in.o automatically if parent directory wants it
Date: Thu, 9 Nov 2017 17:08:38 +0100	[thread overview]
Message-ID: <20171109160838.GA26703@ravnborg.org> (raw)
In-Reply-To: <CAK7LNARyrgRBYOW7NGURnVUhhArL3C46UWiSosveM9KGmvEY4Q@mail.gmail.com>

Hi Masahiro.

On Thu, Nov 09, 2017 at 02:53:04PM +0900, Masahiro Yamada wrote:
> Hi Sam,
> 
> Thanks for your review.
> 
> 2017-11-09 14:35 GMT+09:00 Sam Ravnborg <sam@ravnborg.org>:
> > Hi Masahiro.
> >
> > Thanks for picking this up.
> >
> >> A key point is, the parent Makefile knows whether built-in.o is needed
> >> or not.  If a subdirectory needs to create built-in.o, its parent can
> >> tell the fact when Kbuild descends into it.
> > Good observation!
> >>
> >> diff --git a/Makefile b/Makefile
> >> index 008a4e5..cc0b618 100644
> >> --- a/Makefile
> >> +++ b/Makefile
> >> @@ -1003,7 +1003,7 @@ $(sort $(vmlinux-deps)): $(vmlinux-dirs) ;
> >>
> >>  PHONY += $(vmlinux-dirs)
> >>  $(vmlinux-dirs): prepare scripts
> >> -     $(Q)$(MAKE) $(build)=$@
> >> +     $(Q)$(MAKE) $(build)=$@ need-builtin=1
> >
> > The need-bultin may also be required for the shortcuts
> > that allows one to use:
> >
> >         make <dir>/
> >
> >     example:
> >
> >         make net/
> 
> 
> I do not want to add need-builtin=1 for single targets.
> 
> 
> make scripts/
> would create false scripts/built-in.o
> This is odd.
> 
> I wrote the solution in the commit log:
>   $(obj-y) should be still checked to support the single target "%/".

I missed this bit in the commit log,
but I almost commented on this in the patch itself.
Good way to do it.

	Sam

  reply	other threads:[~2017-11-09 16:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-07 16:31 [PATCH 0/2] kbuild: remove all "obj- := dummy.o" tricks Masahiro Yamada
2017-11-07 16:31 ` Masahiro Yamada
2017-11-07 16:31 ` Masahiro Yamada
2017-11-07 16:31 ` [PATCH 1/2] kbuild: create built-in.o automatically if parent directory wants it Masahiro Yamada
2017-11-09  5:35   ` Sam Ravnborg
2017-11-09  5:53     ` Masahiro Yamada
2017-11-09 16:08       ` Sam Ravnborg [this message]
2017-11-18  4:06   ` Masahiro Yamada
2017-11-07 16:31 ` [PATCH 2/2] kbuild: remove all dummy assignments to obj- Masahiro Yamada
2017-11-07 16:31   ` Masahiro Yamada
2017-11-18  4:08   ` Masahiro Yamada
2017-11-18  4:08     ` 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=20171109160838.GA26703@ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=arnd@arndb.de \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=mark.rutland@arm.com \
    --cc=michal.lkml@markovi.net \
    --cc=mmarek@suse.com \
    --cc=pantelis.antoniou@konsulko.com \
    --cc=robh+dt@kernel.org \
    --cc=yamada.masahiro@socionext.com \
    /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.