From 853c208fc993957aaea059e799bf9765ba167421 Mon Sep 17 00:00:00 2001 From: Ruslan Ermilov Date: Fri, 16 Dec 2016 19:54:37 +0300 Subject: [PATCH] Configure: detect nginx version for nginx.pm at make time. --- auto/lib/perl/make | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/auto/lib/perl/make b/auto/lib/perl/make index 350090c76..74e0f3ad6 100644 --- a/auto/lib/perl/make +++ b/auto/lib/perl/make @@ -3,9 +3,6 @@ # 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/ngx_http_perl_module.o: \\ @@ -27,7 +24,11 @@ $NGX_OBJS/src/http/modules/perl/Makefile: \\ src/http/modules/perl/nginx.pm \\ src/http/modules/perl/nginx.xs \\ src/http/modules/perl/typemap - sed "s/%%VERSION%%/$v/" src/http/modules/perl/nginx.pm > \\ + grep 'define NGINX_VERSION' src/core/nginx.h \\ + | sed -e 's/^.*"\(.*\)".*/\1/' > \\ + $NGX_OBJS/src/http/modules/perl/version + sed "s/%%VERSION%%/\`cat $NGX_OBJS/src/http/modules/perl/version\`/" \\ + 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/