summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgnas Vyšniauskas <ignas@numeris.lt>2011-08-30 10:29:31 +0300
committerTuncer Ayaz <tuncer.ayaz@gmail.com>2011-09-02 17:53:55 +0200
commited94237dde2de1c9ebfaecdca759b939386c393f (patch)
treee2e375c635ff8d60b0d424c7f5aa3acc48aadbeb
parentc3a4ed292e54601fd6813ed9673ac24ec30a6d98 (diff)
Ensure include dir exists in compile_mib/3
-rw-r--r--src/rebar_erlc_compiler.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rebar_erlc_compiler.erl b/src/rebar_erlc_compiler.erl
index 335283d..cf9b5bd 100644
--- a/src/rebar_erlc_compiler.erl
+++ b/src/rebar_erlc_compiler.erl
@@ -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