@@ -61,7 +61,6 @@ TRANSLATE_SOURCES_EXC = -path "ports/*/build-*" \
61
61
62
62
help :
63
63
@echo " Please use \` make <target>' where <target> is one of"
64
- @echo " fetch-submodules to fetch dependencies from submodules, run this right after you clone the repo"
65
64
@echo " html to make standalone HTML files"
66
65
@echo " dirhtml to make HTML files named index.html in directories"
67
66
@echo " singlehtml to make a single large HTML file"
84
83
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
85
84
@echo " linkcheck to check all external links for integrity"
86
85
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
86
+ @echo " fetch-all-submodules to fetch submodules for all ports"
87
+ @echo " remove-all-submodules remove all submodules, including files and .git/ data"
87
88
88
89
clean :
89
90
rm -rf $(BUILDDIR ) /*
@@ -324,25 +325,12 @@ clean-stm:
324
325
$(MAKE ) -C ports/stm BOARD=feather_stm32f405_express clean
325
326
326
327
327
- # If available, do blobless partial clones of submodules to save time and space.
328
- # A blobless partial clone lazily fetches data as needed, but has all the metadata available (tags, etc.)
329
- # so it does not have the idiosyncrasies of a shallow clone.
330
- #
331
- # If not available, do a fetch that will fail, and then fix it up with a second fetch.
332
- # (Only works for git servers that allow sha fetches.)
333
- .PHONY : fetch-submodules
334
- fetch-submodules :
335
- git submodule sync
336
- # ####################################################################################
337
- # NOTE: Ideally, use git version 2.36.0 or later, to do partial clones of submodules.
338
- # If an older git is used, submodules will be cloned with a shallow clone of depth 1.
339
- # You will see a git usage message first if the git version is too old to do
340
- # clones of submodules.
341
- # ####################################################################################
342
- git submodule update --init --filter=blob:none || git submodule update --init -N --depth 1 || git submodule foreach ' git fetch --tags --depth 1 origin $$sha1 && git checkout -q $$sha1' || echo ' make fetch-submodules FAILED'
343
-
344
- .PHONY : remove-submodules
345
- remove-submodules :
328
+ .PHONY : fetch-all-submodules
329
+ fetch-all-submodules :
330
+ tools/fetch-submodules.sh
331
+
332
+ .PHONY : remove-all-submodules
333
+ remove-all-submodules :
346
334
git submodule deinit -f --all
347
335
rm -rf .git/modules/*
348
336
0 commit comments