xref: /unit/auto/modules/conf (revision 87:ae678814949f)
1
2# Copyright (C) Valentin V. Bartenev
3# Copyright (C) NGINX, Inc.
4
5
6NXT_MODULES_INIT=
7NXT_MODULES_SRCS=
8
9
10if [ $NXT_PYTHON_MODULE != NO ]; then
11    . auto/modules/python/conf
12fi
13
14if [ $NXT_PHP_MODULE != NO ]; then
15    . auto/modules/php/conf
16fi
17
18if [ $NXT_GO_MODULE != NO ]; then
19    . auto/modules/go/conf
20fi
21
22
23NXT_MODULES_SRC=$NXT_BUILD_DIR/nxt_modules.c
24
25
26cat << END                                            > $NXT_MODULES_SRC
27
28#include <nxt_main.h>
29#include <nxt_runtime.h>
30
31
32END
33
34
35for nxt_init in $NXT_MODULES_INIT
36do
37    $echo "extern nxt_int_t $nxt_init(nxt_thread_t *thr, nxt_runtime_t *rt);" \
38                                                     >> $NXT_MODULES_SRC
39done
40
41
42cat << END                                           >> $NXT_MODULES_SRC
43
44
45nxt_module_init_t  nxt_init_modules[] = {
46END
47
48for nxt_init in $NXT_MODULES_INIT
49do
50    $echo "    $nxt_init,"                           >> $NXT_MODULES_SRC
51done
52
53cat << END                                           >> $NXT_MODULES_SRC
54};
55
56
57nxt_uint_t  nxt_init_modules_n = nxt_nitems(nxt_init_modules);
58END
59