lkml.org 
[lkml]   [2017]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 1/2] kbuild: create built-in.o automatically if parent directory wants it
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 "%/".


If net/Makefile contains at least one obj-y,
"make net/" will create built-in.o





> And maybe selftest, documentation shortcuts too?
> Other than that - looks good.
>
> Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
>
> Sam
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html



--
Best Regards
Masahiro Yamada

\
 
 \ /
  Last update: 2017-11-09 06:54    [W:0.373 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site