From 7f183e5efd2e979a7546d45be70006e0a8005937 Mon Sep 17 00:00:00 2001 From: Flavio Castelli Date: Mon, 16 Oct 2023 12:42:46 +0200 Subject: [PATCH] Ensure recursive checkout of modules is done Signed-off-by: Flavio Castelli --- .circleci/config.yml | 2 +- BUILDING.md | 2 +- GNUmakefile | 4 ++-- flake.nix | 8 ++++---- hooks/post_checkout | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d9407119bc..1b7d7da068 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,7 +5,7 @@ commands: steps: - run: name: "Pull submodules" - command: git submodule update --init + command: git submodule update --init --recursive llvm-source-linux: steps: - restore_cache: diff --git a/BUILDING.md b/BUILDING.md index 52e411ec53..efb49c7259 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -85,7 +85,7 @@ Now that we have a working static build, it's time to make a release tarball: If you did not clone the repository with the `--recursive` option, you will get errors until you initialize the project submodules: - git submodule update --init + git submodule update --init --recursive The release tarball is stored in build/release.tar.gz, and can be extracted with the following command (for example in ~/lib): diff --git a/GNUmakefile b/GNUmakefile index 9084b145f9..aacfe4b7c9 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -190,7 +190,7 @@ gen-device: gen-device-stm32 endif gen-device-avr: - @if [ ! -e lib/avr/README.md ]; then echo "Submodules have not been downloaded. Please download them using:\n git submodule update --init"; exit 1; fi + @if [ ! -e lib/avr/README.md ]; then echo "Submodules have not been downloaded. Please download them using:\n git submodule update --init --recursive"; exit 1; fi $(GO) build -o ./build/gen-device-avr ./tools/gen-device-avr/ ./build/gen-device-avr lib/avr/packs/atmega src/device/avr/ ./build/gen-device-avr lib/avr/packs/tiny src/device/avr/ @@ -264,7 +264,7 @@ endif .PHONY: wasi-libc wasi-libc: lib/wasi-libc/sysroot/lib/wasm32-wasi/libc.a lib/wasi-libc/sysroot/lib/wasm32-wasi/libc.a: - @if [ ! -e lib/wasi-libc/Makefile ]; then echo "Submodules have not been downloaded. Please download them using:\n git submodule update --init"; exit 1; fi + @if [ ! -e lib/wasi-libc/Makefile ]; then echo "Submodules have not been downloaded. Please download them using:\n git submodule update --init --recursive"; exit 1; fi cd lib/wasi-libc && $(MAKE) -j4 EXTRA_CFLAGS="-O2 -g -DNDEBUG -mnontrapping-fptoint -msign-ext" MALLOC_IMPL=none CC="$(CLANG)" AR=$(LLVM_AR) NM=$(LLVM_NM) # Check for Node.js used during WASM tests. diff --git a/flake.nix b/flake.nix index 53d8fab45b..fd62ebcb38 100644 --- a/flake.nix +++ b/flake.nix @@ -18,10 +18,10 @@ # # But you'll need a bit more to make TinyGo actually able to compile code: # -# make llvm-source # fetch compiler-rt -# git submodule update --init # fetch lots of other libraries and SVD files -# make gen-device -j4 # build src/device/*/*.go files -# make wasi-libc # build support for wasi/wasm +# make llvm-source # fetch compiler-rt +# git submodule update --init --recursive # fetch lots of other libraries and SVD files +# make gen-device -j4 # build src/device/*/*.go files +# make wasi-libc # build support for wasi/wasm # # With this, you should have an environment that can compile anything - except # for the Xtensa architecture (ESP8266/ESP32) because support for that lives in diff --git a/hooks/post_checkout b/hooks/post_checkout index 1c6f495cf0..71fa8f796d 100755 --- a/hooks/post_checkout +++ b/hooks/post_checkout @@ -1,4 +1,4 @@ #!/bin/bash # Docker hub does a recursive clone, then checks the branch out, # so when a PR adds a submodule (or updates it), it fails. -git submodule update --init +git submodule update --init --recursive