]> granicus.if.org Git - apache/commitdiff
Make version strings work properly with update macro definitions
authorIan Holsman <ianh@apache.org>
Fri, 23 Aug 2002 19:36:26 +0000 (19:36 +0000)
committerIan Holsman <ianh@apache.org>
Fri, 23 Aug 2002 19:36:26 +0000 (19:36 +0000)
Submitted by : Branko Cibej <brane@xbc.nu>

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96503 13f79535-47bb-0310-9956-ffa450edef68

build/win32/win32ver.awk

index 26fe37dcd243e0d01a83717fd0bdf2b4ef30c366..f83ad5b089459ea5d5b34e7f05487828cd9fb48a 100644 (file)
@@ -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)