Reputation: 21
I'm trying to convert over from an antiquated, unmaintained build tool to Erlang.mk. I have a release created using [Erlang.mk][1], 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.
Upvotes: 2
Views: 321
Reputation: 8340
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.
Upvotes: 4
Reputation: 2243
It is based on .app
file applications
list. Each application and its dependents are started before continuing to the next one.
Upvotes: 0