[lkml]   [2019]   [Sep]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] riscv: add arch/riscv/Kbuild
On Sat, Aug 31, 2019 at 10:04:53PM +0900, Masahiro Yamada wrote:
> Kbuild support two file names, "Makefile" and "Kbuild"
> for describing obj-y, obj-m, etc.

<snipping the basic explanation, which is documented pretty well,
I I think I full understand>

> Similarly, arch/$(SRCARCH)/Makefile is very special
> in that it is included from the top-level Makefile,
> and specify arch-specific compiler flags etc.
> We can use arch/$(SRCARCH)/Kbuild
> to specify obj-y, obj-m.
> The top-level Makefile does not need to know
> the directory structure under arch/$(SRCARCH)/.
> This is logical separation.

But only if we document this specific split and eventually stop allowing
to build objects from arch/$(SRCARCH)/Makefile. And in my perfect world
we'd eventually phase out the magic arch/$(SRCARCH)/Makefile entireŀy.
In addition to the normal Kbuild file we'd then have say (names entirely
made up and probably not the best idea)

arch/$(SRCARCH)/ to set the various compiler flags and co
arch/$(SRCARCH)/ for extra arch-specific targets

 \ /
  Last update: 2019-09-02 09:43    [W:0.052 / U:24.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site