Permalink
Browse files

Hurricane now requires a build step -- no more auto compilation

  • Loading branch information...
1 parent 72f31d9 commit e896ba4fca7bdc918ffdc7d70a2c42d23a37f52a @icheishvili icheishvili committed Feb 23, 2012
Showing with 34 additions and 56 deletions.
  1. +11 −13 examples/basic.config
  2. +0 −6 examples/example.config
  3. +11 −11 examples/node1.config
  4. +11 −11 examples/node2.config
  5. +1 −15 run.escript
View
@@ -1,21 +1,19 @@
{
- compile_modules,
+ load_modules,
[
- "erl_modules/hurricane.erl",
- "erl_modules/hurricane_config_server.erl",
- "erl_modules/hurricane_utils.erl",
- "erl_modules/hurricane_stdio_server.erl",
- "erl_modules/hurricane_tcp_server.erl",
- "erl_modules/hurricane_http_server.erl",
- "erl_modules/hurricane_log_server.erl",
- "erl_modules/hurricane_supervisor.erl",
- "erl_modules/hurricane_message_delegate.erl",
- "erl_modules/hurricane_distribution_manager.erl"
+ "ebin/hurricane",
+ "ebin/hurricane_config_server",
+ "ebin/hurricane_utils",
+ "ebin/hurricane_stdio_server",
+ "ebin/hurricane_tcp_server",
+ "ebin/hurricane_http_server",
+ "ebin/hurricane_log_server",
+ "ebin/hurricane_supervisor",
+ "ebin/hurricane_message_delegate",
+ "ebin/hurricane_distribution_manager"
]
}.
-{load_modules, []}.
-
{
add_code_paths,
[
View
@@ -1,10 +1,4 @@
{
- compile_modules,
- [
- ]
-}.
-
-{
load_modules,
[
"ebin/hurricane",
View
@@ -1,16 +1,16 @@
{
- compile_modules,
+ load_modules,
[
- "erl_modules/hurricane.erl",
- "erl_modules/hurricane_config_server.erl",
- "erl_modules/hurricane_utils.erl",
- "erl_modules/hurricane_stdio_server.erl",
- "erl_modules/hurricane_tcp_server.erl",
- "erl_modules/hurricane_http_server.erl",
- "erl_modules/hurricane_log_server.erl",
- "erl_modules/hurricane_supervisor.erl",
- "erl_modules/hurricane_message_delegate.erl",
- "erl_modules/hurricane_distribution_manager.erl"
+ "ebin/hurricane",
+ "ebin/hurricane_config_server",
+ "ebin/hurricane_utils",
+ "ebin/hurricane_stdio_server",
+ "ebin/hurricane_tcp_server",
+ "ebin/hurricane_http_server",
+ "ebin/hurricane_log_server",
+ "ebin/hurricane_supervisor",
+ "ebin/hurricane_message_delegate",
+ "ebin/hurricane_distribution_manager"
]
}.
View
@@ -1,16 +1,16 @@
{
- compile_modules,
+ load_modules,
[
- "erl_modules/hurricane.erl",
- "erl_modules/hurricane_config_server.erl",
- "erl_modules/hurricane_utils.erl",
- "erl_modules/hurricane_stdio_server.erl",
- "erl_modules/hurricane_tcp_server.erl",
- "erl_modules/hurricane_http_server.erl",
- "erl_modules/hurricane_log_server.erl",
- "erl_modules/hurricane_supervisor.erl",
- "erl_modules/hurricane_message_delegate.erl",
- "erl_modules/hurricane_distribution_manager.erl"
+ "ebin/hurricane",
+ "ebin/hurricane_config_server",
+ "ebin/hurricane_utils",
+ "ebin/hurricane_stdio_server",
+ "ebin/hurricane_tcp_server",
+ "ebin/hurricane_http_server",
+ "ebin/hurricane_log_server",
+ "ebin/hurricane_supervisor",
+ "ebin/hurricane_message_delegate",
+ "ebin/hurricane_distribution_manager"
]
}.
View
@@ -19,25 +19,11 @@ main(Args) ->
ConfigPath = lists:nth(1, Args),
Config = erlang:apply(LoadConfigFun, [ConfigPath]),
- Modules = proplists:get_value(compile_modules, Config, []),
- lists:map(
- fun(Filepath) ->
- {ok, ModuleName} = compile:file(Filepath),
- {ok, ModuleName, Binary} = compile:file(
- Filepath, [binary]
- ),
- {module, ModuleName} = code:load_binary(
- ModuleName, Filepath, Binary
- )
- end,
- Modules
- ),
- BinaryModules = proplists:get_value(load_modules, Config, []),
lists:map(
fun(Filepath) ->
code:load_abs(Filepath)
end,
- BinaryModules
+ proplists:get_value(load_modules, Config, [])
),
code:add_pathsz(proplists:get_value(add_code_paths, Config, [])),

0 comments on commit e896ba4

Please sign in to comment.