aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2023-05-15 17:07:46 +0200
committerLoïc Hoguin <[email protected]>2023-05-15 17:07:46 +0200
commite8bcb0800363d781359ca3726d5825c3a05ed21d (patch)
tree5d23fcfc07bc666ed50daa998973ca1ea3718844
parent5e4de91c73f1be39fd4e85e0c526ef62e40a4431 (diff)
downloaderlang.mk-e8bcb0800363d781359ca3726d5825c3a05ed21d.tar.gz
erlang.mk-e8bcb0800363d781359ca3726d5825c3a05ed21d.tar.bz2
erlang.mk-e8bcb0800363d781359ca3726d5825c3a05ed21d.zip
Rename __fetch_git to dep_cache_fetch_git
-rw-r--r--core/deps.mk28
1 files changed, 14 insertions, 14 deletions
diff --git a/core/deps.mk b/core/deps.mk
index b96b087..af7fd44 100644
--- a/core/deps.mk
+++ b/core/deps.mk
@@ -710,37 +710,37 @@ endef
ifeq ($(CACHE_DEPS),1)
-define __fetch_git
+define dep_cache_fetch_git
mkdir -p $(CACHE_DIR)/gits; \
- if test -d "$(join $(CACHE_DIR)/gits/,$(call dep_name,$(1)))"; then \
- cd $(join $(CACHE_DIR)/gits/,$(call dep_name,$(1))); \
- if ! git checkout -q $(call dep_commit,$(1)); then \
- git remote set-url origin $(call dep_repo,$(1)) && \
+ if test -d "$(join $(CACHE_DIR)/gits/,$(call dep_name,$1))"; then \
+ cd $(join $(CACHE_DIR)/gits/,$(call dep_name,$1)); \
+ if ! git checkout -q $(call dep_commit,$1); then \
+ git remote set-url origin $(call dep_repo,$1) && \
git pull --all && \
- git cat-file -e $(call dep_commit,$(1)) 2>/dev/null; \
+ git cat-file -e $(call dep_commit,$1) 2>/dev/null; \
fi; \
else \
- git clone -q -n -- $(call dep_repo,$(1)) $(join $(CACHE_DIR)/gits/,$(call dep_name,$(1))); \
+ git clone -q -n -- $(call dep_repo,$1) $(join $(CACHE_DIR)/gits/,$(call dep_name,$1)); \
fi; \
- git clone -q --branch $(call dep_commit,$(1)) --single-branch -- $(join $(CACHE_DIR)/gits/,$(call dep_name,$(1))) $(2)
+ git clone -q --branch $(call dep_commit,$1) --single-branch -- $(join $(CACHE_DIR)/gits/,$(call dep_name,$1)) $2
endef
define dep_fetch_git
- $(call __fetch_git,$(1),$(DEPS_DIR)/$(call dep_name,$(1)));
+ $(call dep_cache_fetch_git,$1,$(DEPS_DIR)/$(call dep_name,$1));
endef
define dep_fetch_git-subfolder
mkdir -p $(ERLANG_MK_TMP)/git-subfolder; \
- $(call __fetch_git,$(1),$(ERLANG_MK_TMP)/git-subfolder/$(call dep_name,$(1))); \
- ln -s $(ERLANG_MK_TMP)/git-subfolder/$(call dep_name,$1)/$(word 4,$(dep_$(1))) \
+ $(call dep_cache_fetch_git,$1,$(ERLANG_MK_TMP)/git-subfolder/$(call dep_name,$1)); \
+ ln -s $(ERLANG_MK_TMP)/git-subfolder/$(call dep_name,$1)/$(word 4,$(dep_$1)) \
$(DEPS_DIR)/$(call dep_name,$1);
endef
else
define dep_fetch_git
- git clone -q -n -- $(call dep_repo,$(1)) $(DEPS_DIR)/$(call dep_name,$(1)); \
- cd $(DEPS_DIR)/$(call dep_name,$(1)) && git checkout -q $(call dep_commit,$(1));
+ git clone -q -n -- $(call dep_repo,$1) $(DEPS_DIR)/$(call dep_name,$1); \
+ cd $(DEPS_DIR)/$(call dep_name,$1) && git checkout -q $(call dep_commit,$1);
endef
define dep_fetch_git-subfolder
@@ -749,7 +749,7 @@ define dep_fetch_git-subfolder
$(ERLANG_MK_TMP)/git-subfolder/$(call dep_name,$1); \
cd $(ERLANG_MK_TMP)/git-subfolder/$(call dep_name,$1) \
&& git checkout -q $(call dep_commit,$1); \
- ln -s $(ERLANG_MK_TMP)/git-subfolder/$(call dep_name,$1)/$(word 4,$(dep_$(1))) \
+ ln -s $(ERLANG_MK_TMP)/git-subfolder/$(call dep_name,$1)/$(word 4,$(dep_$1)) \
$(DEPS_DIR)/$(call dep_name,$1);
endef