The new module configuration interface.
Configuration and building example:
./configure
./configure python
./configure php
./configure go
make all
or
./configure
make nginext
./configure python
make python
./configure php
make php
./configure go
make go
Modules configuration options and building examples:
./configure python --module=python2 --config=python2.7-config
make python2
./configure php --module=php7 --config=php7.0-config
--lib-path=/usr/local/php7.0
make php7
./configure go --go=go1.6 --go-path=${HOME}/go1.6
make go1.6
This commit is contained in:
@@ -57,10 +57,11 @@ static nxt_process_t *nxt_runtime_process_remove_pid(nxt_runtime_t *rt,
|
||||
nxt_int_t
|
||||
nxt_runtime_create(nxt_task_t *task)
|
||||
{
|
||||
nxt_mp_t *mp;
|
||||
nxt_int_t ret;
|
||||
nxt_array_t *listen_sockets;
|
||||
nxt_runtime_t *rt;
|
||||
nxt_mp_t *mp;
|
||||
nxt_int_t ret;
|
||||
nxt_array_t *listen_sockets;
|
||||
nxt_runtime_t *rt;
|
||||
nxt_app_lang_module_t *lang;
|
||||
|
||||
mp = nxt_mp_create(1024, 128, 256, 32);
|
||||
|
||||
@@ -90,6 +91,18 @@ nxt_runtime_create(nxt_task_t *task)
|
||||
goto fail;
|
||||
}
|
||||
|
||||
rt->languages = nxt_array_create(mp, 1, sizeof(nxt_app_lang_module_t));
|
||||
if (nxt_slow_path(rt->languages == NULL)) {
|
||||
goto fail;
|
||||
}
|
||||
|
||||
/* Should not fail. */
|
||||
lang = nxt_array_add(rt->languages);
|
||||
lang->type = (nxt_str_t) nxt_string("go");
|
||||
lang->version = (nxt_str_t) nxt_null_string;
|
||||
lang->file = NULL;
|
||||
lang->module = &nxt_go_module;
|
||||
|
||||
listen_sockets = nxt_array_create(mp, 1, sizeof(nxt_listen_socket_t));
|
||||
if (nxt_slow_path(listen_sockets == NULL)) {
|
||||
goto fail;
|
||||
@@ -324,7 +337,6 @@ nxt_runtime_thread_pools(nxt_thread_t *thr, nxt_runtime_t *rt)
|
||||
static void
|
||||
nxt_runtime_start(nxt_task_t *task, void *obj, void *data)
|
||||
{
|
||||
nxt_uint_t i;
|
||||
nxt_runtime_t *rt;
|
||||
|
||||
rt = obj;
|
||||
@@ -338,12 +350,6 @@ nxt_runtime_start(nxt_task_t *task, void *obj, void *data)
|
||||
goto fail;
|
||||
}
|
||||
|
||||
for (i = 0; i < nxt_init_modules_n; i++) {
|
||||
if (nxt_init_modules[i](task->thread, rt) != NXT_OK) {
|
||||
goto fail;
|
||||
}
|
||||
}
|
||||
|
||||
if (nxt_runtime_log_files_create(task, rt) != NXT_OK) {
|
||||
goto fail;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user