Skip to content

Commit

Permalink
kbuild: check clean srctree even earlier
Browse files Browse the repository at this point in the history
Move the outputmakefile target to the leftmost in the prerequisite list
so that this is checked first. GNU Make processes the prerequisites
left to right.

GNU Make will keep to stick to this behavior, and it seems even
POSIX standard, according to this:
https://lists.gnu.org/archive/html/bug-make/2019-08/msg00030.html

The POSIX standard of make is available here:
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html

Of course, when the parallel option -j given, other targets will be run
simultaneously but it is nice to show the error as early as possible.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
  • Loading branch information
masahir0y committed Aug 29, 2019
1 parent a5139fb commit 36de077
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -578,10 +578,10 @@ ifdef config-build
include arch/$(SRCARCH)/Makefile
export KBUILD_DEFCONFIG KBUILD_KCONFIG CC_VERSION_TEXT

config: scripts_basic outputmakefile FORCE
config: outputmakefile scripts_basic FORCE
$(Q)$(MAKE) $(build)=scripts/kconfig $@

%config: scripts_basic outputmakefile FORCE
%config: outputmakefile scripts_basic FORCE
$(Q)$(MAKE) $(build)=scripts/kconfig $@

else #!config-build
Expand Down Expand Up @@ -1120,7 +1120,7 @@ scripts: scripts_basic scripts_dtc

PHONY += prepare archprepare

archprepare: archheaders archscripts scripts include/config/kernel.release outputmakefile \
archprepare: outputmakefile archheaders archscripts scripts include/config/kernel.release \
asm-generic $(version_h) $(autoksyms_h) include/generated/utsrelease.h

prepare0: archprepare
Expand Down

0 comments on commit 36de077

Please sign in to comment.