25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

Improve --enable-system-deps

This commit is contained in:
Paweł Chmielowski 2017-10-30 13:55:10 +01:00
parent 0633dd5802
commit 9b8ae80dab
2 changed files with 16 additions and 6 deletions

View File

@ -93,6 +93,7 @@ deps: deps/.got
deps/.got:
rm -rf deps/.got
rm -rf deps/.built
mkdir deps
$(REBAR) get-deps && :> deps/.got
deps/.built: deps/.got

View File

@ -229,13 +229,22 @@ TestConfig = case file:read_file_info(TestConfigFile) of
""
end,
ResolveDepPath = case IsRebar3 of
true ->
ResolveDepPath = case {SystemDeps, IsRebar3} of
{true, _} ->
fun("deps/" ++ Rest) ->
Slash = string:str(Rest, "/"),
Dir = "_build/default/lib/" ++
string:sub_string(Rest, 1, Slash - 1),
Dir ++ string:sub_string(Rest, Slash);
code:lib_dir(
string:sub_string(Rest, 1, Slash -1)) ++
string:sub_string(Rest, Slash);
(Path) ->
Path
end;
{_, true} ->
fun("deps/" ++ Rest) ->
Slash = string:str(Rest, "/"),
"_build/default/lib/" ++
string:sub_string(Rest, 1, Slash - 1) ++
string:sub_string(Rest, Slash);
(Path) ->
Path
end;
@ -326,7 +335,7 @@ Rules = [
AppendList([{coveralls, ".*", {git, "https://github.com/markusn/coveralls-erl.git", "master"}}]), []},
{[post_hooks], [cover_enabled], os:getenv("TRAVIS") == "true",
AppendList2(TravisPostHooks), [], false},
{[overrides], [post_hook_configure], true,
{[overrides], [post_hook_configure], SystemDeps == false,
AppendList2(GenDepsConfigure), [], []},
{[ct_extra_params], [eunit_compile_opts], true,
AppendStr2(CtParams), "", []},