Fix "undefined variable which git" warning when submodules not initialized
authorAngus Gratton <angus@espressif.com>
Mon, 14 May 2018 08:07:27 +0000 (16:07 +0800)
committerAngus Gratton <gus@projectgus.com>
Mon, 14 May 2018 08:07:27 +0000 (16:07 +0800)
make/project.mk

index a2f26e8f1105570a6210103807d318c2fe4cb26e..01b29bcb38abfc62fc791388915090a2e6243b12 100644 (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)