mirror of
https://github.com/correl/rebar.git
synced 2024-11-23 19:19:54 +00:00
Merge pull request #132 from alexthornton1/mib_to_hrl_verbosity
mib_to_hrl compilation verbosity via 'mib_opts'
This commit is contained in:
commit
d19a46676c
1 changed files with 9 additions and 1 deletions
|
@ -34,6 +34,7 @@
|
||||||
info/2]).
|
info/2]).
|
||||||
|
|
||||||
-include("rebar.hrl").
|
-include("rebar.hrl").
|
||||||
|
-include_lib("stdlib/include/erl_compile.hrl").
|
||||||
|
|
||||||
%% ===================================================================
|
%% ===================================================================
|
||||||
%% Public API
|
%% Public API
|
||||||
|
@ -401,7 +402,14 @@ compile_mib(Source, Target, Config) ->
|
||||||
case snmpc:compile(Source, Opts) of
|
case snmpc:compile(Source, Opts) of
|
||||||
{ok, _} ->
|
{ok, _} ->
|
||||||
Mib = filename:rootname(Target),
|
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",
|
Hrl_filename = Mib ++ ".hrl",
|
||||||
rebar_file_utils:mv(Hrl_filename, "include"),
|
rebar_file_utils:mv(Hrl_filename, "include"),
|
||||||
ok;
|
ok;
|
||||||
|
|
Loading…
Reference in a new issue