Browse Source

remove code path

Maxim Sokhatsky 10 years ago
parent
commit
dcec17d647
4 changed files with 7 additions and 5 deletions
  1. BIN
      mad
  2. 2 2
      src/mad_compile.erl
  3. 5 2
      src/mad_repl.erl
  4. 0 1
      src/mad_utils.erl

BIN
mad


+ 2 - 2
src/mad_compile.erl

@@ -24,7 +24,7 @@ dep(Cwd, _Conf, ConfigFile, Name) ->
 
     %% add lib_dirs to path
     LibDirs = mad_utils:lib_dirs(DepPath, Conf1),
-    code:add_paths(LibDirs),
+%    code:add_paths(LibDirs),
 
     SrcDir = filename:join([mad_utils:src(DepPath)]),
 
@@ -40,7 +40,7 @@ dep(Cwd, _Conf, ConfigFile, Name) ->
 
             %% create EbinDir and add it to code path
             file:make_dir(EbinDir),
-            code:add_path(EbinDir),
+%            code:add_path(EbinDir),
 
             Opts = mad_utils:get_value(erl_opts, Conf1, []),
             lists:foreach(compile_fun(IncDir, EbinDir, Opts), Files),

+ 5 - 2
src/mad_repl.erl

@@ -13,7 +13,10 @@ load_config() ->
               application:set_env(App,K,V) end || {K,V} <- Cfg ] end || {App,Cfg} <- Apps]
              end.
 
-load_apps([]) -> [application:ensure_started(A)||A<-mad_plan:applist()];
+load_apps([]) -> [ application:start(A) ||A<-mad_plan:applist()];
 load_apps(Params) -> [application:ensure_all_started(list_to_atom(A))||A<-Params].
 
-main(Params) -> load_config(), load_apps(Params), user_drv:start(), timer:sleep(infinity).
+main(Params) -> 
+%    io:format("~p",[code:get_path()]),
+    load_config(), load_apps(Params), user_drv:start(), 
+     timer:sleep(infinity).

+ 0 - 1
src/mad_utils.erl

@@ -3,7 +3,6 @@
 -compile(export_all).
 
 cwd() -> {ok, Cwd} = file:get_cwd(), Cwd.
-exec(Cmd, Opts) -> os:cmd([Cmd," ",string:join(Opts," ")]).
 
 home() -> {ok, [[H|_]]} = init:get_argument(home), H.