From c3306b9b60d5569b4aaa2d33b12439778f4822a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Wed, 12 Sep 2018 14:56:36 +0200 Subject: Prevent kerl from being deleted uncorrectly --- core/kerl.mk | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'core') diff --git a/core/kerl.mk b/core/kerl.mk index 029872c..7cdea47 100644 --- a/core/kerl.mk +++ b/core/kerl.mk @@ -9,6 +9,8 @@ ifeq ($(strip $(KERL)),) KERL := $(ERLANG_MK_TMP)/kerl/kerl endif +KERL_DIR = $(ERLANG_MK_TMP)/kerl + export KERL KERL_GIT ?= https://github.com/kerl/kerl @@ -35,7 +37,9 @@ $(KERL_INSTALL_DIR)/$1-native: $(KERL) endif endef -$(KERL): +$(KERL): $(KERL_DIR) + +$(KERL_DIR): $(verbose) mkdir -p $(ERLANG_MK_TMP) $(gen_verbose) git clone --depth 1 $(KERL_GIT) $(ERLANG_MK_TMP)/kerl $(verbose) cd $(ERLANG_MK_TMP)/kerl && git checkout $(KERL_COMMIT) @@ -44,7 +48,7 @@ $(KERL): distclean:: distclean-kerl distclean-kerl: - $(gen_verbose) rm -rf $(KERL) + $(gen_verbose) rm -rf $(KERL_DIR) # Allow users to select which version of Erlang/OTP to use for a project. -- cgit v1.2.3