blob: 3f06188f0b530d7ad32a53a49fa733cc678901b3 [file] [log] [blame]
From cf67f5313b92c0e0c72dd09fa7bd6167040c9e04 Mon Sep 17 00:00:00 2001
From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: Tue, 9 Jul 2019 15:26:39 +0200
Subject: [PATCH] kbuild: Inform user to pass ARCH= for make mrproper
commit 3a475b2166fd6aa5ac76e8c605dffdf7a2a457ee upstream.
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: a788b2ed81ab ("kbuild: check arch/$(SRCARCH)/include/generated before out-of-tree build")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
diff --git a/Makefile b/Makefile
index 156edeb4e8af..0136f64b3fef 100644
--- a/Makefile
+++ b/Makefile
@@ -1117,7 +1117,7 @@ ifneq ($(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;
--
2.27.0