From fb26525a52935e98ef2521133d2b7bf5f34d5ab9 Mon Sep 17 00:00:00 2001 From: alisdair sullivan Date: Sat, 11 Jun 2016 16:13:03 -0700 Subject: REBAR-1184 always recompile if `ERL_COMPILER_OPTIONS` env var is set partially addresses #1184 --- src/rebar_erlc_compiler.erl | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/rebar_erlc_compiler.erl b/src/rebar_erlc_compiler.erl index 3480cf6..2a9f310 100644 --- a/src/rebar_erlc_compiler.erl +++ b/src/rebar_erlc_compiler.erl @@ -308,6 +308,7 @@ needed_files(G, ErlOpts, Dir, OutDir, SourceFiles) -> ,{i, Dir}] ++ ErlOpts, digraph:vertex(G, Source) > {Source, filelib:last_modified(Target)} orelse opts_changed(AllOpts, TargetBase) + orelse erl_compiler_opts_set() end, SourceFiles). maybe_rm_beam_and_edge(G, OutDir, Source) -> @@ -340,6 +341,12 @@ compile_info(Target) -> {error, Reason} end. +erl_compiler_opts_set() -> + case os:getenv("ERL_COMPILER_OPTIONS") of + false -> false; + _ -> true + end. + erlcinfo_file(Dir) -> filename:join(rebar_dir:local_cache_dir(Dir), ?ERLCINFO_FILE). -- cgit v1.1