Skip to content

Commit

Permalink
kbuild: Inform user to pass ARCH= for make mrproper
Browse files Browse the repository at this point in the history
When cross-compiling an out-of-tree build with an unclean source tree
directory, the build fails with:

  /path/to/kernel/source/tree is not clean, please run 'make mrproper'
  in the '/path/to/kernel/source/tree' directory.

However, doing so does not fix the problem, as "make mrproper" now
requires passing the target architecture to the make command, else it
won't remove $(srctree)/arch/$(SRCARCH)/include/generated.
"git ls-files -o" doesn't give a clue, as it doesn't list (empty)
directories, only files.

Improve usability by including the ARCH= option in the error output.

Fixes: a788b2e ("kbuild: check arch/$(SRCARCH)/include/generated before out-of-tree build")
Signed-off-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Masahiro Yamada <[email protected]>
  • Loading branch information
geertu authored and masahir0y committed Jul 10, 2019
1 parent b956c7a commit 3a475b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1107,7 +1107,7 @@ ifdef building_out_of_srctree
$(Q)if [ -f $(srctree)/.config -o \
-d $(srctree)/include/config -o \
-d $(srctree)/arch/$(SRCARCH)/include/generated ]; then \
echo >&2 " $(srctree) is not clean, please run 'make mrproper'"; \
echo >&2 " $(srctree) is not clean, please run 'make ARCH=$(ARCH) mrproper'"; \
echo >&2 " in the '$(srctree)' directory.";\
/bin/false; \
fi;
Expand Down

0 comments on commit 3a475b2

Please sign in to comment.