Feng Lee 10 лет назад
Родитель
Сommit
8900f0561b
1 измененных файлов с 20 добавлено и 0 удалено
  1. 20 0
      rel/reltool.config.script

+ 20 - 0
rel/reltool.config.script

@@ -0,0 +1,20 @@
+%% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*-
+%% ex: ft=erlang ts=4 sw=4 et
+
+Sys         = proplists:get_value(sys, CONFIG),
+IncludeApps = [App || {app, App, _} <- Sys],
+
+[DepsDir]   = proplists:get_value(lib_dirs, Sys),
+DepApps     = lists:map(fun(AppFile) ->
+                        {ok, [{application, Name, Attrs}]}
+                            = file:consult(filename:join(DepsDir, AppFile)),
+                        Name
+                      end, filelib:wildcard("*/ebin/*.app", DepsDir)),
+AppendApps  = DepApps -- IncludeApps,
+Cond        = [{mod_cond, app}, {incl_cond, include}],
+
+NewSys      = lists:append(Sys, [{app, App, Cond} || App <- AppendApps]),
+
+io:format("~p~n", [NewSys]),
+
+lists:keyreplace(sys, 1, CONFIG, {sys, NewSys}).