@@ -61,7 +61,6 @@ TRANSLATE_SOURCES_EXC = -path "ports/*/build-*" \
6161
6262help :
6363 @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"
6564 @echo " html to make standalone HTML files"
6665 @echo " dirhtml to make HTML files named index.html in directories"
6766 @echo " singlehtml to make a single large HTML file"
8483 @echo " pseudoxml to make pseudoxml-XML files for display purposes"
8584 @echo " linkcheck to check all external links for integrity"
8685 @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"
8788
8889clean :
8990 rm -rf $(BUILDDIR ) /*
@@ -324,25 +325,12 @@ clean-stm:
324325 $(MAKE ) -C ports/stm BOARD=feather_stm32f405_express clean
325326
326327
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 :
346334 git submodule deinit -f --all
347335 rm -rf .git/modules/*
348336
0 commit comments