mirror of
https://github.com/correl/rebar.git
synced 2024-12-18 03:00:17 +00:00
Fix xrl_opts/yrl_opts option handling
This commit is contained in:
parent
0a05775eed
commit
73398562aa
1 changed files with 6 additions and 6 deletions
|
@ -236,24 +236,24 @@ compile_mib(Source, Target, Config) ->
|
||||||
compile_xrl(Source, Target, Config) ->
|
compile_xrl(Source, Target, Config) ->
|
||||||
Opts = [{scannerfile, Target}, {return, true}
|
Opts = [{scannerfile, Target}, {return, true}
|
||||||
|rebar_config:get(Config, xrl_opts, [])],
|
|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'.
|
-spec compile_yrl(Source::string(), Target::string(), Config::#config{}) -> 'ok'.
|
||||||
compile_yrl(Source, Target, Config) ->
|
compile_yrl(Source, Target, Config) ->
|
||||||
Opts = [{parserfile, Target}, {return, true}
|
Opts = [{parserfile, Target}, {return, true}
|
||||||
|rebar_config:get(Config, yrl_opts, [])],
|
|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{},
|
-spec compile_xrl_yrl(Source::string(), Target::string(), Opts::list(),
|
||||||
Opts::list(), Mod::atom()) -> 'ok'.
|
Mod::atom()) -> 'ok'.
|
||||||
compile_xrl_yrl(Source, Target, Config, Opts, Mod) ->
|
compile_xrl_yrl(Source, Target, Opts, Mod) ->
|
||||||
case needs_compile(Source, Target, []) of
|
case needs_compile(Source, Target, []) of
|
||||||
true ->
|
true ->
|
||||||
case Mod:file(Source, Opts) of
|
case Mod:file(Source, Opts) of
|
||||||
{ok, _, []} ->
|
{ok, _, []} ->
|
||||||
ok;
|
ok;
|
||||||
{ok, _, _Warnings} ->
|
{ok, _, _Warnings} ->
|
||||||
case lists:member(fail_on_warnings, Config#config.opts) of
|
case lists:member(fail_on_warning, Opts) of
|
||||||
true ->
|
true ->
|
||||||
?FAIL;
|
?FAIL;
|
||||||
false ->
|
false ->
|
||||||
|
|
Loading…
Reference in a new issue