]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
kbuild: clarify where to run make mrproper when out-of-tree fails
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Thu, 22 Aug 2019 04:46:10 +0000 (13:46 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Thu, 29 Aug 2019 14:54:29 +0000 (23:54 +0900)
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

index d5d0742efeb2feaed3c977017793e68c2b7149cf..132cc12097814d49d9394076cc677357127e2ee6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1118,8 +1118,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