summaryrefslogtreecommitdiff
path: root/src/rebar_erlc_compiler.erl
diff options
context:
space:
mode:
authoralisdair sullivan <alisdair.sullivan@askuity.com>2015-09-20 20:34:43 -0500
committeralisdair sullivan <alisdair.sullivan@askuity.com>2015-09-21 11:13:32 -0700
commit9d82215296205d2d30c152c7d7c6fcb8e4a92443 (patch)
tree3bf0479316c85e6fa59cef46cc9ca3985b1a9a5f /src/rebar_erlc_compiler.erl
parente718af2af4fc4e1a2c85b5ecc84a0dadddb8bbea (diff)
add an export to allow specifing arbitrary extra erl files to be compiled
to `rebar_erlc_compiler`
Diffstat (limited to 'src/rebar_erlc_compiler.erl')
-rw-r--r--src/rebar_erlc_compiler.erl7
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(