From 118ff2b869897d53ea562c4467f969cec9a081ab Mon Sep 17 00:00:00 2001 From: Bradley Nicholes Date: Thu, 29 Jan 2004 23:40:02 +0000 Subject: [PATCH] Rework the version extraction AWK script for NetWare to match the changes made in ap_release.h git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102456 13f79535-47bb-0310-9956-ffa450edef68 --- build/nw_ver.awk | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/build/nw_ver.awk b/build/nw_ver.awk index 868dd1520b..520b3f9441 100644 --- a/build/nw_ver.awk +++ b/build/nw_ver.awk @@ -3,21 +3,21 @@ BEGIN { # fetch Apache version numbers from input file and writes them to STDOUT while ((getline < ARGV[1]) > 0) { - if (match ($0, /^#define AP_SERVER_MAJORVERSION "[^"]+"/)) { - ver_major = substr($3, 2, length($3) - 2); + if (match ($0, /^#define AP_SERVER_MAJORVERSION_NUMBER /)) { + ver_major = $3; } - else if (match ($0, /^#define AP_SERVER_MINORVERSION "[^"]+"/)) { - ver_minor = substr($3, 2, length($3) - 2); + else if (match ($0, /^#define AP_SERVER_MINORVERSION_NUMBER /)) { + ver_minor = $3; } - else if (match ($0, /^#define AP_SERVER_PATCHLEVEL/)) { - ver_str_patch = substr($3, 2, length($3) - 2); - if (match (ver_str_patch, /[0-9][0-9]*/)) { - ver_patch = substr(ver_str_patch, RSTART, RLENGTH); - } + else if (match ($0, /^#define AP_SERVER_PATCHLEVEL_NUMBER/)) { + ver_patch = $3; + } + else if (match ($0, /^#define AP_SERVER_ADD_STRING /)) { + ver_str_release = substr($3, 2, length($3) - 2); } } ver = ver_major "," ver_minor "," ver_patch; - ver_str = ver_major "." ver_minor "." ver_str_patch; + ver_str = ver_major "." ver_minor "." ver_patch ver_str_release; print "VERSION = " ver ""; print "VERSION_STR = " ver_str ""; -- 2.50.1