summaryrefslogtreecommitdiffhomepage
path: root/auto/modules/conf
blob: f73be1e6098cb7c6a64de77c28897745dfd19871 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54

# Copyright (C) NGINX, Inc.
# Copyright (C) Valentin V. Bartenev


NXT_MODULES_INIT=
NXT_MODULES_SRCS=


if [ $NXT_PYTHON_MODULE != NO ]; then
    . auto/modules/python/conf
fi

if [ $NXT_PHP_MODULE != NO ]; then
    . auto/modules/php/conf
fi


NXT_MODULES_SRC=$NXT_BUILD_DIR/nxt_modules.c


cat << END                                            > $NXT_MODULES_SRC

#include <nxt_main.h>
#include <nxt_runtime.h>


END


for nxt_init in $NXT_MODULES_INIT
do
    $echo "extern nxt_int_t $nxt_init(nxt_thread_t *thr, nxt_runtime_t *rt);" \
                                                     >> $NXT_MODULES_SRC
done


cat << END                                           >> $NXT_MODULES_SRC


nxt_module_init_t  nxt_init_modules[] = {
END

for nxt_init in $NXT_MODULES_INIT
do
    $echo "    $nxt_init,"                           >> $NXT_MODULES_SRC
done

cat << END                                           >> $NXT_MODULES_SRC
};


nxt_uint_t  nxt_init_modules_n = nxt_nitems(nxt_init_modules);
END