Skip to content

Commit

Permalink
Force configure if source was newly downloaded or cleaned
Browse files Browse the repository at this point in the history
  • Loading branch information
eproxus committed Dec 9, 2021
1 parent a917f36 commit de19f96
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/grisp_tools_build.erl
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,15 @@ configure(#{build := Build} = S0) ->
% We must configure if we just downloaded or cleaned the repository
case WasDownloaded orelse DidClean orelse ShouldConfigure of
true ->
Opts = [{cd, mapz:deep_get([paths, build], S0)}],
S1 = case {WasDownloaded, DidClean, ShouldConfigure} of
{true, _, false} -> event(S0, [{'_override', download}]);
{_, true, false} -> event(S0, [{'_override', clean}]);
{_, _, _} -> S0
end,
Opts = [{cd, mapz:deep_get([paths, build], S1)}],
% TODO: Remove autoconf step when supporting only 23.3+ (not needed)
S1 = build_step("./otp_build autoconf", Opts, S0),
XCompConf = mapz:deep_get([build, config, xcomp_conf], S0),
S2 = build_step("./otp_build autoconf", Opts, S1),
XCompConf = mapz:deep_get([build, config, xcomp_conf], S2),
Command = [
"./otp_build configure ",
" --prefix=/",
Expand All @@ -167,7 +172,7 @@ configure(#{build := Build} = S0) ->
" --without-wx",
" --xcomp-conf=", XCompConf
],
build_step(Command, Opts, S1);
build_step(Command, Opts, S2);
false ->
event(S0, ['_skip'])
end.
Expand Down

0 comments on commit de19f96

Please sign in to comment.