From: Angus Gratton Date: Mon, 14 May 2018 08:07:27 +0000 (+0800) Subject: Fix "undefined variable which git" warning when submodules not initialized X-Git-Tag: v3.1-beta1~135^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=036dbce3d0d1af49713d45af9fbbed1ac8f772c6;p=esp-idf Fix "undefined variable which git" warning when submodules not initialized --- diff --git a/make/project.mk b/make/project.mk index a2f26e8f11..01b29bcb38 100644 --- a/make/project.mk +++ b/make/project.mk @@ -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)