diff options
author | Loïc Hoguin <[email protected]> | 2018-09-12 14:56:36 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2018-09-12 14:56:36 +0200 |
commit | c3306b9b60d5569b4aaa2d33b12439778f4822a5 (patch) | |
tree | 9c43df31a655613be450d3b05f3552d4a7f6ea96 /core | |
parent | 4aaaa822d281096a369ab274d19240de5bf13fd1 (diff) | |
download | erlang.mk-c3306b9b60d5569b4aaa2d33b12439778f4822a5.tar.gz erlang.mk-c3306b9b60d5569b4aaa2d33b12439778f4822a5.tar.bz2 erlang.mk-c3306b9b60d5569b4aaa2d33b12439778f4822a5.zip |
Prevent kerl from being deleted uncorrectly
Diffstat (limited to 'core')
-rw-r--r-- | core/kerl.mk | 8 |
1 files changed, 6 insertions, 2 deletions
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. |