From 8fd7364517c571b96537a0595c9fac5d31b08b86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Fri, 15 Jan 2016 14:44:26 +0100 Subject: Try an experimental Erlang.mk CI feature --- erlang.mk | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'erlang.mk') diff --git a/erlang.mk b/erlang.mk index 6748ab5..f1936c3 100644 --- a/erlang.mk +++ b/erlang.mk @@ -16,7 +16,7 @@ ERLANG_MK_FILENAME := $(realpath $(lastword $(MAKEFILE_LIST))) -ERLANG_MK_VERSION = 2.0.0-pre.2-73-g87285ad +ERLANG_MK_VERSION = 2.0.0-pre.2-73-g87285ad-dirty # Core configuration. @@ -5850,12 +5850,22 @@ endif # Copyright (c) 2015, Loïc Hoguin # This file is part of erlang.mk and subject to the terms of the ISC License. -.PHONY: ci ci-setup distclean-kerl +.PHONY: ci ci-prepare ci-setup distclean-kerl + +ifndef KERL +KERL := $(shell which kerl 2>/dev/null) + +ifeq ($(strip $(KERL)),) +KERL := $(CURDIR)/.erlang.mk/kerl/kerl +endif +endif -KERL ?= $(CURDIR)/kerl export KERL -KERL_URL ?= https://raw.githubusercontent.com/yrashk/kerl/master/kerl +KERL_GIT ?= https://github.com/yrashk/kerl +KERL_COMMIT ?= 4e7c4349ddcd46ac11cd4cd50bfbda25f1f11ca2 + +KERL_MAKEFLAGS ?= OTP_GIT ?= https://github.com/erlang/otp @@ -5888,7 +5898,7 @@ $(foreach otp,$(CI_OTP),$(eval $(call ci_target,$(otp)))) define ci_otp_target ifeq ($(wildcard $(CI_INSTALL_DIR)/$(1)),) $(CI_INSTALL_DIR)/$(1): $(KERL) - $(KERL) build git $(OTP_GIT) $(1) $(1) + $(KERL_MAKEFLAGS) $(KERL) build git $(OTP_GIT) $(1) $(1) $(KERL) install $(1) $(CI_INSTALL_DIR)/$(1) endif endef @@ -5896,7 +5906,9 @@ endef $(foreach otp,$(CI_OTP),$(eval $(call ci_otp_target,$(otp)))) $(KERL): - $(gen_verbose) $(call core_http_get,$(KERL),$(KERL_URL)) + $(verbose) mkdir -p $(ERLANG_MK_TMP) + $(gen_verbose) git clone $(KERL_GIT) $(ERLANG_MK_TMP)/kerl + $(verbose) cd $(ERLANG_MK_TMP)/kerl && git checkout $(KERL_COMMIT) $(verbose) chmod +x $(KERL) help:: -- cgit v1.2.3