From 1f0a614d56f7208fa5aec38731b9451b9f18bec6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Fri, 30 Nov 2018 00:20:18 +0100 Subject: Add autopatch for LFE projects Currently experimental. It'll enable lfe.mk when it encounters the rebar3 plugin lfe-compile. Tested against some small library. Note that it adds lfe as a build dependency with no version given so the latest master will be fetched right now. This can be overriden in the parent project. --- core/deps.mk | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'core/deps.mk') diff --git a/core/deps.mk b/core/deps.mk index 225ecb4..3d0bab7 100644 --- a/core/deps.mk +++ b/core/deps.mk @@ -467,6 +467,17 @@ define dep_autopatch_rebar.erl end, [PortSpec(S) || S <- PortSpecs] end, + fun() -> + case lists:keyfind(plugins, 1, Conf) of + false -> ok; + {_, Plugins0} -> + Plugins = [P || P <- Plugins0, is_tuple(P)], + case lists:keyfind('lfe-compile', 1, Plugins) of + false -> ok; + _ -> Write("\nBUILD_DEPS = lfe lfe.mk\ndep_lfe.mk = git https://github.com/ninenines/lfe.mk master\nDEP_PLUGINS = lfe.mk\n") + end + end + end(), Write("\ninclude $$\(if $$\(ERLANG_MK_FILENAME),$$\(ERLANG_MK_FILENAME),erlang.mk)"), RunPlugin = fun(Plugin, Step) -> case erlang:function_exported(Plugin, Step, 2) of -- cgit v1.2.3