From 7095382e2c769f43214c32c4cb7f357b15ee095c Mon Sep 17 00:00:00 2001 From: suexcxine Date: Fri, 25 Aug 2017 22:50:22 +0800 Subject: Recompile when include files change --- src/rebar_erlc_compiler.erl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/rebar_erlc_compiler.erl') diff --git a/src/rebar_erlc_compiler.erl b/src/rebar_erlc_compiler.erl index 94cbe13..c588a25 100644 --- a/src/rebar_erlc_compiler.erl +++ b/src/rebar_erlc_compiler.erl @@ -787,8 +787,9 @@ outdir(RebarOpts) -> proplists:get_value(outdir, ErlOpts, ?DEFAULT_OUTDIR). include_abs_dirs(ErlOpts, BaseDir) -> - InclDirs = ["include"|proplists:get_all_values(i, ErlOpts)], - lists:map(fun(Incl) -> filename:join([BaseDir, Incl]) end, InclDirs). + ErlOptIncludes = proplists:get_all_values(i, ErlOpts), + InclDirs = lists:map(fun(Incl) -> filename:absname(Incl) end, ErlOptIncludes), + [filename:join([BaseDir, "include"])|InclDirs]. dir_recursive(Opts, Dir, CompileOpts) when is_list(CompileOpts) -> case proplists:get_value(recursive,CompileOpts) of -- cgit v1.1