diff mbox series

[v2,01/11] kbuild: replace two $(abs_objtree) with $(CURDIR) in top Makefile

Message ID 20241110013649.34903-2-masahiroy@kernel.org (mailing list archive)
State New
Headers show
Series kbuild: support building external modules in a separate build directory | expand

Commit Message

Masahiro Yamada Nov. 10, 2024, 1:34 a.m. UTC
Kbuild changes the working directory until it matches $(abs_objtree).

When $(need-sub-make) is empty, $(abs_objtree) is the same as $(CURDIR).

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nicolas Schier <n.schier@avm.de>
---

(no changes since v1)

 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index 8dceb6830486..891d28e54791 100644
--- a/Makefile
+++ b/Makefile
@@ -228,12 +228,12 @@  else # need-sub-make
 
 # We process the rest of the Makefile if this is the final invocation of make
 
-ifeq ($(abs_srctree),$(abs_objtree))
+ifeq ($(abs_srctree),$(CURDIR))
         # building in the source tree
         srctree := .
 	building_out_of_srctree :=
 else
-        ifeq ($(abs_srctree)/,$(dir $(abs_objtree)))
+        ifeq ($(abs_srctree)/,$(dir $(CURDIR)))
                 # building in a subdirectory of the source tree
                 srctree := ..
         else