linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] kbuild: improve comments on KBUILD_SRC
@ 2017-06-30  2:45 Cao jin
  2017-07-02 23:07 ` Masahiro Yamada
  0 siblings, 1 reply; 2+ messages in thread
From: Cao jin @ 2017-06-30  2:45 UTC (permalink / raw)
  To: linux-kbuild, linux-kernel; +Cc: mmarek, yamada.masahiro

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>
---
 Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 57df756..7b60fb3 100644
--- a/Makefile
+++ b/Makefile
@@ -113,8 +113,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
@@ -135,7 +135,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) \
@@ -148,6 +147,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))
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] kbuild: improve comments on KBUILD_SRC
  2017-06-30  2:45 [PATCH v2] kbuild: improve comments on KBUILD_SRC Cao jin
@ 2017-07-02 23:07 ` Masahiro Yamada
  0 siblings, 0 replies; 2+ messages in thread
From: Masahiro Yamada @ 2017-07-02 23:07 UTC (permalink / raw)
  To: Cao jin
  Cc: Linux Kbuild mailing list, Linux Kernel Mailing List, Michal Marek

2017-06-30 11:45 GMT+09:00 Cao jin <caoj.fnst@cn.fujitsu.com>:
> 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>

Applied to linux-kbuild/kbuild.  Thanks!


-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-07-02 23:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-30  2:45 [PATCH v2] kbuild: improve comments on KBUILD_SRC Cao jin
2017-07-02 23:07 ` Masahiro Yamada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).