aboutsummaryrefslogtreecommitdiffstats
path: root/core/deps.mk
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2018-11-30 00:20:18 +0100
committerLoïc Hoguin <[email protected]>2018-11-30 00:20:18 +0100
commit1f0a614d56f7208fa5aec38731b9451b9f18bec6 (patch)
tree56cc80d8c37b6dcbcaa5b361e5aa7df83ea540ec /core/deps.mk
parent037ab74c1f5d980e66f1d460de87c7cccd086316 (diff)
downloaderlang.mk-1f0a614d56f7208fa5aec38731b9451b9f18bec6.tar.gz
erlang.mk-1f0a614d56f7208fa5aec38731b9451b9f18bec6.tar.bz2
erlang.mk-1f0a614d56f7208fa5aec38731b9451b9f18bec6.zip
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.
Diffstat (limited to 'core/deps.mk')
-rw-r--r--core/deps.mk11
1 files changed, 11 insertions, 0 deletions
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