diff mbox series

[PATCHv10,02/15] Makefile: init submodules

Message ID 20230926094124.7024-3-maxim.uvarov@linaro.org
State New
Headers show
Series net/lwip: add lwip library for the network stack | expand

Commit Message

Maxim Uvarov Sept. 26, 2023, 9:41 a.m. UTC
Make the make command automatically clone git submodules.

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
---
 Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index 9be24c4ec6..3a3cda2365 100644
--- a/Makefile
+++ b/Makefile
@@ -1871,6 +1871,9 @@  endef
 include/config/uboot.release: include/config/auto.conf FORCE
 	$(call filechk,uboot.release)
 
+initsubmodules:
+	@git submodule init
+	@git submodule update
 
 # Things we need to do before we recursively start building the kernel
 # or the modules are listed in "prepare".
@@ -1895,7 +1898,7 @@  ifneq ($(KBUILD_SRC),)
 endif
 
 # prepare2 creates a makefile if using a separate output directory
-prepare2: prepare3 outputmakefile cfg
+prepare2: prepare3 outputmakefile cfg initsubmodules
 
 prepare1: prepare2 $(version_h) $(timestamp_h) $(dt_h) $(env_h) \
                    include/config/auto.conf