diff options
author | Fred Hebert <mononcqc@ferd.ca> | 2015-09-25 18:14:57 -0400 |
---|---|---|
committer | Fred Hebert <mononcqc@ferd.ca> | 2015-09-25 18:14:57 -0400 |
commit | d0bcd95813cfa6f76fdc26f0703600f122174443 (patch) | |
tree | 31357d465f7446190a5a91d1467139c08cb96909 /src | |
parent | 9cd557b6ed0235daeca077072af05b293c30d818 (diff) | |
parent | 9d82215296205d2d30c152c7d7c6fcb8e4a92443 (diff) |
Merge pull request #826 from talentdeficit/expose_more_sources
add an export to allow specifing arbitrary extra erl files to be compiled
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_erlc_compiler.erl | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/rebar_erlc_compiler.erl b/src/rebar_erlc_compiler.erl index 54faea4..2976a4f 100644 --- a/src/rebar_erlc_compiler.erl +++ b/src/rebar_erlc_compiler.erl @@ -28,6 +28,7 @@ -export([compile/1, compile/3, + compile/4, clean/1]). -include("rebar.hrl"). @@ -104,6 +105,11 @@ compile(Opts, Dir, OutDir) -> fun compile_mib/3), doterl_compile(Opts, Dir, OutDir). +-spec compile(rebar_dict(), file:filename(), file:filename(), [file:filename()]) -> 'ok'. +compile(Opts, Dir, OutDir, More) -> + ErlOpts = rebar_opts:erl_opts(Opts), + doterl_compile(Opts, Dir, OutDir, More, ErlOpts). + -spec clean(file:filename()) -> 'ok'. clean(AppDir) -> MibFiles = rebar_utils:find_files(filename:join(AppDir, "mibs"), ?RE_PREFIX".*\\.mib\$"), @@ -488,6 +494,7 @@ needs_compile(Source, Target) -> filelib:last_modified(Source) > filelib:last_modified(Target). gather_src([], Srcs) -> + ?DEBUG("src_files ~p", [Srcs]), Srcs; gather_src([Dir|Rest], Srcs) -> gather_src( |