]> git.kaiwu.me - nginx.git/commitdiff
Configure: honor dependencies of dynamic modules.
authorMaxim Dounin <mdounin@mdounin.ru>
Mon, 21 Nov 2016 13:49:19 +0000 (16:49 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Mon, 21 Nov 2016 13:49:19 +0000 (16:49 +0300)
Dependencies of dynamic modules are added to NGX_ADDON_DEPS (and
it is now used for dynamic modules) to be in line with what happens
in case of static compilation.

To avoid duplication, MAIL_DEPS and STREAM_DEPS are no longer passed
to auto/module when these modules are compiled as dynamic ones.  Mail
and stream dependencies are handled explicitly via corresponding
variables.

auto/make
auto/module
auto/modules

index 84d266819b6c03d2395956d23d6e41dd5c334684..7ddd1007b630cc0a84ae49d014240988dd84c0a0 100644 (file)
--- a/auto/make
+++ b/auto/make
@@ -156,7 +156,7 @@ fi
 ngx_all_srcs="$ngx_all_srcs $MISC_SRCS"
 
 
-if test -n "$NGX_ADDON_SRCS"; then
+if test -n "$NGX_ADDON_SRCS$DYNAMIC_MODULES"; then
 
 cat << END                                                >> $NGX_MAKEFILE
 
@@ -499,17 +499,6 @@ else
     ngx_perl_cc="$ngx_perl_cc \$(ALL_INCS)"
 fi
 
-ngx_obj_deps="\$(CORE_DEPS)"
-if [ $HTTP != NO ]; then
-    ngx_obj_deps="$ngx_obj_deps \$(HTTP_DEPS)"
-fi
-if [ $MAIL != NO ]; then
-    ngx_obj_deps="$ngx_obj_deps \$(MAIL_DEPS)"
-fi
-if [ $STREAM != NO ]; then
-    ngx_obj_deps="$ngx_obj_deps \$(STREAM_DEPS)"
-fi
-
 for ngx_module in $DYNAMIC_MODULES
 do
     eval ngx_module_srcs="\$${ngx_module}_SRCS"
@@ -665,7 +654,7 @@ END
 
             cat << END                                        >> $NGX_MAKEFILE
 
-$ngx_obj:      $ngx_obj_deps$ngx_cont$ngx_src
+$ngx_obj:      \$(ADDON_DEPS)$ngx_cont$ngx_src
        $ngx_perl_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src$NGX_AUX
 
 END
@@ -673,7 +662,7 @@ END
 
             cat << END                                        >> $NGX_MAKEFILE
 
-$ngx_obj:      $ngx_obj_deps$ngx_cont$ngx_src
+$ngx_obj:      \$(ADDON_DEPS)$ngx_cont$ngx_src
        $ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src$NGX_AUX
 
 END
index 3b00a07f8d18c5f73610e3434e181056d57c5899..a2b578db2c6752cd9071bc6db5dc888557d2658e 100644 (file)
@@ -35,6 +35,10 @@ if [ "$ngx_module_link" = DYNAMIC ]; then
         CORE_INCS="$CORE_INCS $ngx_module_incs"
     fi
 
+    if test -n "$ngx_module_deps"; then
+        NGX_ADDON_DEPS="$NGX_ADDON_DEPS $ngx_module_deps"
+    fi
+
     libs=
     for lib in $ngx_module_libs
     do
index 89377bf0d0fe050bd7b12ede33ad217320873e71..c664fe3cbf07c7e21dde9a87bbcc949c177a45f7 100644 (file)
@@ -1252,7 +1252,7 @@ if [ $MAIL != NO ]; then
     elif [ $MAIL = DYNAMIC ]; then
         ngx_module_name=$MAIL_MODULES
         ngx_module_incs=
-        ngx_module_deps=$MAIL_DEPS
+        ngx_module_deps=
         ngx_module_srcs=$MAIL_SRCS
         ngx_module_libs=
         ngx_module_link=DYNAMIC
@@ -1272,7 +1272,7 @@ if [ $STREAM != NO ]; then
     elif [ $STREAM = DYNAMIC ]; then
         ngx_module_name=$STREAM_MODULES
         ngx_module_incs=
-        ngx_module_deps=$STREAM_DEPS
+        ngx_module_deps=
         ngx_module_srcs=$STREAM_SRCS
         ngx_module_libs=
         ngx_module_link=DYNAMIC