]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
kbuild: use absolute path in the generated wrapper Makefile
authorMasahiro Yamada <masahiroy@kernel.org>
Sun, 10 Nov 2024 01:34:37 +0000 (10:34 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Wed, 27 Nov 2024 23:11:55 +0000 (08:11 +0900)
Keep the consistent behavior when this Makefile is invoked from another
directory.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
Makefile

index a4ac0133f7cded90ef16754fb4cedaaef1055385..446acb6ba967cb30bd5866019fee84de505c956d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -644,8 +644,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: