]> granicus.if.org Git - esp-idf/commitdiff
build: Check for .git, but it doesn't have to be a directory, so that esp-idf will...
authorEdmund Huber <me@ehuber.info>
Mon, 20 Mar 2017 06:11:13 +0000 (23:11 -0700)
committerAngus Gratton <angus@espressif.com>
Wed, 22 Mar 2017 07:03:53 +0000 (15:03 +0800)
Merges #438 https://github.com/espressif/esp-idf/pull/438

make/project.mk

index f5ae796f057b2e076fe5f9aa325163fafd4ffb57..9980e580099047899577a29f87adb0237bf41bc3 100644 (file)
@@ -409,7 +409,7 @@ define GenerateSubmoduleCheckTarget
 check-submodules: $(IDF_PATH)/$(1)/.git
 $(IDF_PATH)/$(1)/.git:
        @echo "WARNING: Missing submodule $(1)..."
-       [ -d ${IDF_PATH}/.git ] || ( echo "ERROR: esp-idf must be cloned from git to work."; exit 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)
        @echo "Attempting 'git submodule update --init $(1)' in esp-idf root directory..."
        cd ${IDF_PATH} && git submodule update --init $(1)