From 4522af8cc771c7f6f1ac2712a1c4e9e023dafe50 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= <essen@ninenines.eu>
Date: Wed, 2 May 2018 16:34:02 +0200
Subject: Add LATEST_ERLANG_OTP=1 to automatically select the latest build

I need this for CI because I want to run Dialyzer only against
the most recent OTP after tests have passed everywhere. Left
undocumented for now.

[ci skip]
---
 core/kerl.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/core/kerl.mk b/core/kerl.mk
index 771ad41..a6b45d7 100644
--- a/core/kerl.mk
+++ b/core/kerl.mk
@@ -48,6 +48,10 @@ distclean-kerl:
 
 # Allow users to select which version of Erlang/OTP to use for a project.
 
+ifneq ($(strip $(LATEST_ERLANG_OTP)),)
+ERLANG_OTP := $(notdir $(lastword $(sort $(wildcard $(KERL_INSTALL_DIR)/*[^-native]))))
+endif
+
 ERLANG_OTP ?=
 ERLANG_HIPE ?=
 
-- 
cgit v1.2.3