aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2016-01-15 14:44:26 +0100
committerLoïc Hoguin <[email protected]>2016-01-15 14:44:26 +0100
commit8fd7364517c571b96537a0595c9fac5d31b08b86 (patch)
treef62f6f83860f3c5d0a3f003b119b7f021bf2d2c3
parente84e06d8f9b8138da676d0a56facd16a7c8e28c6 (diff)
downloadcowboy-8fd7364517c571b96537a0595c9fac5d31b08b86.tar.gz
cowboy-8fd7364517c571b96537a0595c9fac5d31b08b86.tar.bz2
cowboy-8fd7364517c571b96537a0595c9fac5d31b08b86.zip
Try an experimental Erlang.mk CI feature
-rw-r--r--circle.yml2
-rw-r--r--erlang.mk24
2 files changed, 19 insertions, 7 deletions
diff --git a/circle.yml b/circle.yml
index e443341..387156a 100644
--- a/circle.yml
+++ b/circle.yml
@@ -13,7 +13,7 @@ dependencies:
- sudo apt-get install autoconf2.59
- cd $HOME/bin && ln -s /usr/bin/autoconf2.59 autoconf
- cd $HOME/bin && ln -s /usr/bin/autoheader2.59 autoheader
- - MAKEFLAGS="-j 32" make ci-prepare:
+ - KERL_MAKEFLAGS="-j 32 -O" make ci-prepare:
timeout: 3600
test:
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 <[email protected]>
# 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::