From 905642f6fc434889243451ef7abbb1a46c83710a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Tue, 15 Nov 2016 12:26:51 +0200 Subject: Update Erlang.mk and CI OTP versions for 19.1.6 --- Makefile | 4 +++- erlang.mk | 47 +++++++++++++++++++++++++++++++++++++---------- 2 files changed, 40 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 2ca9290..e51bc96 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,9 @@ CI_OTP ?= \ OTP_R16B OTP_R16B01 OTP_R16B02 OTP_R16B03-1 \ OTP-17.1.2 OTP-17.2.2 OTP-17.3.4 OTP-17.4.1 OTP-17.5.6.6 \ OTP-18.0.3 OTP-18.1.5 OTP-18.2.4.1 OTP-18.3.4.4 \ - OTP-19.0.7 OTP-19.1.5 + OTP-19.0.7 OTP-19.1.6 +CI_HIPE ?= $(lastword $(CI_OTP)) +CI_ERLLVM ?= $(CI_HIPE) # Dependencies. diff --git a/erlang.mk b/erlang.mk index 366ce39..38bea99 100644 --- a/erlang.mk +++ b/erlang.mk @@ -16,7 +16,7 @@ ERLANG_MK_FILENAME := $(realpath $(lastword $(MAKEFILE_LIST))) -ERLANG_MK_VERSION = 2016.10.21-43-g4f5d8d7 +ERLANG_MK_VERSION = 2016.11.03-4-g9e9b7d2 # Make 3.81 and 3.82 are deprecated. @@ -6010,8 +6010,18 @@ endif .PHONY: ci ci-prepare ci-setup distclean-kerl CI_OTP ?= +CI_HIPE ?= +CI_ERLLVM ?= + +ifeq ($(CI_VM),native) +ERLC_OPTS += +native +TEST_ERLC_OPTS += +native +else ifeq ($(CI_VM),erllvm) +ERLC_OPTS += +native +'{hipe, [to_llvm]}' +TEST_ERLC_OPTS += +native +'{hipe, [to_llvm]}' +endif -ifeq ($(strip $(CI_OTP)),) +ifeq ($(strip $(CI_OTP) $(CI_HIPE) $(CI_ERLLVM)),) ci:: else @@ -6030,26 +6040,32 @@ OTP_GIT ?= https://github.com/erlang/otp CI_INSTALL_DIR ?= $(HOME)/erlang -ci:: $(addprefix ci-,$(CI_OTP)) +ci:: $(addprefix ci-,$(CI_OTP) $(addsuffix -native,$(CI_HIPE)) $(addsuffix -erllvm,$(CI_ERLLVM))) -ci-prepare: $(addprefix $(CI_INSTALL_DIR)/,$(CI_OTP)) +ci-prepare: $(addprefix $(CI_INSTALL_DIR)/,$(CI_OTP) $(addsuffix -native,$(CI_HIPE))) ci-setup:: +ci-extra:: + ci_verbose_0 = @echo " CI " $(1); ci_verbose = $(ci_verbose_$(V)) define ci_target -ci-$(1): $(CI_INSTALL_DIR)/$(1) - $(verbose) $(MAKE) --no-print-directory clean; +ci-$1: $(CI_INSTALL_DIR)/$2 + $(verbose) $(MAKE) --no-print-directory clean $(ci_verbose) \ - PATH="$(CI_INSTALL_DIR)/$(1)/bin:$(PATH)" \ - CI_OTP_RELEASE="$(1)" \ - CT_OPTS="-label $(1)" \ + PATH="$(CI_INSTALL_DIR)/$2/bin:$(PATH)" \ + CI_OTP_RELEASE="$1" \ + CT_OPTS="-label $1" \ + CI_VM="$3" \ $(MAKE) ci-setup tests + $(verbose) $(MAKE) --no-print-directory ci-extra endef -$(foreach otp,$(CI_OTP),$(eval $(call ci_target,$(otp)))) +$(foreach otp,$(CI_OTP),$(eval $(call ci_target,$(otp),$(otp),otp))) +$(foreach otp,$(CI_HIPE),$(eval $(call ci_target,$(otp)-native,$(otp)-native,native))) +$(foreach otp,$(CI_ERLLVM),$(eval $(call ci_target,$(otp)-erllvm,$(otp)-native,erllvm))) define ci_otp_target ifeq ($(wildcard $(CI_INSTALL_DIR)/$(1)),) @@ -6061,6 +6077,17 @@ endef $(foreach otp,$(CI_OTP),$(eval $(call ci_otp_target,$(otp)))) +define ci_hipe_target +ifeq ($(wildcard $(CI_INSTALL_DIR)/$1-native),) +$(CI_INSTALL_DIR)/$1-native: $(KERL) + KERL_CONFIGURE_OPTIONS=--enable-native-libs \ + MAKEFLAGS="$(KERL_MAKEFLAGS)" $(KERL) build git $(OTP_GIT) $1 $1-native + $(KERL) install $1-native $(CI_INSTALL_DIR)/$1-native +endif +endef + +$(foreach otp,$(sort $(CI_HIPE) $(CI_ERLLLVM)),$(eval $(call ci_hipe_target,$(otp)))) + $(KERL): $(verbose) mkdir -p $(ERLANG_MK_TMP) $(gen_verbose) git clone --depth 1 $(KERL_GIT) $(ERLANG_MK_TMP)/kerl -- cgit v1.2.3