diff options
author | Dave Smith <dizzyd@dizzyd.com> | 2010-02-01 08:37:52 -0700 |
---|---|---|
committer | Dave Smith <dizzyd@dizzyd.com> | 2010-02-01 08:37:52 -0700 |
commit | b9e78d6722b8b723782de19b3cf54af253273270 (patch) | |
tree | d441c8bfaa1e7784a034500fab9e29c21fe4c9e5 | |
parent | 47e70f308af15d86654e7f5b324ded4a79d10f58 (diff) |
Add support for passing addt'l list of sources to erlc_compiler
-rw-r--r-- | src/rebar_erlc_compiler.erl | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/rebar_erlc_compiler.erl b/src/rebar_erlc_compiler.erl index fc1524f..04878c3 100644 --- a/src/rebar_erlc_compiler.erl +++ b/src/rebar_erlc_compiler.erl @@ -29,7 +29,8 @@ -export([compile/2, clean/2]). --export([doterl_compile/2]). +-export([doterl_compile/2, + doterl_compile/3]). -include("rebar.hrl"). @@ -63,12 +64,16 @@ clean(_Config, _AppFile) -> %% .erl Compilation API (externally used by only eunit) %% =================================================================== -doterl_compile(Config, Outdir) -> +doterl_compile(Config, OutDir) -> + doterl_compile(Config, OutDir, []). + +doterl_compile(Config, OutDir, MoreSources) -> FirstErls = rebar_config:get_list(Config, erl_first_files, []), - RestErls = [Source || Source <- rebar_utils:find_files("src", ".*\\.erl\$"), + RestErls = [Source || Source <- rebar_utils:find_files("src", ".*\\.erl\$") ++ MoreSources, lists:member(Source, FirstErls) == false], rebar_base_compiler:run(Config, FirstErls, RestErls, - fun(S, C) -> internal_erl_compile(S, C, Outdir) end). + fun(S, C) -> internal_erl_compile(S, C, OutDir) end). + %% =================================================================== |