Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

kbuild: remove auto.conf from prerequisite of phony targets

The top-level Makefile adds include/config/auto.conf as
prerequisites of 'scripts', 'prepare1', etc.

They were needed to terminate the build when include/config/auto.conf
is missing.

Now that the inclusion of include/config/auto.conf is mandatory
in the top-level Makefile if dot-config is 1 (Note 'include' directive
is used instead of '-include').

Make terminates the build by itself if it fails to create or update
include/config/auto.conf so we are sure that include/config/auto.conf
exists in the very first stage of make.

I am still keeping include/config/auto.conf as the prerequisite of
%/modules.builtin because modules.builtin is a real file. According
to commit a6c366324cac ("kbuild: Do not unnecessarily regenerate
modules.builtin"), it is intentional to compare time-stamps between
%/modules.builtin and include/config/auto.conf . I moved tristate.conf
here because it is only included from scripts/Makefile.modbuiltin.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

+4 -10
+4 -10
Makefile
··· 649 649 /bin/false) 650 650 651 651 endif # may-sync-config 652 - 653 - else 654 - # Dummy target needed, because used as prerequisite 655 - include/config/auto.conf: ; 656 652 endif # $(dot-config) 657 653 658 654 KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks,) ··· 1043 1047 endef 1044 1048 1045 1049 # Store (new) KERNELRELEASE string in include/config/kernel.release 1046 - include/config/kernel.release: include/config/auto.conf FORCE 1050 + include/config/kernel.release: $(srctree)/Makefile FORCE 1047 1051 $(call filechk,kernel.release) 1048 1052 1049 1053 # Additional helpers built in scripts/ 1050 1054 # Carefully list dependencies so we do not try to build scripts twice 1051 1055 # in parallel 1052 1056 PHONY += scripts 1053 - scripts: scripts_basic include/config/auto.conf include/config/tristate.conf \ 1054 - asm-generic gcc-plugins $(autoksyms_h) 1057 + scripts: scripts_basic asm-generic gcc-plugins $(autoksyms_h) 1055 1058 $(Q)$(MAKE) $(build)=$(@) 1056 1059 1057 1060 # Things we need to do before we recursively start building the kernel ··· 1080 1085 # that need to depend on updated CONFIG_* values can be checked here. 1081 1086 prepare2: prepare3 outputmakefile asm-generic 1082 1087 1083 - prepare1: prepare2 $(version_h) $(autoksyms_h) include/generated/utsrelease.h \ 1084 - include/config/auto.conf 1088 + prepare1: prepare2 $(version_h) $(autoksyms_h) include/generated/utsrelease.h 1085 1089 $(cmd_crmodverdir) 1086 1090 1087 1091 archprepare: archheaders archscripts prepare1 scripts_basic ··· 1218 1224 modules.builtin: $(vmlinux-dirs:%=%/modules.builtin) 1219 1225 $(Q)$(AWK) '!x[$$0]++' $^ > $(objtree)/modules.builtin 1220 1226 1221 - %/modules.builtin: include/config/auto.conf 1227 + %/modules.builtin: include/config/auto.conf include/config/tristate.conf 1222 1228 $(Q)$(MAKE) $(modbuiltin)=$* 1223 1229 1224 1230