Commit 406697cd authored by Bradley Nicholes's avatar Bradley Nicholes
Browse files

Fix up the NetWare AWK script that extracts the version number so that it...

Fix up the NetWare AWK script that extracts the version number so that it matches the new #defines in ap_release.h

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.0.x@328652 13f79535-47bb-0310-9956-ffa450edef68
parent f0555ea1
Loading
Loading
Loading
Loading
+9 −9
Changes for build/nw_ver.awk: 9 added lines, 9 removed lines.
Original line number Diff line number Diff line
@@ -18,21 +18,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 "";