diff mbox series

[3/6] kbuild: clarify where to run make mrproper when out-of-tree fails

Message ID 20190822044613.5349-3-yamada.masahiro@socionext.com
State Accepted
Commit 1a475d5486755fcf48d710cb7dc3a8a5f7bad573
Headers show
Series [1/6] kbuild: remove 'Using ... as source for kernel' message | expand

Commit Message

Masahiro Yamada Aug. 22, 2019, 4:46 a.m. UTC
If you try out-of-tree build with an unclean source tree, Kbuild
suggests to run make mrproper. The path to the source tree may be
shown with a relative path, for example, "make O=foo" emits the
following:

  .. is not clean, please run 'make mrproper'
  in the '..' directory.

This is somewhat confusing if you ran "make O=foo" in the source tree.
Using the absolute path will be clearer.

This commit changes the error message like follows:

***
*** The source tree is not clean, please run 'make mrproper'
*** in /absolute/path/to/linux
***

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

---

 Makefile | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

-- 
2.17.1
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index d9cbbc27d4ba..901fcb8fffbe 100644
--- a/Makefile
+++ b/Makefile
@@ -1121,8 +1121,10 @@  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$(if $(findstring command line, $(origin ARCH)), ARCH=$(ARCH)) mrproper'"; \
-		echo >&2 "  in the '$(srctree)' directory.";\
+		echo >&2 "***"; \
+		echo >&2 "*** The source tree is not clean, please run 'make$(if $(findstring command line, $(origin ARCH)), ARCH=$(ARCH)) mrproper'"; \
+		echo >&2 "*** in $(abs_srctree)";\
+		echo >&2 "***"; \
 		/bin/false; \
 	fi;
 endif