mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
Call configure on deps in separate rebar command that compile
This way we rebar.config.script can use vars detected by configure
This commit is contained in:
parent
99f8e58eaf
commit
a7639fd4ad
@ -97,6 +97,7 @@ deps/.got:
|
|||||||
$(REBAR) get-deps && :> deps/.got
|
$(REBAR) get-deps && :> deps/.got
|
||||||
|
|
||||||
deps/.built: deps/.got
|
deps/.built: deps/.got
|
||||||
|
$(REBAR) recursive-deps
|
||||||
$(REBAR) compile && :> deps/.built
|
$(REBAR) compile && :> deps/.built
|
||||||
|
|
||||||
src: deps/.built
|
src: deps/.built
|
||||||
|
5
plugins/configure_deps.erl
Normal file
5
plugins/configure_deps.erl
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
-module(configure_deps).
|
||||||
|
-export(['configure-deps'/2]).
|
||||||
|
|
||||||
|
'configure-deps'(Config, Vals) ->
|
||||||
|
{ok, Config}.
|
@ -2,13 +2,13 @@
|
|||||||
-export([preprocess/2]).
|
-export([preprocess/2]).
|
||||||
|
|
||||||
override_opts(override, Config, Opts) ->
|
override_opts(override, Config, Opts) ->
|
||||||
lists:foldl(fun({Opt, [Value]}, Conf) ->
|
lists:foldl(fun({Opt, Value}, Conf) ->
|
||||||
rebar_config:set(Conf, Opt, Value)
|
rebar_config:set(Conf, Opt, Value)
|
||||||
end, Config, Opts);
|
end, Config, Opts);
|
||||||
override_opts(add, Config, Opts) ->
|
override_opts(add, Config, Opts) ->
|
||||||
lists:foldl(fun({Opt, [Value]}, Conf) ->
|
lists:foldl(fun({Opt, Value}, Conf) ->
|
||||||
V = rebar_config:get_local(Conf, Opt, []),
|
V = rebar_config:get_local(Conf, Opt, []),
|
||||||
rebar_config:set(Conf, Opt, [Value | V])
|
rebar_config:set(Conf, Opt, V ++ Value)
|
||||||
end, Config, Opts).
|
end, Config, Opts).
|
||||||
|
|
||||||
preprocess(Config, _Dirs) ->
|
preprocess(Config, _Dirs) ->
|
||||||
|
@ -111,7 +111,7 @@
|
|||||||
|
|
||||||
{if_rebar3, {plugins, [rebar3_hex, {provider_asn1, "0.2.0"}]}}.
|
{if_rebar3, {plugins, [rebar3_hex, {provider_asn1, "0.2.0"}]}}.
|
||||||
{if_not_rebar3, {plugins, [
|
{if_not_rebar3, {plugins, [
|
||||||
deps_erl_opts, override_deps_versions, override_opts,
|
deps_erl_opts, override_deps_versions, override_opts, configure_deps,
|
||||||
{if_var_true, elixir, rebar_elixir_compiler},
|
{if_var_true, elixir, rebar_elixir_compiler},
|
||||||
{if_var_true, elixir, rebar_exunit}
|
{if_var_true, elixir, rebar_exunit}
|
||||||
]}}.
|
]}}.
|
||||||
@ -153,6 +153,7 @@
|
|||||||
|
|
||||||
{if_version_above, "17", {cover_enabled, true}}.
|
{if_version_above, "17", {cover_enabled, true}}.
|
||||||
{cover_export_enabled, true}.
|
{cover_export_enabled, true}.
|
||||||
|
{recursive_cmds, ['configure-deps']}.
|
||||||
|
|
||||||
{post_hook_configure, [{"fast_tls", []},
|
{post_hook_configure, [{"fast_tls", []},
|
||||||
{"stringprep", []},
|
{"stringprep", []},
|
||||||
|
@ -298,8 +298,8 @@ GenDepsConfigure =
|
|||||||
fun(Hooks) ->
|
fun(Hooks) ->
|
||||||
lists:map(fun({Pkg, Flags}) ->
|
lists:map(fun({Pkg, Flags}) ->
|
||||||
DepPath = ResolveDepPath("deps/" ++ Pkg ++ "/"),
|
DepPath = ResolveDepPath("deps/" ++ Pkg ++ "/"),
|
||||||
{add, list_to_atom(Pkg), [{pre_hooks, [{'compile',
|
Line = lists:flatten(GenDepConfigureLine(DepPath, Flags)),
|
||||||
lists:flatten(GenDepConfigureLine(DepPath, Flags))}]}]}
|
{add, list_to_atom(Pkg), [{pre_hooks, [{'compile', Line}, {'configure-deps', Line}]}]}
|
||||||
end, Hooks)
|
end, Hooks)
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user