diff --git a/Makefile b/Makefile index 00c0b80fec79..a66abded17ce 100644 --- a/Makefile +++ b/Makefile @@ -1185,7 +1185,7 @@ $(sort $(vmlinux-deps)): $(vmlinux-dirs) ; PHONY += $(vmlinux-dirs) $(vmlinux-dirs): prepare scripts - $(Q)$(MAKE) $(build)=$@ + $(Q)$(MAKE) $(build)=$@ need-builtin=1 define filechk_kernel.release echo "$(KERNELVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree))" diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 3195559f000f..74ce588c6951 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -90,7 +90,7 @@ lib-target := $(obj)/lib.a obj-y += $(obj)/lib-ksyms.o endif -ifneq ($(strip $(obj-y) $(obj-m) $(obj-) $(subdir-m) $(lib-target)),) +ifneq ($(strip $(obj-y) $(need-builtin)),) builtin-target := $(obj)/built-in.o endif @@ -673,7 +673,7 @@ targets += $(multi-used-y) $(multi-used-m) PHONY += $(subdir-ym) $(subdir-ym): - $(Q)$(MAKE) $(build)=$@ + $(Q)$(MAKE) $(build)=$@ need-builtin=$(if $(findstring $@,$(subdir-obj-y)),1) # Add FORCE to the prequisites of a target to force it to be always rebuilt. # ---------------------------------------------------------------------------