diff options
author | Dave Smith <dizzyd@dizzyd.com> | 2010-06-03 15:12:13 -0600 |
---|---|---|
committer | Dave Smith <dizzyd@dizzyd.com> | 2010-06-03 15:12:13 -0600 |
commit | 30ae41dafd5d8940414edca35fb54afa934b3e6e (patch) | |
tree | 562bdf2b82d83520751a1a22c835c51882f2a937 /src | |
parent | 1866f6575824684651b1a2291739bb7bce551f33 (diff) |
Minor cleanup of acc_modules for readability
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_core.erl | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/rebar_core.erl b/src/rebar_core.erl index 68347bf..8886251 100644 --- a/src/rebar_core.erl +++ b/src/rebar_core.erl @@ -298,8 +298,7 @@ process_subdirs(Dir, Modules, Config, ModuleSetFile, Command) -> process_subdirs(Dir, Modules, Config, ModuleSetFile, Command, ProcessedDirs) -> %% Give the modules a chance to tweak config and indicate if there %% are any other dirs that might need processing first. - {UpdatedConfig, Dirs} = acc_modules(select_modules(Modules, preprocess, []), - preprocess, Config, ModuleSetFile, []), + {UpdatedConfig, Dirs} = acc_modules(Modules, preprocess, Config, ModuleSetFile), ?DEBUG("~s subdirs: ~p\n", [Dir, Dirs]), %% 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. {UpdatedConfig1, _} = case (Dirs =/= [] andalso compile == Command) of true -> - acc_modules( - select_modules(Modules, preprocess, []), - preprocess, UpdatedConfig, ModuleSetFile, []); + acc_modules(Modules, preprocess, UpdatedConfig, + ModuleSetFile); false -> {UpdatedConfig, Dirs} end, @@ -503,6 +501,10 @@ run_modules([Module | Rest], Command, Config, File) -> {error, Reason} end. +acc_modules(Modules, Command, Config, File) -> + acc_modules(select_modules(Modules, Command, []), + Command, Config, File, []). + acc_modules([], _Command, Config, _File, Acc) -> {Config, Acc}; acc_modules([Module | Rest], Command, Config, File, Acc) -> |