[PATCH 21/23] kbuild: use absolute path in the generated wrapper Makefile

Masahiro Yamada posted 23 patches 2 months, 1 week ago
There is a newer version of this series
[PATCH 21/23] kbuild: use absolute path in the generated wrapper Makefile
Posted by Masahiro Yamada 2 months, 1 week ago
Keep the consistent behavior when this Makefile is invoked from another
directory.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

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

diff --git a/Makefile b/Makefile
index ce646a6994a6..9f0ba07e8f25 100644
--- a/Makefile
+++ b/Makefile
@@ -643,8 +643,9 @@ ifdef building_out_of_srctree
 
 quiet_cmd_makefile = GEN     Makefile
       cmd_makefile = { \
-	echo "\# Automatically generated by $(srctree)/Makefile: don't edit"; \
-	echo "include $(srctree)/Makefile"; \
+	echo "\# Automatically generated by $(abs_srctree)/Makefile: don't edit"; \
+	echo "export KBUILD_OUTPUT = $(CURDIR)"; \
+	echo "include $(abs_srctree)/Makefile"; \
 	} > Makefile
 
 outputmakefile:
-- 
2.43.0
Re: [PATCH 21/23] kbuild: use absolute path in the generated wrapper Makefile
Posted by Nicolas Schier 1 month, 3 weeks ago
On Tue, Sep 17, 2024 at 11:16:49PM +0900, Masahiro Yamada wrote:
> Keep the consistent behavior when this Makefile is invoked from another
> directory.
> 
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
> 
>  Makefile | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)

Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>