diff options
author | alisdair sullivan <alisdairsullivan@yahoo.ca> | 2016-06-11 16:13:03 -0700 |
---|---|---|
committer | alisdair sullivan <alisdairsullivan@yahoo.ca> | 2016-06-11 16:15:19 -0700 |
commit | fb26525a52935e98ef2521133d2b7bf5f34d5ab9 (patch) | |
tree | d8c4b762c426a48a95bd45a4fed58be613e8c41c /src | |
parent | e337793e9fda77462d5d5dec7ed0fa3fd11483d7 (diff) |
REBAR-1184 always recompile if `ERL_COMPILER_OPTIONS` env var is set
partially addresses #1184
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_erlc_compiler.erl | 7 |
1 files changed, 7 insertions, 0 deletions
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). |