mirror of
https://github.com/correl/rebar.git
synced 2024-11-27 19:19:53 +00:00
Minor cleanup of acc_modules for readability
This commit is contained in:
parent
1866f65758
commit
30ae41dafd
1 changed files with 7 additions and 5 deletions
|
@ -298,8 +298,7 @@ process_subdirs(Dir, Modules, Config, ModuleSetFile, Command) ->
|
||||||
process_subdirs(Dir, Modules, Config, ModuleSetFile, Command, ProcessedDirs) ->
|
process_subdirs(Dir, Modules, Config, ModuleSetFile, Command, ProcessedDirs) ->
|
||||||
%% Give the modules a chance to tweak config and indicate if there
|
%% Give the modules a chance to tweak config and indicate if there
|
||||||
%% are any other dirs that might need processing first.
|
%% are any other dirs that might need processing first.
|
||||||
{UpdatedConfig, Dirs} = acc_modules(select_modules(Modules, preprocess, []),
|
{UpdatedConfig, Dirs} = acc_modules(Modules, preprocess, Config, ModuleSetFile),
|
||||||
preprocess, Config, ModuleSetFile, []),
|
|
||||||
?DEBUG("~s subdirs: ~p\n", [Dir, Dirs]),
|
?DEBUG("~s subdirs: ~p\n", [Dir, Dirs]),
|
||||||
|
|
||||||
%% Add ebin to path if this app has any plugins configured locally.
|
%% Add ebin to path if this app has any plugins configured locally.
|
||||||
|
@ -322,9 +321,8 @@ process_subdirs(Dir, Modules, Config, ModuleSetFile, Command, ProcessedDirs) ->
|
||||||
%% may have been produced.
|
%% may have been produced.
|
||||||
{UpdatedConfig1, _} = case (Dirs =/= [] andalso compile == Command) of
|
{UpdatedConfig1, _} = case (Dirs =/= [] andalso compile == Command) of
|
||||||
true ->
|
true ->
|
||||||
acc_modules(
|
acc_modules(Modules, preprocess, UpdatedConfig,
|
||||||
select_modules(Modules, preprocess, []),
|
ModuleSetFile);
|
||||||
preprocess, UpdatedConfig, ModuleSetFile, []);
|
|
||||||
false ->
|
false ->
|
||||||
{UpdatedConfig, Dirs}
|
{UpdatedConfig, Dirs}
|
||||||
end,
|
end,
|
||||||
|
@ -503,6 +501,10 @@ run_modules([Module | Rest], Command, Config, File) ->
|
||||||
{error, Reason}
|
{error, Reason}
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
acc_modules(Modules, Command, Config, File) ->
|
||||||
|
acc_modules(select_modules(Modules, Command, []),
|
||||||
|
Command, Config, File, []).
|
||||||
|
|
||||||
acc_modules([], _Command, Config, _File, Acc) ->
|
acc_modules([], _Command, Config, _File, Acc) ->
|
||||||
{Config, Acc};
|
{Config, Acc};
|
||||||
acc_modules([Module | Rest], Command, Config, File, Acc) ->
|
acc_modules([Module | Rest], Command, Config, File, Acc) ->
|
||||||
|
|
Loading…
Reference in a new issue