mirror of
https://github.com/correl/rebar.git
synced 2024-11-23 19:19:54 +00:00
Add support for passing addt'l list of sources to erlc_compiler
This commit is contained in:
parent
47e70f308a
commit
b9e78d6722
1 changed files with 9 additions and 4 deletions
|
@ -29,7 +29,8 @@
|
||||||
-export([compile/2,
|
-export([compile/2,
|
||||||
clean/2]).
|
clean/2]).
|
||||||
|
|
||||||
-export([doterl_compile/2]).
|
-export([doterl_compile/2,
|
||||||
|
doterl_compile/3]).
|
||||||
|
|
||||||
-include("rebar.hrl").
|
-include("rebar.hrl").
|
||||||
|
|
||||||
|
@ -63,12 +64,16 @@ clean(_Config, _AppFile) ->
|
||||||
%% .erl Compilation API (externally used by only eunit)
|
%% .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, []),
|
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],
|
lists:member(Source, FirstErls) == false],
|
||||||
rebar_base_compiler:run(Config, FirstErls, RestErls,
|
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).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%% ===================================================================
|
%% ===================================================================
|
||||||
|
|
Loading…
Reference in a new issue