.PHONY: git-submodule-update
-ifeq (0,$(MAKELEVEL))
- git_module_status := $(shell \
- cd '$(SRC_PATH)' && \
- ./scripts/git-submodule.sh status $(GIT_SUBMODULES); \
- echo $$?; \
- )
+git_module_status := $(shell \
+ cd '$(SRC_PATH)' && \
+ GIT="$(GIT)" ./scripts/git-submodule.sh status $(GIT_SUBMODULES); \
+ echo $$?; \
+)
ifeq (1,$(git_module_status))
+ifeq (no,$(GIT_UPDATE))
git-submodule-update:
$(call quiet-command, \
- (cd $(SRC_PATH) && ./scripts/git-submodule.sh update $(GIT_SUBMODULES)), \
+ echo && \
+ echo "GIT submodule checkout is out of date. Please run" && \
+ echo " scripts/git-submodule.sh update $(GIT_SUBMODULES)" && \
+ echo "from the source directory checkout $(SRC_PATH)" && \
+ echo && \
+ exit 1)
+else
+git-submodule-update:
+ $(call quiet-command, \
+ (cd $(SRC_PATH) && GIT="$(GIT)" ./scripts/git-submodule.sh update $(GIT_SUBMODULES)), \
"GIT","$(GIT_SUBMODULES)")
endif
endif