Extend rebar_utils:deprecated

This commit is contained in:
Tuncer Ayaz 2012-01-03 18:57:34 +01:00
parent a176db6937
commit ba538094ba

View file

@ -247,12 +247,19 @@ get_deprecated_global(OldOpt, NewOpt, When) ->
New New
end. end.
deprecated(Old, New, Opts, When) -> deprecated(Old, New, Opts, When) when is_list(Opts) ->
case lists:member(Old, Opts) of case lists:member(Old, Opts) of
true -> true ->
deprecated(Old, New, When); deprecated(Old, New, When);
false -> false ->
ok ok
end;
deprecated(Old, New, Config, When) ->
case rebar_config:get(Config, Old, undefined) of
undefined ->
ok;
_ ->
deprecated(Old, New, When)
end. end.
deprecated(Old, New, When) -> deprecated(Old, New, When) ->