Skip to content

Commit 4f1c100

Browse files
committed
kbuild: remove meaningless prepare2 target
There is no build order among the following: prepare3 outputmakefile asm-generic $(version_h) $(autoksyms_h) include/generated/utsrelease.h It is meaningless to insert the prepare2 target between the first three and the last three. The comment says, "prepare2 creates a makefile if using a separate output directory." Let me explain it more precisely. The prepare targets cannot be executed without the .config file. Because the configuration targets depend on the outputmakefile target, the generated makefile is already there before the parepare2 is run. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
1 parent b79c6aa commit 4f1c100

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

Makefile

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,7 +1062,7 @@ scripts: scripts_basic scripts_dtc
10621062
# archprepare is used in arch Makefiles and when processed asm symlink,
10631063
# version.h and scripts_basic is processed / created.
10641064

1065-
PHONY += prepare archprepare prepare1 prepare2 prepare3
1065+
PHONY += prepare archprepare prepare1 prepare3
10661066

10671067
# prepare3 is used to check if we are building in a separate output directory,
10681068
# and if so do:
@@ -1077,12 +1077,8 @@ ifneq ($(KBUILD_SRC),)
10771077
fi;
10781078
endif
10791079

1080-
# prepare2 creates a makefile if using a separate output directory.
1081-
# From this point forward, .config has been reprocessed, so any rules
1082-
# that need to depend on updated CONFIG_* values can be checked here.
1083-
prepare2: prepare3 outputmakefile asm-generic
1084-
1085-
prepare1: prepare2 $(version_h) $(autoksyms_h) include/generated/utsrelease.h
1080+
prepare1: prepare3 outputmakefile asm-generic $(version_h) $(autoksyms_h) \
1081+
include/generated/utsrelease.h
10861082
$(cmd_crmodverdir)
10871083

10881084
archprepare: archheaders archscripts prepare1 scripts

0 commit comments

Comments
 (0)