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: deps/.got:
rm -rf deps/.got rm -rf deps/.got
rm -rf deps/.built rm -rf deps/.built
mkdir deps
$(REBAR) get-deps && :> deps/.got $(REBAR) get-deps && :> deps/.got
deps/.built: deps/.got deps/.built: deps/.got

View File

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