diff mbox

[V2] kbuild: add %/built-in.o target in top Makefile

Message ID 1478470712-9872-1-git-send-email-richard.weiyang@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Wei Yang Nov. 6, 2016, 10:18 p.m. UTC
Current kbuild just supports building built-in.o in second directory level
individually. There is no rule to build those built-in.o targets below
third directory level.

Even current kbuild system could achieve this with rule "%/", while this
not only builds built-in targes but also lib target, extra target and
module objects.

This patch adds the "%/built-in.o" rule so that each built-in.o in the
kernel tree could be the build target, which looks more consistent for the
kbuild system.

Signed-off-by: Wei Yang <richard.weiyang@gmail.com>

---
v2
    . add FORCE in prerequest

---
 Makefile | 2 ++
 1 file changed, 2 insertions(+)

Comments

Wei Yang Nov. 28, 2016, 10:06 p.m. UTC | #1
Hi ~

On Sun, Nov 06, 2016 at 10:18:32PM +0000, Wei Yang wrote:
>Current kbuild just supports building built-in.o in second directory level
>individually. There is no rule to build those built-in.o targets below
>third directory level.
>
>Even current kbuild system could achieve this with rule "%/", while this
>not only builds built-in targes but also lib target, extra target and
>module objects.
>
>This patch adds the "%/built-in.o" rule so that each built-in.o in the
>kernel tree could be the build target, which looks more consistent for the
>kbuild system.
>
>Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
>
>---
>v2
>    . add FORCE in prerequest
>
>---
> Makefile | 2 ++
> 1 file changed, 2 insertions(+)
>
>diff --git a/Makefile b/Makefile
>index f97f786..9c65498 100644
>--- a/Makefile
>+++ b/Makefile
>@@ -1638,6 +1638,8 @@ endif
> 	$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
> %.symtypes: %.c prepare scripts FORCE
> 	$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
>+%/built-in.o: prepare scripts FORCE
>+	$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
> 
> # Modules
> /: prepare scripts FORCE
>-- 
>2.5.0
Wei Yang Feb. 22, 2017, 2:20 p.m. UTC | #2
Hi, haven't get any feedback for a looong time.

Someone would like this change ? :-)

On Sun, Nov 06, 2016 at 10:18:32PM +0000, Wei Yang wrote:
>Current kbuild just supports building built-in.o in second directory level
>individually. There is no rule to build those built-in.o targets below
>third directory level.
>
>Even current kbuild system could achieve this with rule "%/", while this
>not only builds built-in targes but also lib target, extra target and
>module objects.
>
>This patch adds the "%/built-in.o" rule so that each built-in.o in the
>kernel tree could be the build target, which looks more consistent for the
>kbuild system.
>
>Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
>
>---
>v2
>    . add FORCE in prerequest
>
>---
> Makefile | 2 ++
> 1 file changed, 2 insertions(+)
>
>diff --git a/Makefile b/Makefile
>index f97f786..9c65498 100644
>--- a/Makefile
>+++ b/Makefile
>@@ -1638,6 +1638,8 @@ endif
> 	$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
> %.symtypes: %.c prepare scripts FORCE
> 	$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
>+%/built-in.o: prepare scripts FORCE
>+	$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
> 
> # Modules
> /: prepare scripts FORCE
>-- 
>2.5.0
diff mbox

Patch

diff --git a/Makefile b/Makefile
index f97f786..9c65498 100644
--- a/Makefile
+++ b/Makefile
@@ -1638,6 +1638,8 @@  endif
 	$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
 %.symtypes: %.c prepare scripts FORCE
 	$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
+%/built-in.o: prepare scripts FORCE
+	$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
 
 # Modules
 /: prepare scripts FORCE