]> git.kaiwu.me - nginx.git/commitdiff
Configure: added "build" target.
authorMaxim Dounin <mdounin@mdounin.ru>
Fri, 19 Feb 2016 15:13:54 +0000 (18:13 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Fri, 19 Feb 2016 15:13:54 +0000 (18:13 +0300)
The "build" target introduced to do all build-related tasks, and
it is now used in Makefile and in objs/Makefile as a dependency for
the "install" target.

In particular, this resolves problems as observed with dynamic modules
by people trying to do "make install" without calling "make" first.

auto/install
auto/make

index 4dcc743d3afc57fd988f2f6d5e650b27c001011b..9469a49ab3b095fcc2c111c9f6e0122a2be195cd 100644 (file)
@@ -104,8 +104,7 @@ $NGX_OBJS/nginx.8:  $NGX_MAN $NGX_AUTO_CONFIG_H
                -e "s|%%ERROR_LOG_PATH%%|${NGX_ERROR_LOG_PATH:-stderr}|" \\
                < $NGX_MAN > \$@
 
-install:       $NGX_OBJS${ngx_dirsep}nginx${ngx_binext} \
-               $NGX_INSTALL_PERL_MODULES
+install:       build $NGX_INSTALL_PERL_MODULES
        test -d '\$(DESTDIR)$NGX_PREFIX' || mkdir -p '\$(DESTDIR)$NGX_PREFIX'
 
        test -d '\$(DESTDIR)`dirname "$NGX_SBIN_PATH"`' \
@@ -187,8 +186,6 @@ cat << END >> Makefile
 
 build:
        \$(MAKE) -f $NGX_MAKEFILE
-       \$(MAKE) -f $NGX_MAKEFILE modules
-       \$(MAKE) -f $NGX_MAKEFILE manpage
 
 install:
        \$(MAKE) -f $NGX_MAKEFILE install
index 039a70f183a0a246a85870574c1c8f82f77ae401..560924b7dc2244eaf393554d0dea84acf6e3c8ac 100644 (file)
--- a/auto/make
+++ b/auto/make
@@ -223,6 +223,10 @@ ngx_main_link=${MAIN_LINK:+`echo $MAIN_LINK \
 
 cat << END                                                    >> $NGX_MAKEFILE
 
+build: binary modules manpage
+
+binary:        $NGX_OBJS${ngx_dirsep}nginx${ngx_binext}
+
 $NGX_OBJS${ngx_dirsep}nginx${ngx_binext}:      $ngx_deps$ngx_spacer
        \$(LINK) ${ngx_long_start}${ngx_binout}$NGX_OBJS${ngx_dirsep}nginx$ngx_long_cont$ngx_objs$ngx_libs$ngx_link$ngx_main_link
        $ngx_rcc