Browse Source

breakout needs compile check from compile_xrl_yrl

pull/323/head
Tristan Sloughter 10 years ago
parent
commit
23fa5c659b
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      src/rebar_erlc_compiler.erl

+ 4
- 1
src/rebar_erlc_compiler.erl View File

@ -401,7 +401,7 @@ compile_xrl_yrl(Config, Source, Target, Opts, Mod) ->
Dir = rebar_state:dir(Config),
Opts1 = [{includefile, filename:join(Dir, I)} || {includefile, I} <- Opts,
filename:pathtype(I) =:= relative],
case filelib:last_modified(Source) > filelib:last_modified(Target) of
case needs_compile(Source, Target) of
true ->
case Mod:file(Source, Opts1 ++ [{return, true}]) of
{ok, _} ->
@ -416,6 +416,9 @@ compile_xrl_yrl(Config, Source, Target, Opts, Mod) ->
skipped
end.
needs_compile(Source, Target) ->
filelib:last_modified(Source) > filelib:last_modified(Target).
gather_src([], Srcs) ->
Srcs;
gather_src([Dir|Rest], Srcs) ->

Loading…
Cancel
Save