deps/Makefile: Add missing "git fetch" to /update and /clean targets
When the Makefile was modified to use a new tag/hash of a given
repo, the "make update" or "make clean" target will fail as the
new version/tag is not yet known to the local repo, only to the
remote (and hence we need a fetch).
Change-Id: I52c44c744674cd4dab0c85086d68bde6f9be1fca
diff --git a/deps/Makefile b/deps/Makefile
index 5641ebe..626bcc1 100644
--- a/deps/Makefile
+++ b/deps/Makefile
@@ -111,7 +111,7 @@
cd $(1) && git remote set-url origin $(2)/$(1) && git fetch
endif
ifneq ($$($(1)_HEAD),$($(1)_commit))
- cd $(1) && git checkout -q -f "$($(1)_commit)"
+ cd $(1) && git fetch && git checkout -q -f "$($(1)_commit)"
endif
endif
@@ -120,7 +120,7 @@
ifeq ($$($(1)_MODIFIED),1)
@echo "WARNING: $(1) skipped because it contains uncommitted modifications!"
else
- cd $(1) && git checkout -q -f "$($(1)_commit)" && git reset --hard
+ cd $(1) && git fetch && git checkout -q -f "$($(1)_commit)" && git reset --hard
endif
.PHONY: $(1)/distclean