Skip to content

Commit

Permalink
Merge pull request rebar#132 from alexthornton1/mib_to_hrl_verbosity
Browse files Browse the repository at this point in the history
mib_to_hrl compilation verbosity via 'mib_opts'
  • Loading branch information
dizzyd committed Sep 20, 2013
2 parents 4dfdd72 + 01fd873 commit d19a466
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/rebar_erlc_compiler.erl
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
info/2]).

-include("rebar.hrl").
-include_lib("stdlib/include/erl_compile.hrl").

%% ===================================================================
%% Public API
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit d19a466

Please sign in to comment.