Merge pull request #132 from alexthornton1/mib_to_hrl_verbosity

mib_to_hrl compilation verbosity via 'mib_opts'
This commit is contained in:
Dave Smith 2013-09-20 07:10:26 -07:00
commit d19a46676c

View file

@ -34,6 +34,7 @@
info/2]).
-include("rebar.hrl").
-include_lib("stdlib/include/erl_compile.hrl").
%% ===================================================================
%% Public API
@ -401,7 +402,14 @@ compile_mib(Source, Target, Config) ->
case snmpc:compile(Source, Opts) of
{ok, _} ->
Mib = filename:rootname(Target),
ok = snmpc:mib_to_hrl(Mib),
MibToHrlOpts =
case proplists:get_value(verbosity, Opts, undefined) of
undefined ->
#options{specific = []};
Verbosity ->
#options{specific = [{verbosity, Verbosity}]}
end,
ok = snmpc:mib_to_hrl(Mib, Mib, MibToHrlOpts),
Hrl_filename = Mib ++ ".hrl",
rebar_file_utils:mv(Hrl_filename, "include"),
ok;