Fix "undefined variable which git" warning when submodules not initialized

This commit is contained in:
Angus Gratton 2018-05-14 16:07:27 +08:00 committed by Angus Gratton
parent c94a5ecfdd
commit 036dbce3d0
1 changed files with 1 additions and 1 deletions

View File

@ -511,7 +511,7 @@ check-submodules: $(IDF_PATH)/$(1)/.git
$(IDF_PATH)/$(1)/.git:
@echo "WARNING: Missing submodule $(1)..."
[ -e ${IDF_PATH}/.git ] || ( echo "ERROR: esp-idf must be cloned from git to work."; exit 1)
[ -x $$(which git) ] || ( echo "ERROR: Need to run 'git submodule init $(1)' in esp-idf root directory."; exit 1)
[ -x "$(shell which git)" ] || ( echo "ERROR: Need to run 'git submodule init $(1)' in esp-idf root directory."; exit 1)
@echo "Attempting 'git submodule update --init $(1)' in esp-idf root directory..."
cd ${IDF_PATH} && git submodule update --init $(1)