summaryrefslogtreecommitdiffhomepage
path: root/auto/modules/python
diff options
context:
space:
mode:
Diffstat (limited to 'auto/modules/python')
-rw-r--r--auto/modules/python15
1 files changed, 12 insertions, 3 deletions
diff --git a/auto/modules/python b/auto/modules/python
index f006d87b..bd6377f4 100644
--- a/auto/modules/python
+++ b/auto/modules/python
@@ -65,7 +65,7 @@ if /bin/sh -c "$NXT_PYTHON_CONFIG --prefix" >> $NXT_AUTOCONF_ERR 2>&1; then
NXT_PYTHON_LIBS=`${NXT_PYTHON_CONFIG} --ldflags`
nxt_feature="Python"
- nxt_feature_name=NXT_HAVE_PYTHON
+ nxt_feature_name=""
nxt_feature_run=no
nxt_feature_incs="${NXT_PYTHON_INCLUDE}"
nxt_feature_libs="${NXT_PYTHON_LIBS}"
@@ -92,7 +92,7 @@ fi
nxt_feature="Python version"
-nxt_feature_name=NXT_PYTHON_VERSION
+nxt_feature_name=""
nxt_feature_run=value
nxt_feature_incs="${NXT_PYTHON_INCLUDE}"
nxt_feature_libs="${NXT_PYTHON_LIBS}"
@@ -117,6 +117,7 @@ fi
$echo " + Python module: ${NXT_PYTHON_MODULE}.unit.so"
+. auto/cc/deps
$echo >> $NXT_MAKEFILE
@@ -130,14 +131,22 @@ nxt_objs=
for nxt_src in $NXT_PYTHON_MODULE_SRCS; do
- nxt_obj=`$echo $nxt_src | sed -e "s/\.c$/-$NXT_PYTHON_MODULE.o/"`
+ nxt_obj=${nxt_src%.c}-$NXT_PYTHON_MODULE.o
+ nxt_dep=${nxt_src%.c}-$NXT_PYTHON_MODULE.dep
+ nxt_dep_flags=`nxt_gen_dep_flags`
+ nxt_dep_post=`nxt_gen_dep_post`
nxt_objs="$nxt_objs $NXT_BUILD_DIR/$nxt_obj"
cat << END >> $NXT_MAKEFILE
$NXT_BUILD_DIR/$nxt_obj: $nxt_src
\$(CC) -c \$(CFLAGS) \$(NXT_INCS) $NXT_PYTHON_INCLUDE \\
+ $nxt_dep_flags \\
-o $NXT_BUILD_DIR/$nxt_obj $nxt_src
+ $nxt_dep_post
+
+-include $NXT_BUILD_DIR/$nxt_dep
+
END
done