VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   33 Branches   57 Tags
author: Masahiro Yamada <masahiroy@kernel.org> 2021-05-17 16:03:11 +0900 committer: Masahiro Yamada <masahiroy@kernel.org> 2021-05-27 03:59:29 +0900 commit: 2728fcfa4fcc0c4152629c48d49c3bd5f9008329 parent: 92f378f19e947eeffc52c427cd734f7b19eb54c4
Commit Summary:
kbuild: merge scripts/mkmakefile to top Makefile
Diffstat:
1 file changed, 8 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 4dcfe9c48d60..504327207d66 100644
--- a/Makefile
+++ b/Makefile
@@ -544,14 +544,21 @@ scripts_basic:
 	$(Q)rm -f .tmp_quiet_recordmcount
 
 PHONY += outputmakefile
+ifdef building_out_of_srctree
 # Before starting out-of-tree build, make sure the source tree is clean.
 # outputmakefile generates a Makefile in the output directory, if using a
 # separate output directory. This allows convenient use of make in the
 # output directory.
 # At the same time when output Makefile generated, generate .gitignore to
 # ignore whole output directory
+
+quiet_cmd_makefile = GEN     Makefile
+      cmd_makefile = { \
+	echo "\# Automatically generated by $(srctree)/Makefile: don't edit"; \
+	echo "include $(srctree)/Makefile"; \
+	} > Makefile
+
 outputmakefile:
-ifdef building_out_of_srctree
 	$(Q)if [ -f $(srctree)/.config -o \
 		 -d $(srctree)/include/config -o \
 		 -d $(srctree)/arch/$(SRCARCH)/include/generated ]; then \
@@ -562,7 +569,7 @@ ifdef building_out_of_srctree
 		false; \
 	fi
 	$(Q)ln -fsn $(srctree) source
-	$(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile $(srctree)
+	$(call cmd,makefile)
 	$(Q)test -e .gitignore || \
 	{ echo "# this is build directory, ignore it"; echo "*"; } > .gitignore
 endif