summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDave Smith <dizzyd@dizzyd.com>2013-09-20 07:10:26 -0700
committerDave Smith <dizzyd@dizzyd.com>2013-09-20 07:10:26 -0700
commitd19a46676c4e5fe51f84b3a8758673212efa0811 (patch)
tree7ea19c99be2d487cb800307d282ea7b0f8cd7f56 /src
parent4dfdd726ada0cfc2015a6d6574976f6082ce4777 (diff)
parent01fd873c1e73dbd3f92ce088a8fac58096d2901c (diff)
Merge pull request #132 from alexthornton1/mib_to_hrl_verbosity
mib_to_hrl compilation verbosity via 'mib_opts'
Diffstat (limited to 'src')
-rw-r--r--src/rebar_erlc_compiler.erl10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/rebar_erlc_compiler.erl b/src/rebar_erlc_compiler.erl
index caef0d2..4157ba4 100644
--- a/src/rebar_erlc_compiler.erl
+++ b/src/rebar_erlc_compiler.erl
@@ -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;