From 4ad998b7187a5910304ffeef867571400b6b4c61 Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Mon, 12 Oct 2015 17:00:26 +0000 Subject: Support proper paths in non-erl first files This passes the directory to the option to ensure it works with more than configs at the root of the project. --- src/rebar_erlc_compiler.erl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/rebar_erlc_compiler.erl b/src/rebar_erlc_compiler.erl index 2976a4f..b9192c3 100644 --- a/src/rebar_erlc_compiler.erl +++ b/src/rebar_erlc_compiler.erl @@ -89,18 +89,18 @@ compile(AppInfo) -> -spec compile(rebar_dict(), file:name(), file:name()) -> 'ok'. compile(Opts, Dir, OutDir) -> rebar_base_compiler:run(Opts, - check_files(rebar_opts:get( - Opts, xrl_first_files, [])), + check_files([filename:join(Dir, File) + || File <- rebar_opts:get(Opts, xrl_first_files, [])]), filename:join(Dir, "src"), ".xrl", filename:join(Dir, "src"), ".erl", fun compile_xrl/3), rebar_base_compiler:run(Opts, - check_files(rebar_opts:get( - Opts, yrl_first_files, [])), + check_files([filename:join(Dir, File) + || File <- rebar_opts:get(Opts, yrl_first_files, [])]), filename:join(Dir, "src"), ".yrl", filename:join(Dir, "src"), ".erl", fun compile_yrl/3), rebar_base_compiler:run(Opts, - check_files(rebar_opts:get( - Opts, mib_first_files, [])), + check_files([filename:join(Dir, File) + || File <- rebar_opts:get(Opts, mib_first_files, [])]), filename:join(Dir, "mibs"), ".mib", filename:join([Dir, "priv", "mibs"]), ".bin", fun compile_mib/3), doterl_compile(Opts, Dir, OutDir). -- cgit v1.1