From 73398562aa2096603a6587c5e590d8f84b32def6 Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Sat, 2 Oct 2010 19:26:03 +0200 Subject: Fix xrl_opts/yrl_opts option handling --- src/rebar_erlc_compiler.erl | 12 ++++++------ 1 file 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 -> -- cgit v1.1