diff options
author | Chris Chew <none@none> | 2010-06-07 11:55:22 -0600 |
---|---|---|
committer | Chris Chew <none@none> | 2010-06-07 11:55:22 -0600 |
commit | 73a67adab4dae356407e72a99a32ec26ac1a6c7a (patch) | |
tree | 8ae74820079c344fac186e4938f3de2d327b8c8f /src | |
parent | 2c7804819ce1efec7a5ced0fd6dc0a12391f0e67 (diff) |
Fixed problem where install was broken when the .app file is generated from
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_otp_app.erl | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/rebar_otp_app.erl b/src/rebar_otp_app.erl index 7a62081..a07f655 100644 --- a/src/rebar_otp_app.erl +++ b/src/rebar_otp_app.erl @@ -68,12 +68,22 @@ clean(_Config, File) -> install(Config, File) -> + %% If we get an .app.src file, it needs to be pre-processed and + %% written out as a ebin/*.app file. That resulting file will then + %% be validated as usual. + case rebar_app_utils:is_app_src(File) of + true -> + AppFile = preprocess(File); + false -> + AppFile = File + end, + %% Load the app name and version from the .app file and construct %% the app identifier - {ok, AppName, AppData} = rebar_app_utils:load_app_file(File), + {ok, AppName, AppData} = rebar_app_utils:load_app_file(AppFile), %% Validate the .app file prior to installation - validate_name(AppName, File), + validate_name(AppName, AppFile), validate_modules(AppName, proplists:get_value(modules, AppData)), %% Get the target directory. The user can specify a target= directory @@ -176,7 +186,7 @@ validate_name(AppName, File) -> end. validate_modules(AppName, undefined) -> - ?ERROR("Missing modules declaration in~p.app:\n~s", [AppName]), + ?ERROR("Missing modules declaration in~p.app:\n", [AppName]), ?FAIL; validate_modules(AppName, Mods) -> |