changeset 5146:f45b83d20cfb

Simplified nginx version maintenance. It's no longer necessary to update src/http/modules/perl/nginx.pm when version is bumped, as it's now derived from src/core/nginx.h.
author Ruslan Ermilov <ru@nginx.com>
date Thu, 28 Mar 2013 08:47:06 +0000
parents f6777aef5b2f
children 864030a4ff2a
files auto/lib/perl/make src/http/modules/perl/nginx.pm
diffstat 2 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/auto/lib/perl/make
+++ b/auto/lib/perl/make
@@ -3,6 +3,9 @@
 # Copyright (C) Nginx, Inc.
 
 
+v=`grep 'define NGINX_VERSION' src/core/nginx.h | sed -e 's/^.*"\(.*\)".*/\1/'`
+
+
 cat << END                                                    >> $NGX_MAKEFILE
 
 $NGX_OBJS/src/http/modules/perl/blib/arch/auto/nginx/nginx.$ngx_perl_dlext: \\
@@ -15,11 +18,14 @@ cat << END                              
 
 
 $NGX_OBJS/src/http/modules/perl/Makefile: \\
+		src/core/nginx.h \\
 		src/http/modules/perl/Makefile.PL \\
 		src/http/modules/perl/nginx.pm \\
 		src/http/modules/perl/nginx.xs \\
 		src/http/modules/perl/typemap
-	cp -p src/http/modules/perl/nginx.* $NGX_OBJS/src/http/modules/perl/
+	sed "s/%%VERSION%%/$v/" src/http/modules/perl/nginx.pm > \\
+		$NGX_OBJS/src/http/modules/perl/nginx.pm
+	cp -p src/http/modules/perl/nginx.xs $NGX_OBJS/src/http/modules/perl/
 	cp -p src/http/modules/perl/typemap $NGX_OBJS/src/http/modules/perl/
 	cp -p src/http/modules/perl/Makefile.PL $NGX_OBJS/src/http/modules/perl/
 
--- a/src/http/modules/perl/nginx.pm
+++ b/src/http/modules/perl/nginx.pm
@@ -50,7 +50,7 @@ our @EXPORT = qw(
     HTTP_INSUFFICIENT_STORAGE
 );
 
-our $VERSION = '1.3.16';
+our $VERSION = '%%VERSION%%';
 
 require XSLoader;
 XSLoader::load('nginx', $VERSION);