summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBob Ippolito <bob@redivi.com>2010-05-08 07:07:28 -0700
committerBob Ippolito <bob@redivi.com>2010-05-08 07:07:28 -0700
commit59ab113f3bedee12bac6b4c41ab0cc5dd5edc285 (patch)
treeff4081d49de8b7791f17d4437fe56d5407f36e96 /src
parent317655f724d69305de75a5f332478778db3dc743 (diff)
Run the preprocess again if subdirs were compiled, fixes http://bitbucket.org/basho/rebar/issue/5
Diffstat (limited to 'src')
-rw-r--r--src/rebar_core.erl11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/rebar_core.erl b/src/rebar_core.erl
index 117d6cf..061fd5c 100644
--- a/src/rebar_core.erl
+++ b/src/rebar_core.erl
@@ -287,6 +287,17 @@ process_dir(Dir, ParentConfig, Commands) ->
%% to change
ok = file:set_cwd(Dir),
+ %% http://bitbucket.org/basho/rebar/issue/5
+ %% If the compiler ran, run the preprocess again because a new ebin dir
+ %% may have been produced.
+ case Dirs =/= [] andalso lists:member(compile, Commands) of
+ true ->
+ acc_modules(select_modules(Modules, preprocess, []),
+ preprocess, Config, ModuleSetFile, []);
+ false ->
+ ok
+ end,
+
%% Finally, process the current working directory
?DEBUG("Commands: ~p Modules: ~p\n", [Commands, Modules]),
apply_commands(Commands, Modules, UpdatedConfig, ModuleSetFile),