]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
kbuild: improve comments on KBUILD_SRC
authorCao jin <caoj.fnst@cn.fujitsu.com>
Fri, 30 Jun 2017 02:45:43 +0000 (10:45 +0800)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Sun, 2 Jul 2017 23:03:10 +0000 (08:03 +0900)
Original comments is confusing on "OBJ directory", make it clear.
Bonus: move comments close to what it wants to comment.

Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Makefile

index 4d50f05466370880f72307302b3c8a882ad7c31e..41ed3062337b64608a2a6f4022350364e4fe78d1 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -106,8 +106,8 @@ export quiet Q KBUILD_VERBOSE
 # The O= assignment takes precedence over the KBUILD_OUTPUT environment
 # variable.
 
-# KBUILD_SRC is set on invocation of make in OBJ directory
-# KBUILD_SRC is not intended to be used by the regular user (for now)
+# KBUILD_SRC is not intended to be used by the regular user (for now),
+# it is set on invocation of make with KBUILD_OUTPUT or O= specified.
 ifeq ($(KBUILD_SRC),)
 
 # OK, Make called in directory where kernel src resides
@@ -128,7 +128,6 @@ ifneq ($(words $(subst :, ,$(CURDIR))), 1)
 endif
 
 ifneq ($(KBUILD_OUTPUT),)
-# Invoke a second make in the output directory, passing relevant variables
 # check that the output directory actually exists
 saved-output := $(KBUILD_OUTPUT)
 KBUILD_OUTPUT := $(shell mkdir -p $(KBUILD_OUTPUT) && cd $(KBUILD_OUTPUT) \
@@ -141,6 +140,7 @@ PHONY += $(MAKECMDGOALS) sub-make
 $(filter-out _all sub-make $(CURDIR)/Makefile, $(MAKECMDGOALS)) _all: sub-make
        @:
 
+# Invoke a second make in the output directory, passing relevant variables
 sub-make:
        $(Q)$(MAKE) -C $(KBUILD_OUTPUT) KBUILD_SRC=$(CURDIR) \
        -f $(CURDIR)/Makefile $(filter-out _all sub-make,$(MAKECMDGOALS))