Commit 50ef0cdf authored by Masahiro Yamada's avatar Masahiro Yamada

kbuild: fix missed rebuild of modules.builtin

Unlike modules.order, modules.builtin is not rebuilt every time.
Once modules.builtin is created, it will not be updated until
auto.conf or tristate.conf is changed.

So, it does not  notice a change in Makefile, for example, the rename
of modules.

Kbuild must always descend into directories for modules.builtin too.
Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
parent c2341e2a
...@@ -1292,12 +1292,16 @@ modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin ...@@ -1292,12 +1292,16 @@ modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/modules-check.sh $(Q)$(CONFIG_SHELL) $(srctree)/scripts/modules-check.sh
modules.builtin: $(vmlinux-dirs:%=%/modules.builtin) modbuiltin-dirs := $(addprefix _modbuiltin_, $(vmlinux-dirs))
$(Q)$(AWK) '!x[$$0]++' $^ > $(objtree)/modules.builtin
%/modules.builtin: include/config/auto.conf include/config/tristate.conf modules.builtin: $(modbuiltin-dirs)
$(Q)$(MAKE) $(modbuiltin)=$* $(Q)$(AWK) '!x[$$0]++' $(addsuffix /$@, $(vmlinux-dirs)) > $@
PHONY += $(modbuiltin-dirs)
# tristate.conf is not included from this Makefile. Add it as a prerequisite
# here to make it self-healing in case somebody accidentally removes it.
$(modbuiltin-dirs): include/config/tristate.conf
$(Q)$(MAKE) $(modbuiltin)=$(patsubst _modbuiltin_%,%,$@)
# Target to prepare building external modules # Target to prepare building external modules
PHONY += modules_prepare PHONY += modules_prepare
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment