summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rebar_erlc_compiler.erl8
-rw-r--r--test/rebar_compile_SUITE.erl6
2 files changed, 1 insertions, 13 deletions
diff --git a/src/rebar_erlc_compiler.erl b/src/rebar_erlc_compiler.erl
index 50e61f3..162ed07 100644
--- a/src/rebar_erlc_compiler.erl
+++ b/src/rebar_erlc_compiler.erl
@@ -521,16 +521,12 @@ target_base(OutDir, Source) ->
compile_mib(AppInfo) ->
fun(Source, Target, Opts) ->
Dir = filename:dirname(Target),
- IncludeDir = filename:join(Dir, "include"),
-
Mib = filename:rootname(Target),
HrlFilename = Mib ++ ".hrl",
- Hrl = filename:basename(HrlFilename),
AppInclude = filename:join([rebar_app_info:dir(AppInfo), "include"]),
ok = filelib:ensure_dir(Target),
- ok = filelib:ensure_dir(filename:join([IncludeDir, "dummy.hrl"])),
ok = filelib:ensure_dir(filename:join([AppInclude, "dummy.hrl"])),
AllOpts = [{outdir, Dir}
@@ -547,9 +543,7 @@ compile_mib(AppInfo) ->
#options{specific = [{verbosity, Verbosity}]}
end,
ok = snmpc:mib_to_hrl(Mib, Mib, MibToHrlOpts),
- rebar_file_utils:mv(HrlFilename, IncludeDir),
- rebar_file_utils:symlink_or_copy(filename:join([IncludeDir, Hrl]),
- filename:join([AppInclude, Hrl])),
+ rebar_file_utils:mv(HrlFilename, AppInclude),
ok;
{error, compilation_failed} ->
?FAIL
diff --git a/test/rebar_compile_SUITE.erl b/test/rebar_compile_SUITE.erl
index 1170a44..ef9cf97 100644
--- a/test/rebar_compile_SUITE.erl
+++ b/test/rebar_compile_SUITE.erl
@@ -1022,9 +1022,6 @@ mib_test(Config) ->
PrivMibsDir = filename:join([AppDir, "_build", "default", "lib", Name, "priv", "mibs"]),
true = filelib:is_file(filename:join([PrivMibsDir, "SIMPLE-MIB.bin"])),
- %% check a hrl corresponding to the mib in the mibs dir exists in priv/mibs/include
- true = filelib:is_file(filename:join([PrivMibsDir, "include", "SIMPLE-MIB.hrl"])),
-
%% check a hrl corresponding to the mib in the mibs dir exists in include
true = filelib:is_file(filename:join([AppDir, "include", "SIMPLE-MIB.hrl"])),
@@ -1075,9 +1072,6 @@ umbrella_mib_first_test(Config) ->
PrivMibsDir = filename:join([AppsDir, "_build", "default", "lib", Name, "priv", "mibs"]),
true = filelib:is_file(filename:join([PrivMibsDir, "SIMPLE-MIB.bin"])),
- %% check a hrl corresponding to the mib in the mibs dir exists in priv/mibs/include
- true = filelib:is_file(filename:join([PrivMibsDir, "include", "SIMPLE-MIB.hrl"])),
-
%% check a hrl corresponding to the mib in the mibs dir exists in include
true = filelib:is_file(filename:join([AppDir, "include", "SIMPLE-MIB.hrl"])),