浏览代码

breakout needs compile check from compile_xrl_yrl

pull/323/head
Tristan Sloughter 10 年前
父节点
当前提交
23fa5c659b
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. +4
    -1
      src/rebar_erlc_compiler.erl

+ 4
- 1
src/rebar_erlc_compiler.erl 查看文件

@ -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) ->

正在加载...
取消
保存