[nginx] Configure: added "build" target.

Maxim Dounin mdounin at mdounin.ru
Fri Feb 19 15:15:02 UTC 2016


details:   http://hg.nginx.org/nginx/rev/cfc3cfa434ec
branches:  
changeset: 6408:cfc3cfa434ec
user:      Maxim Dounin <mdounin at mdounin.ru>
date:      Fri Feb 19 18:13:54 2016 +0300
description:
Configure: added "build" target.

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.

diffstat:

 auto/install |  5 +----
 auto/make    |  4 ++++
 2 files changed, 5 insertions(+), 4 deletions(-)

diffs (36 lines):

diff --git a/auto/install b/auto/install
--- a/auto/install
+++ b/auto/install
@@ -104,8 +104,7 @@ manpage:	$NGX_OBJS/nginx.8
 		-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
diff --git a/auto/make b/auto/make
--- a/auto/make
+++ b/auto/make
@@ -223,6 +223,10 @@ ngx_main_link=${MAIN_LINK:+`echo $MAIN_L
 
 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



More information about the nginx-devel mailing list