From 035f7f8af41669b397cae2efe6033afcc60705f9 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Tue, 27 Mar 2018 20:49:27 +0200 Subject: 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 --- deps/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deps/Makefile b/deps/Makefile index 5641ebe3..626bcc10 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -111,7 +111,7 @@ ifneq ($$($(1)_ORIGIN),$(2)/$(1)) 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 @@ $(1)/clean: $(1) 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 -- cgit v1.2.3