summaryrefslogtreecommitdiff
path: root/src/rebar_erlc_compiler.erl
diff options
context:
space:
mode:
authorTristan Sloughter <tristan.sloughter@gmail.com>2015-03-08 15:06:54 -0500
committerTristan Sloughter <tristan.sloughter@gmail.com>2015-03-08 15:06:54 -0500
commit963f9754233b53933e7febda350666400f439fdd (patch)
tree2b81916a49b1c7625277b4e4f940a481c9601d75 /src/rebar_erlc_compiler.erl
parent5f61bd5b0610a2fd0d8f558fb84864133e625304 (diff)
parentab84fc89ccf7fbbff8457afefdc301e37de6a6c9 (diff)
Merge pull request #249 from talentdeficit/compile_from_build
compile source from the symlinked directories under `_build`
Diffstat (limited to 'src/rebar_erlc_compiler.erl')
-rw-r--r--src/rebar_erlc_compiler.erl10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/rebar_erlc_compiler.erl b/src/rebar_erlc_compiler.erl
index a113fc4..0ea09dc 100644
--- a/src/rebar_erlc_compiler.erl
+++ b/src/rebar_erlc_compiler.erl
@@ -26,7 +26,8 @@
%% -------------------------------------------------------------------
-module(rebar_erlc_compiler).
--export([compile/3,
+-export([compile/2,
+ compile/3,
clean/2]).
-include("rebar.hrl").
@@ -79,6 +80,10 @@
%% 'old_inets'}]}.
%%
+-spec compile(rebar_state:t(), file:name()) -> 'ok'.
+compile(Config, Dir) ->
+ compile(Config, Dir, filename:join([Dir, "ebin"])).
+
-spec compile(rebar_state:t(), file:name(), file:name()) -> 'ok'.
compile(Config, Dir, OutDir) ->
rebar_base_compiler:run(Config,
@@ -133,8 +138,7 @@ doterl_compile(State, Dir, ODir) ->
ErlOpts = rebar_utils:erl_opts(State),
doterl_compile(State, Dir, ODir, [], ErlOpts).
-doterl_compile(Config, Dir, ODir, MoreSources, ErlOpts) ->
- OutDir = filename:join(ODir, "ebin"),
+doterl_compile(Config, Dir, OutDir, MoreSources, ErlOpts) ->
ErlFirstFilesConf = rebar_state:get(Config, erl_first_files, []),
?DEBUG("erl_opts ~p", [ErlOpts]),
%% Support the src_dirs option allowing multiple directories to