summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2019-08-22 13:46:09 +0900
committerMasahiro Yamada <yamada.masahiro@socionext.com>2019-08-29 23:54:29 +0900
commit621da4ba0e244ba3cfb2e8a9a9055299ec0ab0d3 (patch)
tree8d6e22291b9ab67ca07ae34ea870154f2994dd9f /Makefile
parent59747fb8693fee55d2184295d2a4b8b91e0203ee (diff)
downloadlinux-621da4ba0e244ba3cfb2e8a9a9055299ec0ab0d3.tar.gz
linux-621da4ba0e244ba3cfb2e8a9a9055299ec0ab0d3.tar.bz2
linux-621da4ba0e244ba3cfb2e8a9a9055299ec0ab0d3.zip
kbuild: Inform user to pass ARCH= for make mrproper only when necessary
Since commit 3a475b2166fd ("kbuild: Inform user to pass ARCH= for make mrproper"), if you try out-of-tree build with an unclean source tree, it suggests to run 'make ARCH=<ARCH> mrproper'. This looks odd when you are not cross-compiling the kernel. Show the 'ARCH=<ARCH>' part only when ARCH= was given from the command line. If ARCH is the default (native build) or came from the environment, it should simply suggest 'make mrproper' as before. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index c79c85126f0c..d5d0742efeb2 100644
--- a/Makefile
+++ b/Makefile
@@ -1118,7 +1118,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 ARCH=$(ARCH) mrproper'"; \
+ echo >&2 " $(srctree) is not clean, please run 'make$(if $(findstring command line, $(origin ARCH)), ARCH=$(ARCH)) mrproper'"; \
echo >&2 " in the '$(srctree)' directory.";\
/bin/false; \
fi;