]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
kbuild: replace two $(abs_objtree) with $(CURDIR) in top Makefile
authorMasahiro Yamada <masahiroy@kernel.org>
Sun, 10 Nov 2024 01:34:29 +0000 (10:34 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Wed, 27 Nov 2024 00:38:27 +0000 (09:38 +0900)
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>
Makefile

index 8dceb6830486d1f5859666ab78e0e979e2013312..891d28e54791b2da9c73fa85c8cdc4c899b062d8 100644 (file)
--- 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