[nginx] Configure: the --build= option.
Ruslan Ermilov
ru at nginx.com
Tue May 20 12:13:13 UTC 2014
details: http://hg.nginx.org/nginx/rev/1209b8a7b077
branches:
changeset: 5701:1209b8a7b077
user: Ruslan Ermilov <ru at nginx.com>
date: Tue May 20 16:10:07 2014 +0400
description:
Configure: the --build= option.
If set, its value is output in "nginx -v" and in the error log.
diffstat:
auto/configure | 4 ++++
auto/options | 3 +++
src/core/nginx.c | 2 +-
src/core/nginx.h | 6 ++++++
src/os/unix/ngx_posix_init.c | 2 +-
src/os/win32/ngx_win32_init.c | 2 +-
6 files changed, 16 insertions(+), 3 deletions(-)
diffs (91 lines):
diff -r 5e892d40e5cc -r 1209b8a7b077 auto/configure
--- a/auto/configure Tue May 20 14:03:03 2014 +0400
+++ b/auto/configure Tue May 20 16:10:07 2014 +0400
@@ -108,4 +108,8 @@ have=NGX_HTTP_SCGI_TEMP_PATH value="\"$N
have=NGX_USER value="\"$NGX_USER\"" . auto/define
have=NGX_GROUP value="\"$NGX_GROUP\"" . auto/define
+if [ ".$NGX_BUILD" != "." ]; then
+ have=NGX_BUILD value="\"$NGX_BUILD\"" . auto/define
+fi
+
. auto/summary
diff -r 5e892d40e5cc -r 1209b8a7b077 auto/options
--- a/auto/options Tue May 20 14:03:03 2014 +0400
+++ b/auto/options Tue May 20 16:10:07 2014 +0400
@@ -14,6 +14,7 @@ NGX_PID_PATH=
NGX_LOCK_PATH=
NGX_USER=
NGX_GROUP=
+NGX_BUILD=
CC=${CC:-cc}
CPP=
@@ -178,6 +179,7 @@ do
--crossbuild=*) NGX_PLATFORM="$value" ;;
+ --build=*) NGX_BUILD="$value" ;;
--builddir=*) NGX_OBJS="$value" ;;
--with-rtsig_module) EVENT_RTSIG=YES ;;
@@ -341,6 +343,7 @@ cat << END
--group=GROUP set non-privileged group for
worker processes
+ --build=NAME set build name
--builddir=DIR set build directory
--with-rtsig_module enable rtsig module
diff -r 5e892d40e5cc -r 1209b8a7b077 src/core/nginx.c
--- a/src/core/nginx.c Tue May 20 14:03:03 2014 +0400
+++ b/src/core/nginx.c Tue May 20 16:10:07 2014 +0400
@@ -217,7 +217,7 @@ main(int argc, char *const *argv)
}
if (ngx_show_version) {
- ngx_write_stderr("nginx version: " NGINX_VER NGX_LINEFEED);
+ ngx_write_stderr("nginx version: " NGINX_VER_BUILD NGX_LINEFEED);
if (ngx_show_help) {
ngx_write_stderr(
diff -r 5e892d40e5cc -r 1209b8a7b077 src/core/nginx.h
--- a/src/core/nginx.h Tue May 20 14:03:03 2014 +0400
+++ b/src/core/nginx.h Tue May 20 16:10:07 2014 +0400
@@ -13,6 +13,12 @@
#define NGINX_VERSION "1.7.1"
#define NGINX_VER "nginx/" NGINX_VERSION
+#ifdef NGX_BUILD
+#define NGINX_VER_BUILD NGINX_VER " (" NGX_BUILD ")"
+#else
+#define NGINX_VER_BUILD NGINX_VER
+#endif
+
#define NGINX_VAR "NGINX"
#define NGX_OLDPID_EXT ".oldbin"
diff -r 5e892d40e5cc -r 1209b8a7b077 src/os/unix/ngx_posix_init.c
--- a/src/os/unix/ngx_posix_init.c Tue May 20 14:03:03 2014 +0400
+++ b/src/os/unix/ngx_posix_init.c Tue May 20 16:10:07 2014 +0400
@@ -82,7 +82,7 @@ ngx_os_init(ngx_log_t *log)
void
ngx_os_status(ngx_log_t *log)
{
- ngx_log_error(NGX_LOG_NOTICE, log, 0, NGINX_VER);
+ ngx_log_error(NGX_LOG_NOTICE, log, 0, NGINX_VER_BUILD);
#ifdef NGX_COMPILER
ngx_log_error(NGX_LOG_NOTICE, log, 0, "built by " NGX_COMPILER);
diff -r 5e892d40e5cc -r 1209b8a7b077 src/os/win32/ngx_win32_init.c
--- a/src/os/win32/ngx_win32_init.c Tue May 20 14:03:03 2014 +0400
+++ b/src/os/win32/ngx_win32_init.c Tue May 20 16:10:07 2014 +0400
@@ -247,7 +247,7 @@ ngx_os_status(ngx_log_t *log)
{
ngx_osviex_stub_t *osviex_stub;
- ngx_log_error(NGX_LOG_NOTICE, log, 0, NGINX_VER);
+ ngx_log_error(NGX_LOG_NOTICE, log, 0, NGINX_VER_BUILD);
if (osviex) {
More information about the nginx-devel
mailing list