From 0082ce3fd8853b50cef3d7b49a88f8b854f62924 Mon Sep 17 00:00:00 2001 From: Ian Holsman Date: Fri, 23 Aug 2002 19:36:26 +0000 Subject: Make version strings work properly with update macro definitions Submitted by : Branko Cibej git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96503 13f79535-47bb-0310-9956-ffa450edef68 --- build/win32/win32ver.awk | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'build/win32') diff --git a/build/win32/win32ver.awk b/build/win32/win32ver.awk index 26fe37dcd2..f83ad5b089 100644 --- a/build/win32/win32ver.awk +++ b/build/win32/win32ver.awk @@ -35,12 +35,19 @@ BEGIN { } while ((getline < rel_h) > 0) { - if (match ($0, /^#define AP_SERVER_BASEREVISION "[^"]+"/)) { - ver = substr($0, RSTART + 32, RLENGTH - 33); + if (match ($0, /^#define AP_SERVER_MAJORVERSION "[^"]+"/)) { + ver_major = substr($3, 2, length($3) - 2); + } + else if (match ($0, /^#define AP_SERVER_MINORVERSION "[^"]+"/)) { + ver_minor = substr($3, 2, length($3) - 2); + } + else if (match ($0, /^#define AP_SERVER_PATCHLEVEL "[^"]+"/)) { + ver_patch = substr($3, 2, length($3) - 2); } } - verc = ver; + ver = ver_major "." ver_minor "." ver_patch; + verc = ver_major "," ver_minor "," ver_patch; gsub(/\./, ",", verc); if (build) { sub(/-.*/, "", verc) -- cgit v1.2.3