소스 검색

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

불러오는 중...
취소
저장