diff options
Diffstat (limited to 'src/rebar_compiler_yrl.erl')
-rw-r--r-- | src/rebar_compiler_yrl.erl | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/rebar_compiler_yrl.erl b/src/rebar_compiler_yrl.erl index 41d93b1..9c1767e 100644 --- a/src/rebar_compiler_yrl.erl +++ b/src/rebar_compiler_yrl.erl @@ -3,7 +3,7 @@ -behaviour(rebar_compiler). -export([context/1, - needed_files/3, + needed_files/4, dependencies/3, compile/4, clean/2]). @@ -16,11 +16,13 @@ context(AppInfo) -> src_ext => ".yrl", out_mappings => Mappings}. -needed_files(_, FoundFiles, AppInfo) -> +needed_files(_, FoundFiles, Mappings, AppInfo) -> FirstFiles = [], %% Remove first files from found files - RestFiles = [Source || Source <- FoundFiles, not lists:member(Source, FirstFiles)], + RestFiles = [Source || Source <- FoundFiles, + not lists:member(Source, FirstFiles), + rebar_compiler:needs_compile(Source, ".erl", Mappings)], Opts = rebar_opts:get(rebar_app_info:opts(AppInfo), yrl_opts, []), {{FirstFiles, Opts}, {RestFiles, Opts}}. |