aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2017-08-15 19:00:40 +0200
committerLoïc Hoguin <[email protected]>2017-08-15 19:00:40 +0200
commit7b431892bbd41a1a58dc42d82f2f246c50f6174d (patch)
tree0b2e30ab4e45b80a97f617dd2e46fdd31f56b193
parentb908a7a79aea70f3e7226570f243a99643b55cdd (diff)
downloaderlang.mk-7b431892bbd41a1a58dc42d82f2f246c50f6174d.tar.gz
erlang.mk-7b431892bbd41a1a58dc42d82f2f246c50f6174d.tar.bz2
erlang.mk-7b431892bbd41a1a58dc42d82f2f246c50f6174d.zip
Prevent recursion when building a pinned Erlang/OTP
Also add a user friendly message to inform the user of what we are doing.
-rw-r--r--core/kerl.mk10
1 files changed, 6 insertions, 4 deletions
diff --git a/core/kerl.mk b/core/kerl.mk
index 7846370..b815be9 100644
--- a/core/kerl.mk
+++ b/core/kerl.mk
@@ -58,8 +58,9 @@ export PATH := $(KERL_INSTALL_DIR)/$(ERLANG_OTP)/bin:$(PATH)
$(eval $(call kerl_otp_target,$(ERLANG_OTP)))
# Build Erlang/OTP only if it doesn't already exist.
-ifeq ($(wildcard $(KERL_INSTALL_DIR)/$(ERLANG_OTP)),)
-BUILD_ERLANG_OTP := $(shell $(MAKE) $(KERL_INSTALL_DIR)/$(ERLANG_OTP))
+ifeq ($(wildcard $(KERL_INSTALL_DIR)/$(ERLANG_OTP))$(BUILD_ERLANG_OTP),)
+$(info Building Erlang/OTP $(ERLANG_OTP)... Please wait...)
+BUILD_ERLANG_OTP := $(shell $(MAKE) $(KERL_INSTALL_DIR)/$(ERLANG_OTP) BUILD_ERLANG_OTP=1)
endif
else
@@ -70,8 +71,9 @@ export PATH := $(KERL_INSTALL_DIR)/$(ERLANG_HIPE)-native/bin:$(PATH)
$(eval $(call kerl_hipe_target,$(ERLANG_HIPE)))
# Build Erlang/OTP only if it doesn't already exist.
-ifeq ($(wildcard $(KERL_INSTALL_DIR)/$(ERLANG_HIPE)),)
-BUILD_ERLANG_OTP := $(shell $(MAKE) $(KERL_INSTALL_DIR)/$(ERLANG_HIPE))
+ifeq ($(wildcard $(KERL_INSTALL_DIR)/$(ERLANG_HIPE))$(BUILD_ERLANG_OTP),)
+$(info Building HiPE-enabled Erlang/OTP $(ERLANG_OTP)... Please wait...)
+BUILD_ERLANG_OTP := $(shell $(MAKE) $(KERL_INSTALL_DIR)/$(ERLANG_HIPE) BUILD_ERLANG_OTP=1)
endif
endif