diff options
author | Tuncer Ayaz <tuncer.ayaz@gmail.com> | 2010-10-02 19:26:03 +0200 |
---|---|---|
committer | Tuncer Ayaz <tuncer.ayaz@gmail.com> | 2010-10-02 19:26:03 +0200 |
commit | 73398562aa2096603a6587c5e590d8f84b32def6 (patch) | |
tree | ec34103307f427f7654c4eb930d2bf9a6ec4682d /src | |
parent | 0a05775eed8890d17656dddd3953936d88e4b65b (diff) |
Fix xrl_opts/yrl_opts option handling
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_erlc_compiler.erl | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/rebar_erlc_compiler.erl b/src/rebar_erlc_compiler.erl index 89c0707..bea7efd 100644 --- a/src/rebar_erlc_compiler.erl +++ b/src/rebar_erlc_compiler.erl @@ -236,24 +236,24 @@ compile_mib(Source, Target, Config) -> compile_xrl(Source, Target, Config) -> Opts = [{scannerfile, Target}, {return, true} |rebar_config:get(Config, xrl_opts, [])], - compile_xrl_yrl(Source, Target, Config, Opts, leex). + compile_xrl_yrl(Source, Target, Opts, leex). -spec compile_yrl(Source::string(), Target::string(), Config::#config{}) -> 'ok'. compile_yrl(Source, Target, Config) -> Opts = [{parserfile, Target}, {return, true} |rebar_config:get(Config, yrl_opts, [])], - compile_xrl_yrl(Source, Target, Config, Opts, yecc). + compile_xrl_yrl(Source, Target, Opts, yecc). --spec compile_xrl_yrl(Source::string(), Target::string(), Config::#config{}, - Opts::list(), Mod::atom()) -> 'ok'. -compile_xrl_yrl(Source, Target, Config, Opts, Mod) -> +-spec compile_xrl_yrl(Source::string(), Target::string(), Opts::list(), + Mod::atom()) -> 'ok'. +compile_xrl_yrl(Source, Target, Opts, Mod) -> case needs_compile(Source, Target, []) of true -> case Mod:file(Source, Opts) of {ok, _, []} -> ok; {ok, _, _Warnings} -> - case lists:member(fail_on_warnings, Config#config.opts) of + case lists:member(fail_on_warning, Opts) of true -> ?FAIL; false -> |