diff options
author | Max Romanov <max.romanov@nginx.com> | 2017-12-01 16:28:06 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2017-12-01 16:28:06 +0300 |
commit | 630ec3f1eca0543b2d10c409822ea4acb657c87c (patch) | |
tree | a5256391de48996133269e860486c28e4745824f /auto/modules/php | |
parent | 1add36a7ee543b993aeba10c04a4abfc0244c3f8 (diff) | |
download | unit-630ec3f1eca0543b2d10c409822ea4acb657c87c.tar.gz unit-630ec3f1eca0543b2d10c409822ea4acb657c87c.tar.bz2 |
Using compiler capability to generate dependencies.
This closes #58 issue on GitHub.
Diffstat (limited to 'auto/modules/php')
-rw-r--r-- | auto/modules/php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/auto/modules/php b/auto/modules/php index daeb0b68..e5eb60f0 100644 --- a/auto/modules/php +++ b/auto/modules/php @@ -82,7 +82,7 @@ if /bin/sh -c "${NXT_PHP_CONFIG} --version" >> $NXT_AUTOCONF_ERR 2>&1; then fi nxt_feature="PHP embed SAPI" - nxt_feature_name=NXT_HAVE_PHP + nxt_feature_name="" nxt_feature_run=no nxt_feature_incs="${NXT_PHP_INCLUDE}" nxt_feature_libs="${NXT_PHP_LIB} ${NXT_PHP_LDFLAGS}" @@ -120,6 +120,7 @@ fi $echo " + PHP module: ${NXT_PHP_MODULE}.unit.so" +. auto/cc/deps $echo >> $NXT_MAKEFILE @@ -133,14 +134,19 @@ nxt_objs= for nxt_src in $NXT_PHP_MODULE_SRCS; do - nxt_obj=`$echo $nxt_src | sed -e "s/\.c$/-$NXT_PHP_MODULE.o/"` + nxt_obj=${nxt_src%.c}-$NXT_PHP_MODULE.o + nxt_dep=${nxt_src%.c}-$NXT_PHP_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_PHP_INCLUDE \\ + $nxt_dep_flags \\ -o $NXT_BUILD_DIR/$nxt_obj $nxt_src + $nxt_dep_post END done |