[PATCH 13/23] kbuild: replace two $(abs_objtree) with $(CURDIR) in top Makefile

Masahiro Yamada posted 23 patches 2 months, 1 week ago
There is a newer version of this series
[PATCH 13/23] kbuild: replace two $(abs_objtree) with $(CURDIR) in top Makefile
Posted by Masahiro Yamada 2 months, 1 week ago
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>
---

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

diff --git a/Makefile b/Makefile
index 5700d08c9b57..ee9ad0f0960f 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
-- 
2.43.0
Re: [PATCH 13/23] kbuild: replace two $(abs_objtree) with $(CURDIR) in top Makefile
Posted by Nicolas Schier 2 months ago
On Tue, Sep 17, 2024 at 11:16:41PM +0900, Masahiro Yamada wrote:
> 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>
> ---
> 
>  Makefile | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index 5700d08c9b57..ee9ad0f0960f 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
> -- 
> 2.43.0
> 

Reviewed-by: Nicolas Schier <n.schier@avm.de>