summaryrefslogtreecommitdiff
path: root/src/rebar_otp_app.erl
diff options
context:
space:
mode:
authortheiw <none@none>2010-02-05 17:34:38 +0000
committertheiw <none@none>2010-02-05 17:34:38 +0000
commit788bd3df726933334ee9c570e1e920829c5d1c4c (patch)
treeed11edbb52295a81179f7e181c40a4ce30827c87 /src/rebar_otp_app.erl
parent30a3816c8649bbafb3695780c78c4eabbaa92eda (diff)
Provide package support for eunit; build_plt now includes listed applications; begin including -spec annotations
Diffstat (limited to 'src/rebar_otp_app.erl')
-rw-r--r--src/rebar_otp_app.erl11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/rebar_otp_app.erl b/src/rebar_otp_app.erl
index 136c5cb..f20ce0c 100644
--- a/src/rebar_otp_app.erl
+++ b/src/rebar_otp_app.erl
@@ -131,7 +131,7 @@ validate_modules(AppName, undefined) ->
validate_modules(AppName, Mods) ->
%% Construct two sets -- one for the actual .beam files in ebin/ and one for the modules
%% listed in the .app file
- EbinSet = ordsets:from_list([beam_to_mod(N) || N <- beams()]),
+ EbinSet = ordsets:from_list([rebar_utils:beam_to_mod("ebin", N) || N <- rebar_utils:beams("ebin")]),
ModSet = ordsets:from_list(Mods),
%% Identify .beam files listed in the .app, but not present in ebin/
@@ -155,12 +155,3 @@ validate_modules(AppName, Mods) ->
[AppName, Msg2]),
?FAIL
end.
-
-beam_to_mod(Filename) ->
- ["ebin" | Rest] = filename:split(Filename),
- list_to_atom(filename:basename(string:join(Rest, "."), ".beam")).
-
-beams() ->
- filelib:fold_files("ebin", ".*\.beam\$", true,
- fun(F, Acc) -> [F | Acc] end, []).
-