用erlang.mk指定应用启动顺序 [英] Specifying app startup order with erlang.mk
问题描述
订单不依赖于 erlang.mk
,而是在启动应用程序时在Erlang VM本身。当 systools
开始具体应用程序读取 .app
文件,以检查应该预先启动的应用程序并启动它们。只有当所有必备应用程序已成功启动时,才会启动所请求的应用程序。请参阅应用程序的说明文件。
此处的示例 :
{application,humbundee,
[{description,Humble Bundle downloader in Erlang},
{vsn,0.0.1},
{modules,
[
= MODULES =
]},
{已注册,[hbd_sup,hbd_get_sup] },
{applications,[kernel,stdlib,sasl,lager]},
{mod,{hbd_app,[]}}
]}。
这表示内核
, stdlib
, sasl
和 lager
必须在 humbundee
可以开始。
I'm trying to covert over from an antiquated unmaintained build tool to erlang.mk. I have a release created using erlang.mk, but it fails when starting up, I believe because apps are starting up in the wrong order. How do I specify the startup order of the apps? I would have thought that it would start up apps in the same order as specified in the LOCAL_DEPS variable of the Makefile, but that doesn't seem to be happening. I've looked everywhere I can in the docs, plus googled, but haven't been able to find anything.
The order doesn't depend on erlang.mk
but on the Erlang VM itself when it's starting the applications. When systools
is starting a specific application it reads the .app
file to check which application should have been started beforehand and starts them. Only when all the prerequisite applications have been started successfully the requested application is started. See the description of the app file.
{application, humbundee,
[{description, "Humble Bundle downloader written in Erlang"},
{vsn, "0.0.1"},
{modules,
[
=MODULES=
]},
{registered, [hbd_sup, hbd_get_sup]},
{applications, [kernel, stdlib, sasl, lager]},
{mod, {hbd_app, []}}
]}.
This says that kernel
, stdlib
, sasl
, and lager
must be started before humbundee
could be started.
这篇关于用erlang.mk指定应用启动顺序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!