mirror of
https://github.com/correl/rebar.git
synced 2024-12-18 03:00:17 +00:00
Ensure include dir exists in compile_mib/3
This commit is contained in:
parent
c3a4ed292e
commit
ed94237dde
1 changed files with 2 additions and 1 deletions
|
@ -270,6 +270,7 @@ internal_erl_compile(Source, Config, Outdir, ErlOpts) ->
|
|||
Config::rebar_config:config()) -> 'ok'.
|
||||
compile_mib(Source, Target, Config) ->
|
||||
ok = rebar_utils:ensure_dir(Target),
|
||||
ok = rebar_utils:ensure_dir(filename:join("include", "dummy.hrl")),
|
||||
Opts = [{outdir, "priv/mibs"}, {i, ["priv/mibs"]}] ++
|
||||
rebar_config:get(Config, mib_opts, []),
|
||||
case snmpc:compile(Source, Opts) of
|
||||
|
@ -277,7 +278,7 @@ compile_mib(Source, Target, Config) ->
|
|||
Mib = filename:rootname(Target),
|
||||
ok = snmpc:mib_to_hrl(Mib),
|
||||
Hrl_filename = Mib ++ ".hrl",
|
||||
rebar_file_utils:mv(Hrl_filename,"include"),
|
||||
rebar_file_utils:mv(Hrl_filename, "include"),
|
||||
ok;
|
||||
{error, compilation_failed} ->
|
||||
?FAIL
|
||||
|
|
Loading…
Reference in a new issue